bugzilla: use set instead of dict
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 17 May 2009 03:02:12 +0200
changeset 8455 a858b54d072b
parent 8454 6d4bf1c1a003
child 8456 e9e2a2c9b294
bugzilla: use set instead of dict
hgext/bugzilla.py
--- a/hgext/bugzilla.py	Sun May 17 02:55:22 2009 +0200
+++ b/hgext/bugzilla.py	Sun May 17 03:02:12 2009 +0200
@@ -339,7 +339,7 @@
                 re.IGNORECASE)
             bugzilla._split_re = re.compile(r'\D+')
         start = 0
-        ids = {}
+        ids = set()
         while True:
             m = bugzilla._bug_re.search(ctx.description(), start)
             if not m:
@@ -347,8 +347,7 @@
             start = m.end()
             for id in bugzilla._split_re.split(m.group(1)):
                 if not id: continue
-                ids[int(id)] = 1
-        ids = ids.keys()
+                ids.add(int(id))
         if ids:
             ids = self.filter_real_bug_ids(ids)
         if ids: