##// END OF EJS Templates
revlog: implement a fast path for heads
Matt Mackall -
r4991:9c8c42bc default
parent child Browse files
Show More
@@ -733,6 +733,17 b' class revlog(object):'
733 733 if stop is specified, it will consider all the revs from stop
734 734 as if they had no children
735 735 """
736 if start is None and stop is None:
737 count = self.count()
738 if not count:
739 return [nullid]
740 ishead = [1] * (count + 1)
741 index = self.index
742 for r in xrange(count):
743 e = index[r]
744 ishead[e[5]] = ishead[e[6]] = 0
745 return [self.node(r) for r in xrange(count) if ishead[r]]
746
736 747 if start is None:
737 748 start = nullid
738 749 if stop is None:
General Comments 0
You need to be logged in to leave comments. Login now