annotate en/examples/bisect @ 653:91adcea08b33

Fix the bisect section, I hope (bisect is now part of Mercurial).
author Arne Babenhauserheide <bab@draketo.de>
date Wed, 21 Jan 2009 14:16:38 +0100
parents 7a6bd93174bd
children b08f6a61bf15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 #!/bin/bash
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
653
91adcea08b33 Fix the bisect section, I hope (bisect is now part of Mercurial).
Arne Babenhauserheide <bab@draketo.de>
parents: 282
diff changeset
3 # Don't add the bisect extension. That's not needed anymore.
91adcea08b33 Fix the bisect section, I hope (bisect is now part of Mercurial).
Arne Babenhauserheide <bab@draketo.de>
parents: 282
diff changeset
4 #echo '[extensions]' >> $HGRC
91adcea08b33 Fix the bisect section, I hope (bisect is now part of Mercurial).
Arne Babenhauserheide <bab@draketo.de>
parents: 282
diff changeset
5 #echo 'hbisect =' >> $HGRC
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6
145
4aecfa5c3ab0 Drop all output from bisect.
Bryan O'Sullivan <bos@serpentine.com>
parents: 131
diff changeset
7 # XXX There's some kind of horrible nondeterminism in the execution of
4aecfa5c3ab0 Drop all output from bisect.
Bryan O'Sullivan <bos@serpentine.com>
parents: 131
diff changeset
8 # bisect at the moment. Ugh.
4aecfa5c3ab0 Drop all output from bisect.
Bryan O'Sullivan <bos@serpentine.com>
parents: 131
diff changeset
9
4aecfa5c3ab0 Drop all output from bisect.
Bryan O'Sullivan <bos@serpentine.com>
parents: 131
diff changeset
10 #$ ignore: .*
4aecfa5c3ab0 Drop all output from bisect.
Bryan O'Sullivan <bos@serpentine.com>
parents: 131
diff changeset
11
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12 #$ name: init
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
14 hg init mybug
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15 cd mybug
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
16
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17 #$ name: commits
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
18
190
cd066590e2e3 Another hopeless attempt at bisect stability.
Bryan O'Sullivan <bos@serpentine.com>
parents: 147
diff changeset
19 buggy_change=22
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20
190
cd066590e2e3 Another hopeless attempt at bisect stability.
Bryan O'Sullivan <bos@serpentine.com>
parents: 147
diff changeset
21 for (( i = 0; i < 35; i++ )); do
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
22 if [[ $i = $buggy_change ]]; then
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
23 echo 'i have a gub' > myfile$i
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
24 hg commit -q -A -m 'buggy changeset'
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
25 else
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
26 echo 'nothing to see here, move along' > myfile$i
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
27 hg commit -q -A -m 'normal changeset'
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
28 fi
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
29 done
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
30
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
31 #$ name: help
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
32
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
33 hg help bisect
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
34
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
35 #$ name: search.init
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
36
282
7a6bd93174bd Update bisect docs
Bryan O'Sullivan <bos@serpentine.com>
parents: 190
diff changeset
37 hg bisect --init
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
38
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
39 #$ name: search.bad-init
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
40
282
7a6bd93174bd Update bisect docs
Bryan O'Sullivan <bos@serpentine.com>
parents: 190
diff changeset
41 hg bisect --bad
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
42
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
43 #$ name: search.good-init
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
44
282
7a6bd93174bd Update bisect docs
Bryan O'Sullivan <bos@serpentine.com>
parents: 190
diff changeset
45 hg bisect --good 10
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
46
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
47 #$ name: search.step1
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
48
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
49 if grep -q 'i have a gub' *
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
50 then
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
51 result=bad
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
52 else
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
53 result=good
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
54 fi
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
55
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
56 echo this revision is $result
282
7a6bd93174bd Update bisect docs
Bryan O'Sullivan <bos@serpentine.com>
parents: 190
diff changeset
57 hg bisect --$result
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
58
131
153efeaa8f57 Fix stupid build bugs.
Bryan O'Sullivan <bos@serpentine.com>
parents: 130
diff changeset
59 #$ name: search.mytest
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
60
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
61 mytest() {
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
62 if grep -q 'i have a gub' *
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
63 then
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
64 result=bad
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
65 else
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
66 result=good
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
67 fi
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
68
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
69 echo this revision is $result
282
7a6bd93174bd Update bisect docs
Bryan O'Sullivan <bos@serpentine.com>
parents: 190
diff changeset
70 hg bisect --$result
130
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
71 }
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
72
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
73 #$ name: search.step2
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
74
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
75 mytest
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
76
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
77 #$ name: search.rest
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
78
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
79 mytest
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
80 mytest
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
81 mytest
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
82
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
83 #$ name: search.reset
26b7a4e943aa Describe the bisect extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
84
282
7a6bd93174bd Update bisect docs
Bryan O'Sullivan <bos@serpentine.com>
parents: 190
diff changeset
85 hg bisect --reset
147
e985873a9d1a Work around bisect sometimes failing.
Bryan O'Sullivan <bos@serpentine.com>
parents: 145
diff changeset
86
e985873a9d1a Work around bisect sometimes failing.
Bryan O'Sullivan <bos@serpentine.com>
parents: 145
diff changeset
87 #$ name:
e985873a9d1a Work around bisect sometimes failing.
Bryan O'Sullivan <bos@serpentine.com>
parents: 145
diff changeset
88
e985873a9d1a Work around bisect sometimes failing.
Bryan O'Sullivan <bos@serpentine.com>
parents: 145
diff changeset
89 exit 0