Converting folder copies to branches in TFS 2010
TFS 2010 introduced the ability to convert basic folders into branches. The documentation also speaks of "reparenting a branch" (which does not appear in source control explorer context menu but is accessible only through File>Source Control> Branching & Merging ... hard to find ...)
Let's say I have folders A and A2 under source control. A2 was COPIED from A some time ago, but is not a branch of A. It is just copied, added to source control and checked-in. Since they are not declared as branches, there is no history of merge operations between A and A2.
The commands "Convert to branch" and "Reparent branch" make me think that both A and A2 can be converted from basic folders to branches and A can be configured as the parent branch of A2, thus giving me the ability to use all the juicy branch features of TFS 2010.
I couldn't get this done. I converted both A and A2 to branches but there are no relations between them. While trying to "reparent" A2, I can not selected A as a parent branch.
How can I do this? If what I am trying to do is not possible, then what is "Convert to branch" and "Re开发者_JS百科parent Branch" good for?
Reading from different sources you should be able to use Convert to Branch and Reparent Branch after doing a baseless merge between the folders.
Do a baseless merge, but do not actually change any files:
tf merge /baseless /recursive /discard <source> <destination>
Update for VS2012 users:
Visual Studio 2012 does Baseless Merges, which can save time (no TF command line needed)!
I came across this when wanting to branch Master to a specific existing BugFixes folder, which I had converted into a branch.
Simply merge the two unrelated branches, Check In and then reparent.
Works like a whiz! This is what the baseless merge in VS2012 looks like. Thank you to Sahas Subramanian .
http://www.incyclesoftware.com/2012/08/baseless-merge-vs-2012-ui/
See http://www.incyclesoftware.com/2012/08/baseless-merge-vs-2012-ui/ for a walk through ( thanks for the image).
I've never done this before, but here is the link in msdn describing how to do this: http://msdn.microsoft.com/en-us/library/ms181425.aspx
精彩评论