changeset 3631:770c4fc03b8e

bundle: don't use sets.Set
author Matt Mackall <mpm@selenic.com>
date Mon, 13 Nov 2006 13:26:57 -0600
parents 508036290b00
children 231393b7316f
files mercurial/commands.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Nov 13 13:26:57 2006 -0600
+++ b/mercurial/commands.py	Mon Nov 13 13:26:57 2006 -0600
@@ -11,7 +11,7 @@
 demandload(globals(), "os re sys signal imp urllib pdb shlex")
 demandload(globals(), "fancyopts ui hg util lock revlog templater bundlerepo")
 demandload(globals(), "difflib patch tempfile time")
-demandload(globals(), "traceback errno version atexit sets bz2")
+demandload(globals(), "traceback errno version atexit bz2")
 demandload(globals(), "archival changegroup cmdutil hgweb.server sshserver")
 
 class UnknownCommand(Exception):
@@ -827,24 +827,23 @@
         # create the right base
         # XXX: nodesbetween / changegroup* should be "fixed" instead
         o = []
-        has_set = sets.Set(base)
+        has = {nullid: None} 
         for n in base:
-            has_set.update(repo.changelog.reachable(n))
+            has.update(repo.changelog.reachable(n))
         if revs:
             visit = list(revs)
         else:
             visit = repo.changelog.heads()
-        seen = sets.Set(visit)
+        seen = {}
         while visit:
             n = visit.pop(0)
-            parents = [p for p in repo.changelog.parents(n)
-                       if p != nullid and p not in has_set]
+            parents = [p for p in repo.changelog.parents(n) if p not in has]
             if len(parents) == 0:
                 o.insert(0, n)
             else:
                 for p in parents:
                     if p not in seen:
-                        seen.add(p)
+                        seen[p] = 1
                         visit.append(p)
     else:
         setremoteconfig(ui, opts)