Here where I work we have a branch which is only used to check-in ongoing bugs and tasks. The small tasks are shelved and recovered in the next week, when they are checked-in.
We developed an auto-merge system where these small check-ins are all merged to all specific project Branches. Then, at the end of the project, it’s reverse merged into the main branch, thus going automatically to another project branches.
But, suppose I have a branch with Feature A, and another with Feature B. I need a third, with both Feature A + Feature B + Bug Fixes. I don’t want to reverse merge them as I don’t want to mess up the main branch (yet)
I’ve created a branch from Feature A, and enabled my auto-merge from "Feature A" to "Feature A+B". So every bug fix goes this way: Main -> Feature A -> Feature A+B. And every checkin within Feature A goes to Feature A+B.
Now I want to do baseless merges from "Feature B" to "Feature
A+B".Is there a way to enable merging between them (within TFS) ?
I know it blows hierarchy up, and I know I can just perform x baseless merges through tf.exe, or three-way merge the files manually (or using any known tool).
But I’m not responsible for doing this, it’s another developer who got used to the Team Explorer interface and all, so it would make his life easier.
Now, now, I know a probable answer/comment will be:
"You need to revisit your branch structure, as something is wrong!"
If possible, put that with some tips, I’m currently trying to change that but I’m not sure what to do when we develop 2 separated projects that, all of a sudden, need to be put together.
As I understand it, once you have done a baseless merge between two branches using
tf merge /baseless, TFS remembers this relation and from then on any user can perform a merge ‘normally’ between the two branches.The catch is that the baseless merge probably will detect conflicts for every item, and you need to check in new versions of everything in order to create the relation between the branches for the items. So, using your branch structure and doing a baseless merge between FeatureB to Feature A+B, you must be very careful when solving the conflicts – if you simply select the target version, any FeatureA changes on the target branch will be overwritten with FeatureB!
I should add that I haven’t done this all the way through; I had a similar scenario but bailed out when I realized that I needed to solve every conflict in detail. Our product is huge, so it wasn’t worth the time and the risk for us.