mercurial/hbisect.py
changeset 35130 8287df8b7be5
parent 35129 ec25c8275cfa
child 36828 80da79b6fbe4
--- a/mercurial/hbisect.py	Thu Nov 23 14:12:55 2017 -0800
+++ b/mercurial/hbisect.py	Thu Nov 23 14:13:14 2017 -0800
@@ -38,7 +38,7 @@
 
     def buildancestors(bad, good):
         badrev = min([changelog.rev(n) for n in bad])
-        ancestors = [None] * (len(changelog) + 1)
+        ancestors = collections.defaultdict(lambda: None)
         for rev in repo.revs("descendants(%ln) - ancestors(%ln)", good, good):
             ancestors[rev] = []
         if ancestors[badrev] is None: