Dear Wiki user,

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

The "SymmetricMerge" page has been changed by JulianFoad:
http://wiki.apache.org/subversion/SymmetricMerge?action=diff&rev1=53&rev2=54

Comment:
Symmetric merge as a (narrative) algorithm.

  
  End of longest continuous prefix of source branch is A1, so that's the 
mergeinfo base to use.
  
- [TODO] Express it as an algorithm.
+ To express it as an algorithm:
+ 
+  1. Find the latest revision of A synced to B and the latest revision of B 
synced to A.
+   * The latest revision of A synced to B doesn't mean the last time a merge 
was performed, but rather the youngest revision 'rA' on A at which all changes 
on A up to rA are now included in B.
+   * We consider only direct A <-> B mergeinfo.  (Consideration of a merge 
graph extending to other branches is future work.)
+  1. Choose a base.
+   * Choose the latest revision of A synced to B or the latest revision of B 
synced to A.
+   * Each candidate base is a common ancestor of the source and target, if 
ancestry means following either the direct line of descent or the arrows that 
indicate complete merges.
+   * Choose the 'more recent' one in some sense -- be it time of commit, or 
number of changes since then, or some other measure.
+   * [TODO] In what cases do the selection methods give different results? 
Only after a criss-cross merge?
+  1. Identify cherry-picks.
+   * Find changes along the source side of the merge that are already 'in' the 
target.
+   * Look for mergeinfo in both directions (forward: easy; backward: harder).
+   * If a change is partly in the target, consider reporting it and aborting.
+  1. Break into 3-way merges, skipping the cherry-picks.
+  1. Mergeinfo addition.
+   * The first 3-way merge might have its base on the target branch.
+   * If base is on source branch, a normal mergeinfo addition.
+   * If base is on target branch, mergeinfo += "all source revs up to N".
  
  == Symmetric Merge with Cherry-Picks ==
  Next,  we need to account for cherry-picks.  If there are cherry-picks from  
the source [...], we look for the end of the first gap.  [TODO...]

Reply via email to