transplant: replace incancestors uses with ancestors
authorSiddharth Agarwal <sid0@fb.com>
Mon, 17 Dec 2012 15:08:06 -0800
changeset 18082 40f0c0748cfc
parent 18081 f88c60e740a1
child 18083 717c692fa449
transplant: replace incancestors uses with ancestors
hgext/transplant.py
--- a/hgext/transplant.py	Mon Dec 17 15:13:51 2012 -0800
+++ b/hgext/transplant.py	Mon Dec 17 15:08:06 2012 -0800
@@ -94,7 +94,8 @@
             parentrev = repo.changelog.rev(parent)
         if hasnode(repo, node):
             rev = repo.changelog.rev(node)
-            reachable = repo.changelog.incancestors([parentrev], rev)
+            reachable = repo.changelog.ancestors([parentrev], rev,
+                                                 inclusive=True)
             if rev in reachable:
                 return True
         for t in self.transplants.get(node):
@@ -103,7 +104,8 @@
                 self.transplants.remove(t)
                 return False
             lnoderev = repo.changelog.rev(t.lnode)
-            if lnoderev in repo.changelog.incancestors([parentrev], lnoderev):
+            if lnoderev in repo.changelog.ancestors([parentrev], lnoderev,
+                                                    inclusive=True):
                 return True
         return False