changeset 20987:298c9f346dde

commit: use revlog.commonancestors instead of .ancestor This do probably not make any real difference but is slightly more correct and we would like to get rid of flog.ancestor.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 07 Apr 2014 23:17:51 +0200
parents 6ae0c41e4b52
children 8c2f1e2a11ff
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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?