mercurial/revlog.py
changeset 3360 ef8307585b41
parent 3335 9061613c1593
child 3390 a74addddd092
equal deleted inserted replaced
3359:41741218504d 3360:ef8307585b41
   597         else:
   597         else:
   598             heads = list(heads)
   598             heads = list(heads)
   599             if not heads:
   599             if not heads:
   600                 return nonodes
   600                 return nonodes
   601             ancestors = {}
   601             ancestors = {}
   602             # Start at the top and keep marking parents until we're done.
       
   603             nodestotag = heads[:]
       
   604             # Turn heads into a dictionary so we can remove 'fake' heads.
   602             # Turn heads into a dictionary so we can remove 'fake' heads.
   605             # Also, later we will be using it to filter out the heads we can't
   603             # Also, later we will be using it to filter out the heads we can't
   606             # find from roots.
   604             # find from roots.
   607             heads = dict.fromkeys(heads, 0)
   605             heads = dict.fromkeys(heads, 0)
       
   606             # Start at the top and keep marking parents until we're done.
       
   607             nodestotag = heads.keys()
   608             # Remember where the top was so we can use it as a limit later.
   608             # Remember where the top was so we can use it as a limit later.
   609             highestrev = max([self.rev(n) for n in nodestotag])
   609             highestrev = max([self.rev(n) for n in nodestotag])
   610             while nodestotag:
   610             while nodestotag:
   611                 # grab a node to tag
   611                 # grab a node to tag
   612                 n = nodestotag.pop()
   612                 n = nodestotag.pop()