Show More
@@ -0,0 +1,153 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | # The tests in test-bisect are done on a linear history. | |||
|
4 | # Here the following repository history is used for testing: | |||
|
5 | # | |||
|
6 | # 17 | |||
|
7 | # | | |||
|
8 | # 18 16 | |||
|
9 | # \ / | |||
|
10 | # 15 | |||
|
11 | # / \ | |||
|
12 | # / \ | |||
|
13 | # 10 13 | |||
|
14 | # / \ | | |||
|
15 | # / \ | 14 | |||
|
16 | # 7 6 9 12 / | |||
|
17 | # \ / \ | |/ | |||
|
18 | # 4 \ | 11 | |||
|
19 | # \ \ | / | |||
|
20 | # 3 5 | / | |||
|
21 | # \ / |/ | |||
|
22 | # 2 8 | |||
|
23 | # \ / | |||
|
24 | # 1 | |||
|
25 | # | | |||
|
26 | # 0 | |||
|
27 | ||||
|
28 | set -e | |||
|
29 | ||||
|
30 | echo % init | |||
|
31 | hg init | |||
|
32 | ||||
|
33 | echo % committing changes | |||
|
34 | echo > a | |||
|
35 | echo '0' >> a | |||
|
36 | hg add a | |||
|
37 | hg ci -m "0" -d "0 0" | |||
|
38 | echo '1' >> a | |||
|
39 | hg ci -m "1" -d "1 0" | |||
|
40 | echo '2' >> a | |||
|
41 | hg ci -m "2" -d "2 0" | |||
|
42 | echo '3' >> a | |||
|
43 | hg ci -m "3" -d "3 0" | |||
|
44 | echo '4' >> a | |||
|
45 | hg ci -m "4" -d "4 0" | |||
|
46 | # create branch | |||
|
47 | hg up -r 2 | |||
|
48 | echo '5' >> b | |||
|
49 | hg add b | |||
|
50 | hg ci -m "5" -d "5 0" | |||
|
51 | ||||
|
52 | # merge | |||
|
53 | hg merge | |||
|
54 | hg ci -m "merge 4,5" -d "6 0" | |||
|
55 | ||||
|
56 | # create branch | |||
|
57 | hg up -r 4 | |||
|
58 | echo '7' > c | |||
|
59 | hg add c | |||
|
60 | hg ci -m "7" -d "7 0" | |||
|
61 | ||||
|
62 | # create branch | |||
|
63 | hg up -r 1 | |||
|
64 | echo '8' > d | |||
|
65 | hg add d | |||
|
66 | hg ci -m "8" -d "8 0" | |||
|
67 | echo '9' >> d | |||
|
68 | hg ci -m "9" -d "9 0" | |||
|
69 | ||||
|
70 | # merge | |||
|
71 | hg merge -r 6 | |||
|
72 | hg ci -m "merge 6,9" -d "10 0" | |||
|
73 | ||||
|
74 | # create branch | |||
|
75 | hg up -r 8 | |||
|
76 | echo '11' > e | |||
|
77 | hg add e | |||
|
78 | hg ci -m "11" -d "11 0" | |||
|
79 | echo '12' >> e | |||
|
80 | hg ci -m "12" -d "12 0" | |||
|
81 | echo '13' >> e | |||
|
82 | hg ci -m "13" -d "13 0" | |||
|
83 | ||||
|
84 | # create branch | |||
|
85 | hg up -r 11 | |||
|
86 | echo '14' > f | |||
|
87 | hg add f | |||
|
88 | hg ci -m "14" -d "14 0" | |||
|
89 | ||||
|
90 | # merge | |||
|
91 | hg up -r 13 -C | |||
|
92 | hg merge -r 10 | |||
|
93 | hg ci -m "merge 10,13" -d "15 0" | |||
|
94 | echo '16' >> e | |||
|
95 | hg ci -m "16" -d "16 0" | |||
|
96 | echo '17' >> e | |||
|
97 | hg ci -m "17" -d "17 0" | |||
|
98 | ||||
|
99 | # create branch | |||
|
100 | hg up -r 15 | |||
|
101 | echo '18' >> e | |||
|
102 | hg ci -m "18" -d "18 0" | |||
|
103 | ||||
|
104 | ||||
|
105 | echo % log | |||
|
106 | hg log | |||
|
107 | ||||
|
108 | echo % hg up -C | |||
|
109 | hg up -C | |||
|
110 | ||||
|
111 | echo % complex bisect test 1 # first bad rev is 9 | |||
|
112 | hg bisect -r | |||
|
113 | hg bisect -g 0 | |||
|
114 | hg bisect -b 17 # -> update to rev 6 | |||
|
115 | hg bisect -g # -> update to rev 13 | |||
|
116 | hg bisect -s # -> update to rev 10 | |||
|
117 | hg bisect -b # -> update to rev 8 | |||
|
118 | hg bisect -g # -> update to rev 9 | |||
|
119 | hg bisect -b | |||
|
120 | ||||
|
121 | echo % complex bisect test 2 # first good rev is 13 | |||
|
122 | hg bisect -r | |||
|
123 | hg bisect -g 18 | |||
|
124 | hg bisect -b 1 # -> update to rev 6 | |||
|
125 | hg bisect -s # -> update to rev 10 | |||
|
126 | hg bisect -b # -> update to rev 12 | |||
|
127 | hg bisect -b # -> update to rev 13 | |||
|
128 | hg bisect -g | |||
|
129 | ||||
|
130 | echo % complex bisect test 3 | |||
|
131 | # first bad rev is 15 | |||
|
132 | # 10,9,13 are skipped an might be the first bad revisions as well | |||
|
133 | hg bisect -r | |||
|
134 | hg bisect -g 1 | |||
|
135 | hg bisect -b 16 # -> update to rev 6 | |||
|
136 | hg bisect -g # -> update to rev 13 | |||
|
137 | hg bisect -s # -> update to rev 10 | |||
|
138 | hg bisect -s # -> update to rev 12 | |||
|
139 | hg bisect -g # -> update to rev 9 | |||
|
140 | hg bisect -s # -> update to rev 15 | |||
|
141 | hg bisect -b | |||
|
142 | ||||
|
143 | echo % complex bisect test 4 | |||
|
144 | # first good revision is 17 | |||
|
145 | # 15,16 are skipped an might be the first good revisions as well | |||
|
146 | hg bisect -r | |||
|
147 | hg bisect -g 17 | |||
|
148 | hg bisect -b 8 # -> update to rev 10 | |||
|
149 | hg bisect -b # -> update to rev 13 | |||
|
150 | hg bisect -b # -> update to rev 15 | |||
|
151 | hg bisect -s # -> update to rev 16 | |||
|
152 | hg bisect -s | |||
|
153 |
@@ -0,0 +1,229 b'' | |||||
|
1 | % init | |||
|
2 | % committing changes | |||
|
3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
4 | created new head | |||
|
5 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
6 | (branch merge, don't forget to commit) | |||
|
7 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
8 | created new head | |||
|
9 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
10 | created new head | |||
|
11 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
12 | (branch merge, don't forget to commit) | |||
|
13 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
14 | created new head | |||
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
16 | created new head | |||
|
17 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
18 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
19 | (branch merge, don't forget to commit) | |||
|
20 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
21 | created new head | |||
|
22 | % log | |||
|
23 | changeset: 18:d42e18c7bc9b | |||
|
24 | tag: tip | |||
|
25 | parent: 15:857b178a7cf3 | |||
|
26 | user: test | |||
|
27 | date: Thu Jan 01 00:00:18 1970 +0000 | |||
|
28 | summary: 18 | |||
|
29 | ||||
|
30 | changeset: 17:228c06deef46 | |||
|
31 | user: test | |||
|
32 | date: Thu Jan 01 00:00:17 1970 +0000 | |||
|
33 | summary: 17 | |||
|
34 | ||||
|
35 | changeset: 16:609d82a7ebae | |||
|
36 | user: test | |||
|
37 | date: Thu Jan 01 00:00:16 1970 +0000 | |||
|
38 | summary: 16 | |||
|
39 | ||||
|
40 | changeset: 15:857b178a7cf3 | |||
|
41 | parent: 13:b0a32c86eb31 | |||
|
42 | parent: 10:429fcd26f52d | |||
|
43 | user: test | |||
|
44 | date: Thu Jan 01 00:00:15 1970 +0000 | |||
|
45 | summary: merge 10,13 | |||
|
46 | ||||
|
47 | changeset: 14:faa450606157 | |||
|
48 | parent: 11:82ca6f06eccd | |||
|
49 | user: test | |||
|
50 | date: Thu Jan 01 00:00:14 1970 +0000 | |||
|
51 | summary: 14 | |||
|
52 | ||||
|
53 | changeset: 13:b0a32c86eb31 | |||
|
54 | user: test | |||
|
55 | date: Thu Jan 01 00:00:13 1970 +0000 | |||
|
56 | summary: 13 | |||
|
57 | ||||
|
58 | changeset: 12:9f259202bbe7 | |||
|
59 | user: test | |||
|
60 | date: Thu Jan 01 00:00:12 1970 +0000 | |||
|
61 | summary: 12 | |||
|
62 | ||||
|
63 | changeset: 11:82ca6f06eccd | |||
|
64 | parent: 8:dab8161ac8fc | |||
|
65 | user: test | |||
|
66 | date: Thu Jan 01 00:00:11 1970 +0000 | |||
|
67 | summary: 11 | |||
|
68 | ||||
|
69 | changeset: 10:429fcd26f52d | |||
|
70 | parent: 9:3c77083deb4a | |||
|
71 | parent: 6:a214d5d3811a | |||
|
72 | user: test | |||
|
73 | date: Thu Jan 01 00:00:10 1970 +0000 | |||
|
74 | summary: merge 6,9 | |||
|
75 | ||||
|
76 | changeset: 9:3c77083deb4a | |||
|
77 | user: test | |||
|
78 | date: Thu Jan 01 00:00:09 1970 +0000 | |||
|
79 | summary: 9 | |||
|
80 | ||||
|
81 | changeset: 8:dab8161ac8fc | |||
|
82 | parent: 1:4ca5088da217 | |||
|
83 | user: test | |||
|
84 | date: Thu Jan 01 00:00:08 1970 +0000 | |||
|
85 | summary: 8 | |||
|
86 | ||||
|
87 | changeset: 7:50c76098bbf2 | |||
|
88 | parent: 4:5c668c22234f | |||
|
89 | user: test | |||
|
90 | date: Thu Jan 01 00:00:07 1970 +0000 | |||
|
91 | summary: 7 | |||
|
92 | ||||
|
93 | changeset: 6:a214d5d3811a | |||
|
94 | parent: 5:385a529b6670 | |||
|
95 | parent: 4:5c668c22234f | |||
|
96 | user: test | |||
|
97 | date: Thu Jan 01 00:00:06 1970 +0000 | |||
|
98 | summary: merge 4,5 | |||
|
99 | ||||
|
100 | changeset: 5:385a529b6670 | |||
|
101 | parent: 2:051e12f87bf1 | |||
|
102 | user: test | |||
|
103 | date: Thu Jan 01 00:00:05 1970 +0000 | |||
|
104 | summary: 5 | |||
|
105 | ||||
|
106 | changeset: 4:5c668c22234f | |||
|
107 | user: test | |||
|
108 | date: Thu Jan 01 00:00:04 1970 +0000 | |||
|
109 | summary: 4 | |||
|
110 | ||||
|
111 | changeset: 3:0950834f0a9c | |||
|
112 | user: test | |||
|
113 | date: Thu Jan 01 00:00:03 1970 +0000 | |||
|
114 | summary: 3 | |||
|
115 | ||||
|
116 | changeset: 2:051e12f87bf1 | |||
|
117 | user: test | |||
|
118 | date: Thu Jan 01 00:00:02 1970 +0000 | |||
|
119 | summary: 2 | |||
|
120 | ||||
|
121 | changeset: 1:4ca5088da217 | |||
|
122 | user: test | |||
|
123 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
124 | summary: 1 | |||
|
125 | ||||
|
126 | changeset: 0:33b1f9bc8bc5 | |||
|
127 | user: test | |||
|
128 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
129 | summary: 0 | |||
|
130 | ||||
|
131 | % hg up -C | |||
|
132 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
133 | % complex bisect test 1 | |||
|
134 | Testing changeset 6:a214d5d3811a (15 changesets remaining, ~3 tests) | |||
|
135 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
136 | Testing changeset 13:b0a32c86eb31 (9 changesets remaining, ~3 tests) | |||
|
137 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
138 | Testing changeset 10:429fcd26f52d (9 changesets remaining, ~3 tests) | |||
|
139 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
140 | Testing changeset 8:dab8161ac8fc (3 changesets remaining, ~1 tests) | |||
|
141 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
142 | Testing changeset 9:3c77083deb4a (2 changesets remaining, ~1 tests) | |||
|
143 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
144 | The first bad revision is: | |||
|
145 | changeset: 9:3c77083deb4a | |||
|
146 | user: test | |||
|
147 | date: Thu Jan 01 00:00:09 1970 +0000 | |||
|
148 | summary: 9 | |||
|
149 | ||||
|
150 | % complex bisect test 2 | |||
|
151 | Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests) | |||
|
152 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
153 | Testing changeset 10:429fcd26f52d (13 changesets remaining, ~3 tests) | |||
|
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
155 | Testing changeset 12:9f259202bbe7 (5 changesets remaining, ~2 tests) | |||
|
156 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
157 | Testing changeset 13:b0a32c86eb31 (3 changesets remaining, ~1 tests) | |||
|
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
159 | The first good revision is: | |||
|
160 | changeset: 13:b0a32c86eb31 | |||
|
161 | user: test | |||
|
162 | date: Thu Jan 01 00:00:13 1970 +0000 | |||
|
163 | summary: 13 | |||
|
164 | ||||
|
165 | % complex bisect test 3 | |||
|
166 | Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests) | |||
|
167 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
168 | Testing changeset 13:b0a32c86eb31 (8 changesets remaining, ~3 tests) | |||
|
169 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
170 | Testing changeset 10:429fcd26f52d (8 changesets remaining, ~3 tests) | |||
|
171 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
172 | Testing changeset 12:9f259202bbe7 (8 changesets remaining, ~3 tests) | |||
|
173 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
174 | Testing changeset 9:3c77083deb4a (5 changesets remaining, ~2 tests) | |||
|
175 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
176 | Testing changeset 15:857b178a7cf3 (5 changesets remaining, ~2 tests) | |||
|
177 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
178 | Due to skipped revisions, the first bad revision could be any of: | |||
|
179 | changeset: 9:3c77083deb4a | |||
|
180 | user: test | |||
|
181 | date: Thu Jan 01 00:00:09 1970 +0000 | |||
|
182 | summary: 9 | |||
|
183 | ||||
|
184 | changeset: 10:429fcd26f52d | |||
|
185 | parent: 9:3c77083deb4a | |||
|
186 | parent: 6:a214d5d3811a | |||
|
187 | user: test | |||
|
188 | date: Thu Jan 01 00:00:10 1970 +0000 | |||
|
189 | summary: merge 6,9 | |||
|
190 | ||||
|
191 | changeset: 13:b0a32c86eb31 | |||
|
192 | user: test | |||
|
193 | date: Thu Jan 01 00:00:13 1970 +0000 | |||
|
194 | summary: 13 | |||
|
195 | ||||
|
196 | changeset: 15:857b178a7cf3 | |||
|
197 | parent: 13:b0a32c86eb31 | |||
|
198 | parent: 10:429fcd26f52d | |||
|
199 | user: test | |||
|
200 | date: Thu Jan 01 00:00:15 1970 +0000 | |||
|
201 | summary: merge 10,13 | |||
|
202 | ||||
|
203 | % complex bisect test 4 | |||
|
204 | Testing changeset 10:429fcd26f52d (13 changesets remaining, ~3 tests) | |||
|
205 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
206 | Testing changeset 13:b0a32c86eb31 (6 changesets remaining, ~2 tests) | |||
|
207 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
208 | Testing changeset 15:857b178a7cf3 (3 changesets remaining, ~1 tests) | |||
|
209 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
210 | Testing changeset 16:609d82a7ebae (3 changesets remaining, ~1 tests) | |||
|
211 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
212 | Due to skipped revisions, the first good revision could be any of: | |||
|
213 | changeset: 15:857b178a7cf3 | |||
|
214 | parent: 13:b0a32c86eb31 | |||
|
215 | parent: 10:429fcd26f52d | |||
|
216 | user: test | |||
|
217 | date: Thu Jan 01 00:00:15 1970 +0000 | |||
|
218 | summary: merge 10,13 | |||
|
219 | ||||
|
220 | changeset: 16:609d82a7ebae | |||
|
221 | user: test | |||
|
222 | date: Thu Jan 01 00:00:16 1970 +0000 | |||
|
223 | summary: 16 | |||
|
224 | ||||
|
225 | changeset: 17:228c06deef46 | |||
|
226 | user: test | |||
|
227 | date: Thu Jan 01 00:00:17 1970 +0000 | |||
|
228 | summary: 17 | |||
|
229 |
General Comments 0
You need to be logged in to leave comments.
Login now