changeset 8368:52e6117a9940

cmdutil: replace pseudo-set by real set
author Martin Geisler <mg@lazybytes.net>
date Tue, 12 May 2009 01:08:28 +0200
parents 7cf3d20f5967
children 93a811ef3ac0
files mercurial/cmdutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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