bisect: report "both good and bad" as such, not as "not directly related" stable
authorMads Kiilerich <madski@unity3d.com>
Sun, 10 Nov 2013 18:51:21 +0100
branchstable
changeset 20094 06ef32c3b4bb
parent 20093 1dee888b22f7
child 20095 1c46b18b0e1c
child 20096 88e172871ad7
bisect: report "both good and bad" as such, not as "not directly related"
mercurial/hbisect.py
tests/test-bisect.t
--- a/mercurial/hbisect.py	Fri Nov 08 11:49:13 2013 +0100
+++ b/mercurial/hbisect.py	Sun Nov 10 18:51:21 2013 +0100
@@ -62,7 +62,8 @@
         badrev, ancestors = buildancestors(state['good'], state['bad'])
     bad = changelog.node(badrev)
     if not ancestors: # now we're confused
-        if len(state['bad']) == 1 and len(state['good']) == 1:
+        if (len(state['bad']) == 1 and len(state['good']) == 1 and
+            state['bad'] != state['good']):
             raise util.Abort(_("starting revisions are not directly related"))
         raise util.Abort(_("inconsistent state, %s:%s is good and bad")
                          % (badrev, short(bad)))
--- a/tests/test-bisect.t	Fri Nov 08 11:49:13 2013 +0100
+++ b/tests/test-bisect.t	Sun Nov 10 18:51:21 2013 +0100
@@ -280,7 +280,7 @@
   $ hg bisect -r
   $ hg bisect -g tip
   $ hg bisect -b tip
-  abort: starting revisions are not directly related
+  abort: inconsistent state, 31:58c80a7c8a40 is good and bad
   [255]
 
   $ hg bisect -r