##// END OF EJS Templates
Change revlog.heads to walk the revision graph using revision numbers...
Alexis S. L. Carvalho -
r2490:6ff82ec1 default
parent child Browse files
Show More
@@ -713,19 +713,19 b' class revlog(object):'
713 """
713 """
714 if start is None:
714 if start is None:
715 start = nullid
715 start = nullid
716 reachable = {start: 1}
717 heads = {start: 1}
718 startrev = self.rev(start)
716 startrev = self.rev(start)
717 reachable = {startrev: 1}
718 heads = {startrev: 1}
719
719
720 parentrevs = self.parentrevs
720 for r in xrange(startrev + 1, self.count()):
721 for r in xrange(startrev + 1, self.count()):
721 n = self.node(r)
722 for p in parentrevs(r):
722 for pn in self.parents(n):
723 if p in reachable:
723 if pn in reachable:
724 reachable[r] = 1
724 reachable[n] = 1
725 heads[r] = 1
725 heads[n] = 1
726 if p in heads:
726 if pn in heads:
727 del heads[p]
727 del heads[pn]
728 return [self.node(r) for r in heads]
728 return heads.keys()
729
729
730 def children(self, node):
730 def children(self, node):
731 """find the children of a given node"""
731 """find the children of a given node"""
General Comments 0
You need to be logged in to leave comments. Login now