You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by Apache subversion Wiki <co...@subversion.apache.org> on 2012/02/24 15:10:12 UTC

[Subversion Wiki] Update of "FourWayCherryPick" by JulianFoad

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for change notification.

The "FourWayCherryPick" page has been changed by JulianFoad:
http://wiki.apache.org/subversion/FourWayCherryPick

New page:
== 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:

{{attachment:merge-cherry-3way.png|Cherry-Pick as 3-way Merge}}

... 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 http://svn.haxx.se/users/archive-2011-10/0834.shtml a concrete example?]

A [[http://svn.apache.org/repos/asf/subversion/trunk/notes/variance-adjusted-patching.html|4-way merge]] would be more correct:

{{attachment:merge-cherry-4way.png|Cherry-Pick as 4-way Merge}}