Rollback in Team System Source Control
In the current version of Team System source control there is no support for "Rollback" functionality. Users that had previous experience with other source control systems (VSS for example) often looking for this feature.
The way to perform operation similar to VSS rollback in TS is: Get specific version from changeset previous to change you would like to rollback, check it out and then check it. It is not a very convenient way, but it is keeping history of the changes after doing rollback (which is usually good thing).
The other way to do it is using Power Toy (tfpt) utility.
One of the commands supported by tfpt is Rollback. You can use it from command line or GUI. Here some point you should have in mind when using it:
- First thing you should know when using tftp rollback is the difference in its behavior from similarly called option in VSTS. Tftp rollback actually trying to remove only changes in specified changeset, keeping all the changes made afterwards.
- You can not have any pending changes when doing rollback. Trying to do it will result in following error message: "Cannot proceed because you have pending changes in your workspace. You must move to a shelveset, undo, or check in all pending changes before reverting a changeset.".
- To perform GUI driven rollback, execute
"%ProgramFiles%\Microsoft Team Foundation Server Power Tools\tftp.exe" rollback
from directory mapped in workspace. If you will try to run it from unmapped folder, you will receive pretty annoying message "Unable to determine the workspace". I would prefer to have ability to specify workspace in command line, but unfortunately this is not the case.
- The workspace used to perform rollback has to be up to date. If not, tftp will ask you if you like to get latest version. Answering no to this question will stop the process. Be advised, even if you intend to do rollback on single file, utility will perform get latest on the whole workspace. If you have a large amount of unsynchronized files in workspace, creation of separate small workspace for rollback may save some time.
- Rollback operation can result in conflicts if later changesets exists. In this case 3 directional merge should be performed.
To summarize: performing rollback in TS is not a great fun. I hope
Attrice guys will add nice rallback support to their
History Sidekick utility :-).