cmdutil: replace pseudo-set by real set
authorMartin Geisler <mg@lazybytes.net>
Tue, 12 May 2009 01:08:28 +0200
changeset 8368 52e6117a9940
parent 8367 7cf3d20f5967
child 8369 93a811ef3ac0
cmdutil: replace pseudo-set by real set
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Wed May 13 15:35:25 2009 +0200
+++ b/mercurial/cmdutil.py	Tue May 12 01:08:28 2009 +0200
@@ -154,7 +154,7 @@
             return defval
         return repo.changelog.rev(repo.lookup(val))
 
-    seen, l = {}, []
+    seen, l = set(), []
     for spec in revs:
         if revrangesep in spec:
             start, end = spec.split(revrangesep, 1)
@@ -164,13 +164,13 @@
             for rev in xrange(start, end+step, step):
                 if rev in seen:
                     continue
-                seen[rev] = 1
+                seen.add(rev)
                 l.append(rev)
         else:
             rev = revfix(repo, spec, None)
             if rev in seen:
                 continue
-            seen[rev] = 1
+            seen.add(rev)
             l.append(rev)
 
     return l