# HG changeset patch # User Martin Geisler # Date 1240426280 -7200 # Node ID 616f20e1004ad4d96ef8aa0514714d802d29dc30 # Parent 08e1baf924ca690d27271faa34faa1ae0bab2d8b revlog: let nodestotag be a set instead of a list diff -r 08e1baf924ca -r 616f20e1004a mercurial/revlog.py --- a/mercurial/revlog.py Wed Apr 22 00:57:28 2009 +0200 +++ b/mercurial/revlog.py Wed Apr 22 20:51:20 2009 +0200 @@ -678,7 +678,7 @@ # find from roots. heads = dict.fromkeys(heads, 0) # Start at the top and keep marking parents until we're done. - nodestotag = heads.keys() + nodestotag = set(heads.keys()) # Remember where the top was so we can use it as a limit later. highestrev = max([self.rev(n) for n in nodestotag]) while nodestotag: @@ -696,7 +696,7 @@ # and we haven't already been marked as an ancestor ancestors[n] = 1 # Mark as ancestor # Add non-nullid parents to list of nodes to tag. - nodestotag.extend([p for p in self.parents(n) if + nodestotag.update([p for p in self.parents(n) if p != nullid]) elif n in heads: # We've seen it before, is it a fake head? # So it is, real heads should not be the ancestors of