mercurial/hbisect.py
changeset 5777 51776e50bc8c
parent 5776 35ec669cdd43
child 6217 fe8dbbe9520d
--- a/mercurial/hbisect.py	Mon Dec 31 18:20:34 2007 -0600
+++ b/mercurial/hbisect.py	Mon Dec 31 18:20:34 2007 -0600
@@ -30,7 +30,7 @@
                     ancestors[prev] = None
 
         if ancestors[badrev] is None:
-            return None, None
+            return badrev, None
         return badrev, ancestors
 
     good = 0
@@ -38,10 +38,10 @@
     if not ancestors: # looking for bad to good transition?
         good = 1
         badrev, ancestors = buildancestors(state['good'], state['bad'])
+    bad = changelog.node(badrev)
     if not ancestors: # now we're confused
         raise util.Abort(_("Inconsistent state, %s:%s is good and bad")
                          % (badrev, hg.short(bad)))
-    bad = changelog.node(badrev)
 
     # build children dict
     children = {}