mercurial/localrepo.py
changeset 20987 298c9f346dde
parent 20975 37cdf1fca1b2
child 21043 6c383c871fdb
--- a/mercurial/localrepo.py	Mon Apr 07 23:17:51 2014 +0200
+++ b/mercurial/localrepo.py	Mon Apr 07 23:17:51 2014 +0200
@@ -1154,10 +1154,10 @@
             fparent1, fparent2 = fparent2, nullid
         elif fparent2 != nullid:
             # is one parent an ancestor of the other?
-            fparentancestor = flog.ancestor(fparent1, fparent2)
-            if fparentancestor == fparent1:
+            fparentancestors = flog.commonancestors(fparent1, fparent2)
+            if fparent1 in fparentancestors:
                 fparent1, fparent2 = fparent2, nullid
-            elif fparentancestor == fparent2:
+            elif fparent2 in fparentancestors:
                 fparent2 = nullid
 
         # is the file changed?