Cherry pick: 3-way or 4-way Merge

Subversion currently performs any requested merge as a sequence of 3-way merges. For simple sync and reintegrate merges, that's exactly what's needed. Usually there is just one 3-way merge, but if cherry-picks are being skipped then Subversion breaks down the merge source range into sub-ranges and performs one 3-way merge per sub-range.

For a cherry-pick merge, a 3-way merge is not quite right:

... because it tries to merge the change A2:A3 (so far, so good) with the change A2:B3. The trouble is that the latter diff includes not only changes that were made deliberately in B, such as B3, but also the reverse of some changes that were made earlier in A, specifically A2 and A1. In simple cases that works fine, but we could do better. [TODO: Describe what goes wrong with it. Is it more chance of conflicts? Is a concrete example?]

A 4-way merge would be more correct:

  • No labels