diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -268,10 +268,13 @@ def bisect(ui, repo, rev=None, extra=Non To use, mark the earliest changeset you know exhibits the problem as bad, then mark the latest changeset which is free from the problem as good. Bisect will update your working directory to a - revision for testing. Once you have performed tests, mark the - working directory as bad or good and bisect will either update to - another candidate changeset or announce that it has found the bad - revision. + revision for testing (unless the --noupdate option is specified). + Once you have performed tests, mark the working directory as bad + or good and bisect will either update to another candidate changeset + or announce that it has found the bad revision. + + As a shortcut, you can also use the revision argument to mark a + revision as good or bad without checking it out first. """ # backward compatibility if rev in "good bad reset init".split(): @@ -284,7 +287,10 @@ def bisect(ui, repo, rev=None, extra=Non else: reset = True elif extra or good + bad + skip + reset > 1: - raise util.Abort("Incompatible arguments") + 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") diff --git a/tests/test-bisect b/tests/test-bisect --- a/tests/test-bisect +++ b/tests/test-bisect @@ -55,6 +55,9 @@ hg bisect -g null hg bisect -bU tip hg id +echo % test no action message +hg bisect + # reproduce AssertionError (issue1228 and issue1182) hg bisect -r hg bisect -b 4 diff --git a/tests/test-bisect.out b/tests/test-bisect.out --- a/tests/test-bisect.out +++ b/tests/test-bisect.out @@ -241,6 +241,8 @@ abort: Inconsistent state, 31:58c80a7c8a error Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests) 5cd978ea5149 +% test no action message +(no action selected) Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests)