# HG changeset patch # User Patrick Mezard # Date 1244925733 -7200 # Node ID ca14b3982ffe6bfc5c692d79f6f31bfea13b8f70 # Parent 1c610db4a8970fc36d1c1a414aeaf3e8e6d2a5f9 bisect: fix traceback when command executable is not found diff -r 1c610db4a897 -r ca14b3982ffe mercurial/commands.py --- a/mercurial/commands.py Sat May 23 20:38:08 2009 +0900 +++ b/mercurial/commands.py Sat Jun 13 22:42:13 2009 +0200 @@ -339,6 +339,8 @@ 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 -r 1c610db4a897 -r ca14b3982ffe tests/test-bisect --- a/tests/test-bisect Sat May 23 20:38:08 2009 +0900 +++ b/tests/test-bisect Sat Jun 13 22:42:13 2009 +0200 @@ -82,3 +82,7 @@ hg bisect -s hg bisect -s hg bisect -g + +echo % test invalid command +hg bisect -r +hg bisect --command 'foobar' diff -r 1c610db4a897 -r ca14b3982ffe tests/test-bisect.out --- a/tests/test-bisect.out Sat May 23 20:38:08 2009 +0900 +++ b/tests/test-bisect.out Sat Jun 13 22:42:13 2009 +0200 @@ -303,3 +303,5 @@ date: Thu Jan 01 00:00:06 1970 +0000 summary: msg 6 +% test invalid command +abort: cannot find executable: foobar