Mercurial > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
8802:ca14b3982ffe | 8803:2b35ced86b69 |
---|---|
81 hg bisect -s | 81 hg bisect -s |
82 hg bisect -s | 82 hg bisect -s |
83 hg bisect -s | 83 hg bisect -s |
84 hg bisect -g | 84 hg bisect -g |
85 | 85 |
86 set +e | |
87 | |
86 echo % test invalid command | 88 echo % test invalid command |
87 hg bisect -r | 89 hg bisect -r |
88 hg bisect --command 'foobar' | 90 hg bisect --command 'foobar' |
91 | |
92 echo % test bisecting command | |
93 cat > script.py <<EOF | |
94 #!/usr/bin/env python | |
95 import sys | |
96 from mercurial import ui, hg | |
97 repo = hg.repository(ui.ui(), '.') | |
98 if repo['.'].rev() < 6: | |
99 sys.exit(1) | |
100 EOF | |
101 chmod +x script.py | |
102 hg bisect -r | |
103 hg bisect --good tip | |
104 hg bisect --bad 0 | |
105 hg bisect --command "`pwd`/script.py" | |
106 true |