# HG changeset patch # User Patrick Mezard # Date 2009-06-13 20:42:13 # Node ID ca14b3982ffe6bfc5c692d79f6f31bfea13b8f70 # Parent 1c610db4a8970fc36d1c1a414aeaf3e8e6d2a5f9 bisect: fix traceback when command executable is not found diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -339,6 +339,8 @@ def bisect(ui, repo, rev=None, extra=Non if command: commandpath = util.find_exe(command) + if commandpath is None: + raise util.Abort(_("cannot find executable: %s") % command) changesets = 1 try: while changesets: diff --git a/tests/test-bisect b/tests/test-bisect --- a/tests/test-bisect +++ b/tests/test-bisect @@ -82,3 +82,7 @@ hg bisect -s hg bisect -s hg bisect -s hg bisect -g + +echo % test invalid command +hg bisect -r +hg bisect --command 'foobar' diff --git a/tests/test-bisect.out b/tests/test-bisect.out --- a/tests/test-bisect.out +++ b/tests/test-bisect.out @@ -303,3 +303,5 @@ user: test date: Thu Jan 01 00:00:06 1970 +0000 summary: msg 6 +% test invalid command +abort: cannot find executable: foobar