# HG changeset patch # User Matt Mackall # Date 2010-08-20 22:16:37 # Node ID c6b1be675d3cd4b9c76a8e5f0641d61700431ded # Parent 31dde4c3bb83fc042b7ed1341b536eea39431ce8 bisect: better message for unrelated starting revisions diff --git a/mercurial/hbisect.py b/mercurial/hbisect.py --- a/mercurial/hbisect.py +++ b/mercurial/hbisect.py @@ -61,6 +61,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: + raise util.Abort(_("starting revisions are not directly related")) raise util.Abort(_("Inconsistent state, %s:%s is good and bad") % (badrev, short(bad)))