Reputation: 13763
We have a tricky situation with our branches on TFS 2012 and now we are not exactly sure what will be the result of our actions.
The problematic branch structure is as follows:
/B----2-------
/
A -------1-----------
\
\C---3--
The pseudo diagram is approximately time-correct - at first branch B was branched from A and then later branch C was created. The numbers are the changesets in question (actually our problem involves multiple changesets on each branch, but I've simplified the diagram).
We wanted to merge changeset 3 from C into branch B. Visual Studio warned us that a baseless merge will be performed (obviously, because branches B and C are siblings and not parent-child). The warning was like this one:
We proceeded with merging. Then at some point it came to one developer that we forgot to update our branch B from branch A and that we need changes from changeset 1 in our branch B. But the problem is that changeset 1 has some code lines which were later modified in changeset 3 (branch C) which we merged.
Now the question is, what will happen to branch B when we merge changeset 1 from A into B after we have done the baseless merge of changeset 3 from C into B?
Will TFS be smart enough to keep the changes from the newest changeset 3 when it finds the conflicting code lines of changeset 1, even after we did the baseless merge?
P.S. We'll learn from this mistake and will try to avoid baseless merging in the future...
Upvotes: 1
Views: 3862
Reputation: 4626
From your diagram, it looks like that 1 is already included in Branch C. So when you merge from "C" to "B", the changes would already include those of changeset 1.
Upvotes: 1