Team Foundation Server Changeset rollback

One of the new features for TFS 2010 Version Control is the ability to rollback or undo a changeset or check-in inside the product and see it as a new pending change type (and new change type in the history) inside Team Explorer. This feature has been available in TFS 2008 but you had to use the TFS Power Tools. The only gotcha for the TFS 2010 implementation is that you have to use the command-line application tf.exe to actually perform the rollback operation. More information about the tool is available here in the MSDN Library: http://msdn.microsoft.com/en-us/library/dd380776(VS.100).aspx

Syntax:

tf rollback /changeset:changesetfrom~changesetto [itemspec] [/recursive]
[/lock:none|checkin|checkout] [/version:versionspec]
[/keepmergehistory] [/noprompt] [/login:username,[password]]

tf rollback /toversion:versionspec itemspec [/recursive]
[/lock:none|checkin|checkout] [/version:versionspec]
[/keepmergehistory] [/noprompt] [/login:username,[password]]

Example:

Admin Console Changeset

VS 2010 Powertool changeset

Using the Power Tools for VS TFS 2010  UI method

If you have the August 2011 or later version of the TFS 2010 Power Tools installed, you now have the ability to fire off a rollback straight from Team Explorer without having to use the command-line approach.  The main way would be to fire it off from the Source Control Explorer window.

Right click a source branch and view history…

Using History Changeset rollback

 

Select a chnageset and in the right click menu you will see the optoin to Rollback Entire Changeset…

RightClickRollback

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s