mercurial/revlog.py
changeset 8153 616f20e1004a
parent 8152 08e1baf924ca
child 8163 62d7287fe6b0
--- 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