##// END OF EJS Templates
transplant: replace incancestors uses with ancestors
Siddharth Agarwal -
r18082:40f0c074 default
parent child Browse files
Show More
@@ -94,7 +94,8 b' class transplanter(object):'
94 parentrev = repo.changelog.rev(parent)
94 parentrev = repo.changelog.rev(parent)
95 if hasnode(repo, node):
95 if hasnode(repo, node):
96 rev = repo.changelog.rev(node)
96 rev = repo.changelog.rev(node)
97 reachable = repo.changelog.incancestors([parentrev], rev)
97 reachable = repo.changelog.ancestors([parentrev], rev,
98 inclusive=True)
98 if rev in reachable:
99 if rev in reachable:
99 return True
100 return True
100 for t in self.transplants.get(node):
101 for t in self.transplants.get(node):
@@ -103,7 +104,8 b' class transplanter(object):'
103 self.transplants.remove(t)
104 self.transplants.remove(t)
104 return False
105 return False
105 lnoderev = repo.changelog.rev(t.lnode)
106 lnoderev = repo.changelog.rev(t.lnode)
106 if lnoderev in repo.changelog.incancestors([parentrev], lnoderev):
107 if lnoderev in repo.changelog.ancestors([parentrev], lnoderev,
108 inclusive=True):
107 return True
109 return True
108 return False
110 return False
109
111
General Comments 0
You need to be logged in to leave comments. Login now