comparison ja/examples/bisect @ 290:b0db5adf11c1 ja_root

fork Japanese translation.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 06 Feb 2008 17:43:11 +0900
parents en/examples/bisect@7a6bd93174bd
children b7cdede6065f
comparison
equal deleted inserted replaced
289:7be02466421b 290:b0db5adf11c1
1 #!/bin/bash
2
3 echo '[extensions]' >> $HGRC
4 echo 'hbisect =' >> $HGRC
5
6 # XXX There's some kind of horrible nondeterminism in the execution of
7 # bisect at the moment. Ugh.
8
9 #$ ignore: .*
10
11 #$ name: init
12
13 hg init mybug
14 cd mybug
15
16 #$ name: commits
17
18 buggy_change=22
19
20 for (( i = 0; i < 35; 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
29
30 #$ name: help
31
32 hg help bisect
33
34 #$ name: search.init
35
36 hg bisect --init
37
38 #$ name: search.bad-init
39
40 hg bisect --bad
41
42 #$ name: search.good-init
43
44 hg bisect --good 10
45
46 #$ name: search.step1
47
48 if grep -q 'i have a gub' *
49 then
50 result=bad
51 else
52 result=good
53 fi
54
55 echo this revision is $result
56 hg bisect --$result
57
58 #$ name: search.mytest
59
60 mytest() {
61 if grep -q 'i have a gub' *
62 then
63 result=bad
64 else
65 result=good
66 fi
67
68 echo this revision is $result
69 hg bisect --$result
70 }
71
72 #$ name: search.step2
73
74 mytest
75
76 #$ name: search.rest
77
78 mytest
79 mytest
80 mytest
81
82 #$ name: search.reset
83
84 hg bisect --reset
85
86 #$ name:
87
88 exit 0