changeset 13561:0ab0ceefddf2

merge: remove last traces of fastforward merging bbc97d419b16 introduced fast-forward branch merging. 66ed92ed115a partly removed it again. The fastforward variable would always be false if branchmerge was false, so the fastforward variable makes no difference and we can remove it completely.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 08 Mar 2011 01:21:50 +0100
parents a2734c8322ac
children 7c6e9b57a4cc
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Mar 07 23:19:17 2011 +0100
+++ b/mercurial/merge.py	Tue Mar 08 01:21:50 2011 +0100
@@ -493,7 +493,6 @@
         p1, p2 = pl[0], repo[node]
         pa = p1.ancestor(p2)
         fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2)
-        fastforward = False
 
         ### check phase
         if not overwrite and len(pl) > 1:
@@ -503,9 +502,7 @@
                 raise util.Abort(_("merging with a working directory ancestor"
                                    " has no effect"))
             elif pa == p1:
-                if p1.branch() != p2.branch():
-                    fastforward = True
-                else:
+                if p1.branch() == p2.branch():
                     raise util.Abort(_("nothing to merge (use 'hg update'"
                                        " or check 'hg heads')"))
             if not force and (wc.files() or wc.deleted()):
@@ -550,7 +547,7 @@
         if not partial:
             repo.dirstate.setparents(fp1, fp2)
             recordupdates(repo, action, branchmerge)
-            if not branchmerge and not fastforward:
+            if not branchmerge:
                 repo.dirstate.setbranch(p2.branch())
     finally:
         wlock.release()