Mercurial > public > mercurial-scm > hg
diff tests/test-bisect @ 8803:2b35ced86b69
test-bisect: test --command option
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 13 Jun 2009 22:42:15 +0200 |
parents | ca14b3982ffe |
children | 807633f1e3c2 |
line wrap: on
line diff
--- a/tests/test-bisect Sat Jun 13 22:42:13 2009 +0200 +++ b/tests/test-bisect Sat Jun 13 22:42:15 2009 +0200 @@ -83,6 +83,24 @@ 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 <<EOF +#!/usr/bin/env python +import sys +from mercurial import ui, hg +repo = hg.repository(ui.ui(), '.') +if repo['.'].rev() < 6: + sys.exit(1) +EOF +chmod +x script.py +hg bisect -r +hg bisect --good tip +hg bisect --bad 0 +hg bisect --command "`pwd`/script.py" +true