views:

26

answers:

1

We recently attempted a large, "cherry picked" merge. First we did a full merge from one child development branch into the parent Main branch, then did a full merge of the Main branch into another child development branch, then we attempted to do a cherry pick merge from the second Development branch back into merge. There were many checkins, including renames and deletes; and when it wasn't working we did a bunch of TFPT rollbacks.

What options do we have to recover here? Things like baseless, force, etc merge? Roll back to a point in time and somehow, try again?

+1  A: 

I assume the goal is to make Main look like Dev2? This should get you there, or very close:

tf merge $/project/Dev2 $/project/Main -r -force -version:1~T
tf resolve -auto:accepttheirs

Use 'tf folderdiff' to clean up any lingering diffs.

The other main option in general is to delete & recreate the target branch, but that really only works when the target is a leaf in your branch tree. Deleting Main in your case would disrupt its relationship with Dev1 and the rest of the tree. Also, I'd recommend folks going down this path either Destroy the errant branch (vs simply Delete), or pick a new name for the re-branched copy, in order to avoid rare but nightmarish bugs in some versions of TFS 2005/2008. (2010 shouldn't have those problems)

Richard Berg
Thanks. I had looked up the /force option but hadn't figured out the version:1~T part. So far I've only had occasion to use version:C1234~1234 (to merge a single changeset).Also, the Main branch has many other branches - so deleting it isn't really an option.
steve_d