diff mercurial/commands.py @ 6983:5ce625983208

bisect: only complain when nothing can be done
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 03 Sep 2008 19:00:43 +0200
parents 1b15d6e7cc3c
children 6c4a08270222 e3f9feb9ab7e
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Sep 03 19:01:35 2008 +0200
+++ b/mercurial/commands.py	Wed Sep 03 19:00:43 2008 +0200
@@ -286,9 +286,6 @@
             reset = True
     elif extra or good + bad + skip + reset > 1:
         raise util.Abort(_('incompatible arguments'))
-    elif not (good or bad or skip or reset):
-        ui.status(_('(no action selected)\n'))
-        return
 
     if reset:
         p = repo.join("bisect.state")
@@ -327,7 +324,12 @@
         del wlock
 
     if not state['good'] or not state['bad']:
-        return
+        if (good or bad or skip or reset):
+            return
+        if not state['good']:
+            raise util.Abort(_('cannot bisect (no known good revisions)'))
+        else:
+            raise util.Abort(_('cannot bisect (no known bad revisions)'))
 
     # actually bisect
     nodes, changesets, good = hbisect.bisect(repo.changelog, state)