Skip to content
Snippets Groups Projects
Commit 2b35ced8 authored by Patrick Mezard's avatar Patrick Mezard
Browse files

test-bisect: test --command option

parent ca14b398
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,8 @@
hg bisect -s
hg bisect -g
set +e
echo % test invalid command
hg bisect -r
hg bisect --command 'foobar'
......@@ -86,3 +88,19 @@
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
......@@ -305,3 +305,12 @@
% test invalid command
abort: cannot find executable: foobar
% test bisecting command
Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
The first good revision is:
changeset: 6:a3d5c6fdf0d3
user: test
date: Thu Jan 01 00:00:06 1970 +0000
summary: msg 6
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment