views:

175

answers:

1

Suppose I have a main branch and a dev branch. Suppose I merge some stuff from dev into main.

  • I check in the merge
  • Now I decide "whoops, the dev branch wasn't really ready for me to merge into main yet."
  • I want to tell TFS: remove that change set from main and forget that the merge ever happened.

Rolling back the changeset is easy enough -- I can use the TFS powertools ROLLBACK command. on the Main branch (with the /changeset /recursive flags)

However, I will get a warning from the rollback that the merge history for the files has not been deleted.

Effect: Later, when dev is ready to be merged into main, the changes in the files that were rolled back previously are NOT merged into Main (this is because TFS "thinks" that those merges are already done.

My goal: When I rollback, make TFS remove the merge history so that when I merge dev into main later on, everything merges.

How can I do that?

BTW: I'm using TFS 2008 SP1

+1  A: 

Rollbacks in TFS 2008 aren't that great. It is essentially a re-check-in of a previous version. Since you lost that merge history, you may need to /force the merge from the command line when you do the merge next time. That should get it to ignore the fact that the previous merge history is out there.

Robaticus
I thought about force, but won't that try to re-merge all of the change history? (previous merges, etc)It sounds like there just isn't a great solution for this one.
JMarsch
That's the nice thing about TFS. Try the force, and see what's happening before you check in. You can always undo after the merge.
Robaticus