I'm working on one sub-module of a large project for which is use VSTS 2008.
I have a need to rollback the module to an earlier version (about 4 check-ins previous). I tried to do this in the Visual Studio UI, and finally realized there is no option to rollback.
After some research, I determined there is a power tools download that purports to support rollback via a command-line tool. However, there appears to be virtually no documentation for it.
Can anyone describe step by step how to rollback to a previous version in VS2008? (Using Power Tools or otherwise).
Bonus question--anyone know if we might get more robust rollback support in VS2010?
In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback. The items you select determine the scope that the rollback changes. In the Rollback dialog box, select Rollback changes from a single changeset.
Rollback entire changeset will give you a set of Pending Changes that when checked in will "undo" what was done in changeset 601.
You can use this command to roll back the effects of one or more changesets to one or more version-controlled items. This command does not remove the changesets from an item's version history.
Right-click on the folder in Source Control Explorer. Choose Get Specific Version. Choose the version that you want to get (by changeset, date, label, etc).
EDIT: At this point your local version will be the version that you want. Check out the changed files and then check them back in. This will bring up the merge wizard and it will probably be complaining about how the server has a newer version than you do. Go through the wizard and merge the files the way you want them (one of the options is to discard the server changes, which is what it sounds like you want). At the end of this process, it may tell you that no files were checked in due to the merge process (or something of that nature), just hit OK and then check in again. This should accomplish what you need.
This has luckily been made much easier in TFS 2012. Now there is a Rollback option from the GUI.
MSDN has more information on how to do it, and what options are available. Here is the text from MSDN on how to rollback to a specific version:
To roll back to a specific version:
- In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback.
- In the Rollback dialog box, select Rollback to a specific version.
You can of course also rollback entire changesets or a collection of changesets. And you can also easily rollback to a specific point in time if you wish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With