hbisect: use set.update for bulk updates
authorMartin Geisler <mg@lazybytes.net>
Sun, 17 May 2009 16:57:12 +0200
changeset 8482 fc27c91fff2c
parent 8481 a9dab5a0f85b
child 8483 221786b9ce34
hbisect: use set.update for bulk updates
mercurial/hbisect.py
--- a/mercurial/hbisect.py	Sun May 17 16:56:53 2009 +0200
+++ b/mercurial/hbisect.py	Sun May 17 16:57:12 2009 +0200
@@ -87,8 +87,8 @@
     poison = set()
     for rev in candidates:
         if rev in poison:
-            for c in children.get(rev, []):
-                poison.add(c) # poison children
+            # poison children
+            poison.update(children.get(rev, []))
             continue
 
         a = ancestors[rev] or [rev]
@@ -104,8 +104,8 @@
                 break
 
         if y < perfect and rev not in skip: # all downhill from here?
-            for c in children.get(rev, []):
-                poison.add(c) # poison children
+            # poison children
+            poison.update(children.get(rev, []))
             continue
 
         for c in children.get(rev, []):