1
votes

Foll. is my understanding re. TFS rollback.

Assuming I have the foll. scenario:

Changeset 
200 
199 
198 
197 
196 
195

Couple of options to do rollback:

  1. Solution Explorer -> Rt click -> Get specific version, checkout/checkin
  2. Solution Explorer -> View History -> Rt click -> Rollback Entire Changeset
  3. Solution Explorer -> View History -> Rt click-> Rollback selection of changesets
  4. Source Explorer (Visual studio -> View -> Other windows -> Source explorer) -> Rt click file -> Rollback

Option 1 - Solution Explorer -> Get specific version, checkout/checkin: If I want to undo all the changes from changeset 200 to 197 and roll back to what the file was after changset 196 was checked-in, I can use this option - Get specific version (changeset 196) and then checkout and checkin the file.

Option 2 - Solution Explorer -> View History -> Rollback Entire Changeset: This option can be used if you want to rollback that specific changeset. Note that any other file associated with that changeset will also get rolledback. Example if you want to roll back changes made in changeset 197 while still keeping every other following (>197) changeset intact.

Option 3 - Solution Explorer -> View History -> Rollback selection of changesets: Same as option 2, but can be used to roll back multiple changesets. Example to undo changsets 200 to 197 and get the file to what it was when changeset 196 was checked-in

Option 4 - Source Explorer (Visual studio -> View -> Other windows -> Source explorer) -> Rt click file -> Rollback: This brings a dialog box to do either of the foll.:

  • The first radiobox from below is same as option 2 from above
  • Second radiobox is same as option 3 from above
  • Third radiobox is very important and only available from this dialog box which allows us to roll back to specific changeset.

Question: In option 4, do other files from the same changeset get impacted as a result of rollback? Or is this rollback specific to this file only unlike the option 2, 3 counterparts?

Source explorer Rollback

Useful Link for Rollback examples

1

1 Answers

1
votes

When you right click on a file and Rollback... you got the pop-up, in the top you have the field Items to Rollback, by default the value there will be the server path to the file.

So when you do rollback from there the rollback will be only to this file and not impact other files.

When you click on a file View History and Rollback Entire Changeset all the files of the changset will be rollbacked.