From SVN v1.5, merging is done rev-by-rev. Cherry-selection of areas that need to be combined will force us to resolve conflicts between branches and branches twice (one when combining versions of chests with FB and again when merging)
Then you are doing something wrong!
We'll see:
trunk fb ---------\ r1-10 | r11-20 | r20-30 |
As a rule, if you want to make changes made in 11-20, it is best to merge 1-20 in fb and that's it.
Then, when fb is executed, merge 20-30, and then copy fb to the trunk (without merging!).
If you decide to merge only r11: 20, ok, in the end you will need to combine r1: 10 and r20: 30 and then copy fb to the trunk.
Unable to merge changes twice!
I assume that you are likely to follow these steps:
copy trunk->fb merge 11:20 -> fb. merge fb-1:30 -> trunk !!!!! WRONG
You cannot do this because you merge 11:20 twice. You should always combine code in one direction only.
The right way:
copy trunk->fb merge 1:20 -> fb. merge 21:30 -> fb (now fb=trunk+feature) copy fb -> trunk
Edit
So the correct steps are:
Create a function (FB) branch from the trunk (copy the trunk to the svn-copy branch)
FB_0=trunk_0
Work on FB.
FB_1=FB_0 + change_a
Merge all upcoming changes externally on FB.
trunk_1=trunk_0 + tr_change_a; FB_2 = FB_1 + (trunk_1 - trunk_0) == trunk_0 + change_a + tr_change_a
Work on FB
FB_3 = FB_2 + change_b
Merge all upcoming unrelated changes from the trunk to the FB.
trunk_2=trunk_1 + tr_change_n; FB_4 = FB_3 + (trunk_2 - trunk_1) == trunk_0 + change_a + change_b + tr_change_a + tr_change_b
At this moment, we have a feature branch consisting of all the new functions and all the changes in the connecting line. Therefore, we simply copy the difference between the two branches.
trunk_3 = trunk_2 + (FB_4 - trunk_2) = FB_4 = trunk_0 + change_a + change_b + tr_change_a + tr_change_b
Now the FB is deleted, as trunk has all the changes we need.
The last step is done:
svn merge /path/to/trunk@LatestRev /path/to/branches/fb@LatestRev . svn ci
Or in ordinary language, they take the difference between the chest and the branch and put them in the trunk making them equivalent.
This template is described at http://svnbook.red-bean.com/en/1.4/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.patterns.feature
Now, if this does not work for you, I do not understand the question.
Edit2: For svn-1.5
When working with svn-1.5 you can combine much easier:
When you work with a function branch, you simply change the changes from time to time:
$ svn merge /path/to/trunk Solve conflicts $ svn ci
He will line up your FB with all the changes in the trunk. At the end of the FB, you follow this procedure again to make sure everything is up to date. You go into the trunk and run
$ svn merge --reintegrate /path/to/fb $ svn ci
In the latter case, there should be no conflict if you work as shown.