How to rollback a change set completely automatically in TFS

Hello All,

I read this following document regarding rollback in VS

https://www.visualstudio.com/en-us/docs/tfvc/rollback-command-team-foundation-version-control

https://www.visualstudio.com/en-us/docs/tfvc/roll-back-changesets

but when I tried to rollback a change set in Visual studio… it changed it to Pending status but gave me an error (as-an-incompatible-pending-change)

https://social.msdn.microsoft.com/Forums/vstudio/en-US/af5b9afa-05cd-4793-aeb9-41e5fe352976/tf203015-the-item-has-an-incompatible-pending-change?forum=tfsversioncontrol

Kindly advice

Removing your pending changes in the same workspace before trying to create new changes by the rollback. The error says that you have some pending changes and they’re not compatible.

Hello Martin,
I just added a comment to a job and checked in my code to test the rollback functionality
But When I hit rollback, I get this error

So how am I supposed to make it compatible??

I assume there is no place inside version control in AOT to rollback he changes automatically, correct?
I know we can compare manually and merge the code
Kindly advice
Thanks

Did you get rid of pending changes? How exactly do you “hit rollback”?
AOT doesn’t allow rolling back changesets; that needs to be done in VS. You could get the previous versions and check it in as a new version, but rolling a changeset back looks cleaner to me.

Did you get rid of pending changes?
How exactly do you “hit rollback”?
IN VS, Go to source control explorer > Select the object > right click > view history > select the changeset that needs rollback > right click > Rollback entire changeset

  • Get this message in output window (Automatically resolved conflict: edit, rollback: $/AX2012/AX Branches/AXDEV01/Jobs/Jobname;C302~C302 → $/AX2012/AX Branches/AXDEV01/Jobs/Jobname;C302 as AutoMerge)

After that when I go to AOT, there is a undo checkout option for that job but when I undo checkout, the system gives a non-fatal TFS error, and a warning (No pending changes were found for C:\TFS\AXDEV01\Jobs\jobname.xpo.)

Any steps how should I proceed further would be really appreciated
Thanks,
Shankar :slight_smile:

You didn’t mention “TF203015: The item has an incompatible pending change”. Does it mean that the problem doesn’t exist anymore? It seems that the conflict was automatically resolved this time.

Problem is not yet solved.
When I undo my pending changes in visual studio, the object looks ok in VS but the changes still exists.

I want to get rid of the new changes I added and the system should automaticallly switch to the previous version

the same thing is seen in AOT too but I see one more issue in AOT. The issue in AOT is even though I checkout the object I am not able to make any edits to it

Kindly advice.

Of course that changing files in the working folder doesn’t change AOT in AX. That’s done by the step of synchronizing AX with VCS.
By the way, I didn’t ask you to manipulate files in Visual Studio, I asked you to verify whether you have pending changes there. It seems you had.
Regarding you last problem, verify that the file is really checked out in TFS and then check if the file in the working folder isn’t read-only.