##// END OF EJS Templates
Switch revlog.ancestor to use revisions rather than nodeids
Matt Mackall -
r3139:1fd1cdcc default
parent child Browse files
Show More
@@ -1016,10 +1016,14 b' class revlog(object):'
1016 1016 def ancestor(self, a, b):
1017 1017 """calculate the least common ancestor of nodes a and b"""
1018 1018
1019 def parents(node):
1020 return [p for p in self.parents(node) if p != nullid]
1019 def parents(rev):
1020 return [p for p in self.parentrevs(rev) if p != -1]
1021 1021
1022 return ancestor.ancestor(a, b, parents) or nullid
1022 c = ancestor.ancestor(self.rev(a), self.rev(b), parents)
1023 if c is None:
1024 return nullid
1025
1026 return self.node(c)
1023 1027
1024 1028 def group(self, nodelist, lookup, infocollect=None):
1025 1029 """calculate a delta group
General Comments 0
You need to be logged in to leave comments. Login now