# HG changeset patch # User Mads Kiilerich # Date 2013-11-10 17:51:21 # Node ID 06ef32c3b4bb2974749eefa171434903fe887e46 # Parent 1dee888b22f7fd4ee6bed29860ee8c57da08a552 bisect: report "both good and bad" as such, not as "not directly related" diff --git a/mercurial/hbisect.py b/mercurial/hbisect.py --- a/mercurial/hbisect.py +++ b/mercurial/hbisect.py @@ -62,7 +62,8 @@ def bisect(changelog, state): 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))) diff --git a/tests/test-bisect.t b/tests/test-bisect.t --- a/tests/test-bisect.t +++ b/tests/test-bisect.t @@ -280,7 +280,7 @@ skip $ 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