changeset 8153:616f20e1004a

revlog: let nodestotag be a set instead of a list
author Martin Geisler <mg@lazybytes.net>
date Wed, 22 Apr 2009 20:51:20 +0200
parents 08e1baf924ca
children 06f1e4e309ed
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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