I am a bit curious on how the merge info in Subversion is used, and what kind of problems one can run into if the merge info is incorrect?
For example, I have branched branch1
and branch2
from trunk
. I also have a subbranch1
and a subbranch2
originating from branch1
. Consider I've done some development in branch2
, and then reintegrated it back to trunk using svn merge --reintegrate ^/branch2
. I then wanted to add these changes to subbranch1
as well (pulling them from trunk
) and mistakenly used command, svn merge --reintegrate ^/trunk
(thus adding the --reintegrate
flag to the merge command here too, even though subbranch1
is not an immediate ancestor of trunk
).
What problems can this cause in the future?
Merge info keeps track of this information:
subbranch1
originated from branch1
, which originated from trunk
, etc.)If the merge info is missing or incorrect, you would have to track merges manually, and this could be error prone. By using merge info, you just let Subversion keep track of all this information.
This answer is deprecated. Please use Subversion >= 1.6.
You're branching approach is dangerous in general, but because of the accident it's even worse.
You'll get much problems when reintraging all the branches.
You cannot trust the three-way-comparsion anymore, you have to check each change manually!
See What mother never told you about svn branching and merging for more information.
P.S. I had to fix something like this once. Since then we use bunny hopping (see link).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With