hgbook
view en/examples/bisect @ 171:8c1703a98266
Add a dependency on htlatex to HTML targets, even though we don't call it.
If the files it ships with aren't present, we can't build HTML.
If the files it ships with aren't present, we can't build HTML.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Mar 26 23:57:58 2007 -0700 (2007-03-26) |
parents | 08a4467f4891 |
children |
line source
1 #!/bin/bash
3 echo '[extensions]' >> $HGRC
4 echo 'hbisect =' >> $HGRC
6 # XXX There's some kind of horrible nondeterminism in the execution of
7 # bisect at the moment. Ugh.
9 #$ ignore: .*
11 #$ name: init
13 hg init mybug
14 cd mybug
16 #$ name: commits
18 buggy_change=37
20 for (( i = 0; i < 50; i++ )); do
21 if [[ $i = $buggy_change ]]; then
22 echo 'i have a gub' > myfile$i
23 hg commit -q -A -m 'buggy changeset'
24 else
25 echo 'nothing to see here, move along' > myfile$i
26 hg commit -q -A -m 'normal changeset'
27 fi
28 done
30 #$ name: help
32 hg help bisect
33 hg bisect help
35 #$ name: search.init
37 hg bisect init
39 #$ name: search.bad-init
41 hg bisect bad
43 #$ name: search.good-init
45 hg bisect good 10
47 #$ name: search.step1
49 if grep -q 'i have a gub' *
50 then
51 result=bad
52 else
53 result=good
54 fi
56 echo this revision is $result
57 hg bisect $result
59 #$ name: search.mytest
61 mytest() {
62 if grep -q 'i have a gub' *
63 then
64 result=bad
65 else
66 result=good
67 fi
69 echo this revision is $result
70 hg bisect $result
71 }
73 #$ name: search.step2
75 mytest
77 #$ name: search.rest
79 mytest
80 mytest
81 mytest
83 #$ name: search.reset
85 hg bisect reset
87 #$ name:
89 exit 0