mercurial/revlog.py
changeset 1551 e793cbc8be00
parent 1550 ccb9b62de892
child 1559 59b3639df0a9
equal deleted inserted replaced
1550:ccb9b62de892 1551:e793cbc8be00
   407         assert orderedout
   407         assert orderedout
   408         assert roots
   408         assert roots
   409         assert heads
   409         assert heads
   410         return (orderedout, roots, heads)
   410         return (orderedout, roots, heads)
   411 
   411 
   412     def heads(self, start=nullid):
   412     def heads(self, start=None):
   413         """return the list of all nodes that have no children
   413         """return the list of all nodes that have no children
   414         if start is specified, only heads that are children of
   414 
   415         start will be returned"""
   415         if start is specified, only heads that are descendants of
       
   416         start will be returned
       
   417 
       
   418         """
       
   419         if start is None:
       
   420             start = nullid
   416         reachable = {start: 1}
   421         reachable = {start: 1}
   417         heads = {start: 1}
   422         heads = {start: 1}
   418         startrev = self.rev(start)
   423         startrev = self.rev(start)
   419 
   424 
   420         for r in xrange(startrev + 1, self.count()):
   425         for r in xrange(startrev + 1, self.count()):