# HG changeset patch # User Martin Geisler # Date 2009-04-22 18:51:20 # Node ID 616f20e1004ad4d96ef8aa0514714d802d29dc30 # Parent 08e1baf924ca690d27271faa34faa1ae0bab2d8b revlog: let nodestotag be a set instead of a list diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -678,7 +678,7 @@ class revlog(object): # 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 @@ class revlog(object): # 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