Subversion reintegrate branch conflicts

778 views Asked by At

I'm using svn for version control and have the following question:

  • Let's say I develop something in my feature branch and constantly upstream changes from the trunk (by simply merging them and resolving conflicts). Now, at some moment I made my last upstream merge from trunk and resolved the conflicts. And, for example, right after that merge I somehow manage to "freeze" the trunk - all commits to trunk are being rejected and it always remains in the same state.

  • Does this guarantee the absence of conflicts when I perform the merge --reintegrate for my feature branch? Or I am missing some other conditions and actions, which might possibly lead to them?

2

There are 2 answers

2
David W. On BEST ANSWER

How do you plan to freeze trunk?

If you do freeze trunk first, and then do your merge from trunk to branch, you are guaranteed that no one has touched trunk since your last merge.

You shouldn't have any merge conflicts if:

  • You don't cherry pick merges since all merge conflicts should have been handled when you merged from the branch to the trunk -- that's if you didn't do any cherry picking of merges.
  • You always did your merging from the same root directory.

However, it is possible with some strange edge case where this might not necessarily be true. I've tried with two feature branches to see if I could force a reintegrate conflict, but I couldn't.

1
tryingToBeClever On

I don't see this behavior, I'm able to generate a conflict on the merge --reintegrate. This is with svn 1.6.18, not sure if there's a feature dependency here. In particular, where a conflict on the branch has required a manual resolution (i.e. an --accept mine-* or --accept theirs-* would not work), I can't see how subversion could avoid conflicting on the merge --reintegrate, since it can't really 'tell' how you resolved the conflict, and the conflicting lines are unchanged on the trunk.

I'm actually looking for a solution to a related question - how to 'remember' the manual resolution when remerging to trunk, so a user doesn't have to go through the same conflict resolution twice (and the same thought processes) - but I'll ask that question separately if there's no discussion here.