Reputation: 786
I am working on a long-lived feature branch. Unfortunately, I cannot dedicate all my time to this feature branch, and have to switch back and forth between the main trunk for regular day-to-day coding, and feature branch when I have free time.
I am trying to merge the trunk into the feature branch in order to keep the feature branch up to date, but am getting a lot of conflicts, and I just realized why:
After resolving a conflict, I commit the fixed file to the Branch, however the Trunk version of the file does NOT changes. It will ALWAYS have merge conflicts with the branch file, even after the conflict is resolved. For example, see the conflict below:
I then fix this conflict by making changes to the Branch version of the file, and then commit it to the Branch. The Branch now looks like this:
Now, if I do another merge, I will still get a conflict at line 3 because the Trunk version of the file never changed:
Question: How do you deal with long-lived branches, in terms of merging and dealing with conflicts?
Upvotes: 1
Views: 200
Reputation: 56
What version of SVN/TortoiseSVN you're using?
Do you commit mergeinfo changes when you merge from the Trunk to the Branch?
As far as I can tell, there should be no conflicts if you are using modern version of SVN (1.10.x or newer) and if you are commiting mergeinfo changes properly.
The
svn:mergeinfo
property is automatically maintained by Subversion whenever you run svn merge. Its value indicates which changes made to a given path have been replicated into the directory in question.
Check the Mergeinfo and Previews chapter of the svnbook for further details.
Upvotes: 3