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.
--- 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?