changeset 8455:a858b54d072b

bugzilla: use set instead of dict
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 17 May 2009 03:02:12 +0200
parents 6d4bf1c1a003
children e9e2a2c9b294
files hgext/bugzilla.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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: