Using Rollback in the Team Foundation Server Power Tools


Team Foundation Server 2010 provided a much better rollback experience for users via the tf rollback command. In ‘TFS11’ this functionality will be baked into the UI, though it seems that the Visual Studio UserVoice site is bearing some early fruit as the TFS team has decided to provide rollback in the TFS2010 UI via its Power Tools delivery vehicle.

Rollback in the UI can be found in the Team Foundation Server Power Tools August 2011 release.

Important

  • It’s important to remember that this Power Tool doesn’t replace the tf rollback command. The Power Tool only operates in /recursive mode and doesn’t provide support for advanced options like /keepmergehistory and /lock.
  • It’s also important to understand how Rollback works. From MSDNYou can use this 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. Instead, this command creates in your workspace a set of pending changes that negate the effects of the changesets that you specify.

UI Integration

Its available from two areas in Team Explorer, with each providing a slightly different experience

Source Control Explorer

If you right-click on a folder or file in SCE you will now see the [Rollback…] menu.

image

This will be disabled if there is an incompatible pending change (like a move or delete) on the item being selected. If you try rollback a changeset which contains incompatible pending changes, you will get the familiar message: TF203015: The item $/xyz/A.txt has an incompatible pending change.

If there are no incompatible changes you get the Rollback dialog which, while providing a wide range of options to configure, allows you to rollback a single, range or version.

image

Once you have configured your options, click Rollback and unfortunately you will get no feedback. Pretty much nothing happens, not even a refresh of SCE. You will now need to view your Pending Changes window to see what the rollback has affected.

History

image

Similar to the Rollback in SCE, when you click on Rollback Entire Changeset you will get no feedback. You must track down your Pending Change window to see what eh result is.

Tips

  1. Remember that Rollback will create a set of pending changes. You need to commit these for the rollback to take effect.
  2. If you are rolling back to a specific changeset version, be aware that files which were not created at that time will be deleted.
  3. History allows you to selectively multi select (something a Power Tool is not allowed to change). If you use multi select in History, you will actually be rolling back a Range of changesets from the largest to smallest selected, e.g. in the following example it appears that I am able to selectively rollback 3 changesets
  4. image

    but the resulting dialog shows that we are actually rolling back all changesets in the range

SNAGHTML38ffe1

4. REVIEW your pending changesets before checking in.

There are a few other rough edges, but overall this is a great addition to the Power Tools and those who spent their spare time getting it to us should be commended.

9 Replies to “Using Rollback in the Team Foundation Server Power Tools”

  1. Pingback: ExternalBlogs
  2. Pingback: Alkampfer's Place
  3. Pingback: Twitted by Wicko73

Leave a comment