# HG changeset patch # User Matt Mackall # Date 2009-06-13 23:08:51 # Node ID 14a0bdd59848859ed879c2702b2f0c4d611a8db5 # Parent 28eaf6f8abcee789e6aa15c1d81d870031232ee2 # Parent 2726a6df11e9495106e9889bb32db6ace956608e Merge with crew 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: @@ -355,9 +357,9 @@ def bisect(ui, repo, rev=None, extra=Non raise util.Abort(_("%s killed") % command) else: transition = "bad" - node = repo.lookup(rev or '.') - state[transition].append(node) - ui.note(_('Changeset %s: %s\n') % (short(node), transition)) + ctx = repo[rev or '.'] + state[transition].append(ctx.node()) + ui.status(_('Changeset %d:%s: %s\n') % (ctx, ctx, transition)) check_state(state, interactive=False) # bisect nodes, changesets, good = hbisect.bisect(repo.changelog, state) diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -473,7 +473,7 @@ class dirstate(object): # step 1: find all explicit files for ff in sorted(files): - nf = normalize(normpath(ff), True) + nf = normalize(normpath(ff), False) if nf in results: continue diff --git a/tests/test-bisect b/tests/test-bisect --- a/tests/test-bisect +++ b/tests/test-bisect @@ -82,3 +82,25 @@ hg bisect -s hg bisect -s hg bisect -s hg bisect -g + +set +e + +echo % test invalid command +hg bisect -r +hg bisect --command 'foobar' + +echo % test bisecting command +cat > script.py <