вторник, 16 августа 2011 г.

Rollback or Undo a ChangeSet in TFS 2010


TFS 2010 provides you the ability to Rollback or Undo a ChangeSet from TFS Product itself. You can also see it as a new pending change type as Rollback (new change type in the history) inside Team Explorer. 
This feature was earlier available in TFS 2008 as part of TFS Power Tools only, where you have to Rollback the Change Set using tfpt.exe. Here in TFS 2010 implementation you have to use the command-line application tf.exe to actually perform the rollback information.  More information about the tool is available here in the MSDN Library:  http://msdn.microsoft.com/en-us/library/dd380776(VS.100).aspx
The syntax is:
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]]
 
Here, I am performing a Rollback of ChangeSet Number 22 which contains Form1.cs file.
 
Just do a check-in, your Rollback of ChangeSet will be done.

Комментариев нет: