diff mercurial/merge.py @ 13550:1792b8a9422b stable

merge: back out single-parent fast-forward merge This backs out changeset: 13158:9e7e24052745 user: Mads Kiilerich <mads@kiilerich.com> date: Tue Dec 07 03:29:21 2010 +0100 summary: merge: fast-forward merge with descendant Before named branches, the invariants were: a) "merges" always have two parents b) p1 is not linearly related to p2 Adding named branches made (b) problematic, so the above patch was introduced, which fixed (b) but broke (a). After discussion, we decided that the invariants should be: a) "merges" always have two parents b) p1 is not linearly related to p2 OR p1 and p2 are on different branches
author Matt Mackall <mpm@selenic.com>
date Mon, 07 Mar 2011 15:03:10 -0600
parents 6217040b2780
children 0ab0ceefddf2 5b3383ea67d2
line wrap: on
line diff
--- a/mercurial/merge.py	Sat Mar 05 16:34:59 2011 -0600
+++ b/mercurial/merge.py	Mon Mar 07 15:03:10 2011 -0600
@@ -540,7 +540,7 @@
         action += manifestmerge(repo, wc, p2, pa, overwrite, partial)
 
         ### apply phase
-        if not branchmerge or fastforward: # just jump to the new rev
+        if not branchmerge: # just jump to the new rev
             fp1, fp2, xp1, xp2 = fp2, nullid, xp2, ''
         if not partial:
             repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2)
@@ -549,7 +549,7 @@
 
         if not partial:
             repo.dirstate.setparents(fp1, fp2)
-            recordupdates(repo, action, branchmerge and not fastforward)
+            recordupdates(repo, action, branchmerge)
             if not branchmerge and not fastforward:
                 repo.dirstate.setbranch(p2.branch())
     finally: