changeset 8463:43186df4bb8e

bisect: use set instead of dict
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 17 May 2009 03:40:54 +0200
parents e7e4e41b3bbc
children 7af92e70bb25
files mercurial/hbisect.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hbisect.py	Sun May 17 03:38:03 2009 +0200
+++ b/mercurial/hbisect.py	Sun May 17 03:40:54 2009 +0200
@@ -84,11 +84,11 @@
     # find the best node to test
     best_rev = None
     best_len = -1
-    poison = {}
+    poison = set()
     for rev in candidates:
         if rev in poison:
             for c in children.get(rev, []):
-                poison[c] = True # poison children
+                poison.add(c) # poison children
             continue
 
         a = ancestors[rev] or [rev]
@@ -105,7 +105,7 @@
 
         if y < perfect and rev not in skip: # all downhill from here?
             for c in children.get(rev, []):
-                poison[c] = True # poison children
+                poison.add(c) # poison children
             continue
 
         for c in children.get(rev, []):