Mercurial > hg
comparison tests/test-bisect2.t @ 11860:56c7c3209e1a
tests: unify test-bisect2
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 14 Aug 2010 02:55:54 +0200 |
parents | tests/test-bisect2@9369095779a1 |
children | 652f71b235bf |
comparison
equal
deleted
inserted
replaced
11859:f48178034569 | 11860:56c7c3209e1a |
---|---|
1 # The tests in test-bisect are done on a linear history. Here the | |
2 # following repository history is used for testing: | |
3 # | |
4 # 17 | |
5 # | | |
6 # 18 16 | |
7 # \ / | |
8 # 15 | |
9 # / \ | |
10 # / \ | |
11 # 10 13 | |
12 # / \ | | |
13 # / \ | 14 | |
14 # 7 6 9 12 / | |
15 # \ / \ | |/ | |
16 # 4 \ | 11 | |
17 # \ \ | / | |
18 # 3 5 | / | |
19 # \ / |/ | |
20 # 2 8 | |
21 # \ / | |
22 # 1 | |
23 # | | |
24 # 0 | |
25 | |
26 | |
27 $ set -e | |
28 | |
29 init | |
30 | |
31 $ hg init | |
32 | |
33 committing changes | |
34 | |
35 $ echo > a | |
36 $ echo '0' >> a | |
37 $ hg add a | |
38 $ hg ci -m "0" -d "0 0" | |
39 $ echo '1' >> a | |
40 $ hg ci -m "1" -d "1 0" | |
41 $ echo '2' >> a | |
42 $ hg ci -m "2" -d "2 0" | |
43 $ echo '3' >> a | |
44 $ hg ci -m "3" -d "3 0" | |
45 $ echo '4' >> a | |
46 $ hg ci -m "4" -d "4 0" | |
47 | |
48 create branch | |
49 | |
50 $ hg up -r 2 | |
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
52 $ echo '5' >> b | |
53 $ hg add b | |
54 $ hg ci -m "5" -d "5 0" | |
55 created new head | |
56 | |
57 merge | |
58 | |
59 $ hg merge | |
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
61 (branch merge, don't forget to commit) | |
62 $ hg ci -m "merge 4,5" -d "6 0" | |
63 | |
64 create branch | |
65 | |
66 $ hg up -r 4 | |
67 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
68 $ echo '7' > c | |
69 $ hg add c | |
70 $ hg ci -m "7" -d "7 0" | |
71 created new head | |
72 | |
73 create branch | |
74 | |
75 $ hg up -r 1 | |
76 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
77 $ echo '8' > d | |
78 $ hg add d | |
79 $ hg ci -m "8" -d "8 0" | |
80 created new head | |
81 $ echo '9' >> d | |
82 $ hg ci -m "9" -d "9 0" | |
83 | |
84 merge | |
85 | |
86 $ hg merge -r 6 | |
87 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 (branch merge, don't forget to commit) | |
89 $ hg ci -m "merge 6,9" -d "10 0" | |
90 | |
91 create branch | |
92 | |
93 $ hg up -r 8 | |
94 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
95 $ echo '11' > e | |
96 $ hg add e | |
97 $ hg ci -m "11" -d "11 0" | |
98 created new head | |
99 $ echo '12' >> e | |
100 $ hg ci -m "12" -d "12 0" | |
101 $ echo '13' >> e | |
102 $ hg ci -m "13" -d "13 0" | |
103 | |
104 create branch | |
105 | |
106 $ hg up -r 11 | |
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 $ echo '14' > f | |
109 $ hg add f | |
110 $ hg ci -m "14" -d "14 0" | |
111 created new head | |
112 | |
113 merge | |
114 | |
115 $ hg up -r 13 -C | |
116 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
117 $ hg merge -r 10 | |
118 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
119 (branch merge, don't forget to commit) | |
120 $ hg ci -m "merge 10,13" -d "15 0" | |
121 $ echo '16' >> e | |
122 $ hg ci -m "16" -d "16 0" | |
123 $ echo '17' >> e | |
124 $ hg ci -m "17" -d "17 0" | |
125 | |
126 create branch | |
127 | |
128 $ hg up -r 15 | |
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
130 $ echo '18' >> e | |
131 $ hg ci -m "18" -d "18 0" | |
132 created new head | |
133 | |
134 log | |
135 | |
136 $ hg log | |
137 changeset: 18:d42e18c7bc9b | |
138 tag: tip | |
139 parent: 15:857b178a7cf3 | |
140 user: test | |
141 date: Thu Jan 01 00:00:18 1970 +0000 | |
142 summary: 18 | |
143 | |
144 changeset: 17:228c06deef46 | |
145 user: test | |
146 date: Thu Jan 01 00:00:17 1970 +0000 | |
147 summary: 17 | |
148 | |
149 changeset: 16:609d82a7ebae | |
150 user: test | |
151 date: Thu Jan 01 00:00:16 1970 +0000 | |
152 summary: 16 | |
153 | |
154 changeset: 15:857b178a7cf3 | |
155 parent: 13:b0a32c86eb31 | |
156 parent: 10:429fcd26f52d | |
157 user: test | |
158 date: Thu Jan 01 00:00:15 1970 +0000 | |
159 summary: merge 10,13 | |
160 | |
161 changeset: 14:faa450606157 | |
162 parent: 11:82ca6f06eccd | |
163 user: test | |
164 date: Thu Jan 01 00:00:14 1970 +0000 | |
165 summary: 14 | |
166 | |
167 changeset: 13:b0a32c86eb31 | |
168 user: test | |
169 date: Thu Jan 01 00:00:13 1970 +0000 | |
170 summary: 13 | |
171 | |
172 changeset: 12:9f259202bbe7 | |
173 user: test | |
174 date: Thu Jan 01 00:00:12 1970 +0000 | |
175 summary: 12 | |
176 | |
177 changeset: 11:82ca6f06eccd | |
178 parent: 8:dab8161ac8fc | |
179 user: test | |
180 date: Thu Jan 01 00:00:11 1970 +0000 | |
181 summary: 11 | |
182 | |
183 changeset: 10:429fcd26f52d | |
184 parent: 9:3c77083deb4a | |
185 parent: 6:a214d5d3811a | |
186 user: test | |
187 date: Thu Jan 01 00:00:10 1970 +0000 | |
188 summary: merge 6,9 | |
189 | |
190 changeset: 9:3c77083deb4a | |
191 user: test | |
192 date: Thu Jan 01 00:00:09 1970 +0000 | |
193 summary: 9 | |
194 | |
195 changeset: 8:dab8161ac8fc | |
196 parent: 1:4ca5088da217 | |
197 user: test | |
198 date: Thu Jan 01 00:00:08 1970 +0000 | |
199 summary: 8 | |
200 | |
201 changeset: 7:50c76098bbf2 | |
202 parent: 4:5c668c22234f | |
203 user: test | |
204 date: Thu Jan 01 00:00:07 1970 +0000 | |
205 summary: 7 | |
206 | |
207 changeset: 6:a214d5d3811a | |
208 parent: 5:385a529b6670 | |
209 parent: 4:5c668c22234f | |
210 user: test | |
211 date: Thu Jan 01 00:00:06 1970 +0000 | |
212 summary: merge 4,5 | |
213 | |
214 changeset: 5:385a529b6670 | |
215 parent: 2:051e12f87bf1 | |
216 user: test | |
217 date: Thu Jan 01 00:00:05 1970 +0000 | |
218 summary: 5 | |
219 | |
220 changeset: 4:5c668c22234f | |
221 user: test | |
222 date: Thu Jan 01 00:00:04 1970 +0000 | |
223 summary: 4 | |
224 | |
225 changeset: 3:0950834f0a9c | |
226 user: test | |
227 date: Thu Jan 01 00:00:03 1970 +0000 | |
228 summary: 3 | |
229 | |
230 changeset: 2:051e12f87bf1 | |
231 user: test | |
232 date: Thu Jan 01 00:00:02 1970 +0000 | |
233 summary: 2 | |
234 | |
235 changeset: 1:4ca5088da217 | |
236 user: test | |
237 date: Thu Jan 01 00:00:01 1970 +0000 | |
238 summary: 1 | |
239 | |
240 changeset: 0:33b1f9bc8bc5 | |
241 user: test | |
242 date: Thu Jan 01 00:00:00 1970 +0000 | |
243 summary: 0 | |
244 | |
245 | |
246 hg up -C | |
247 | |
248 $ hg up -C | |
249 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
250 | |
251 complex bisect test 1 # first bad rev is 9 | |
252 | |
253 $ hg bisect -r | |
254 $ hg bisect -g 0 | |
255 $ hg bisect -b 17 # -> update to rev 6 | |
256 Testing changeset 6:a214d5d3811a (15 changesets remaining, ~3 tests) | |
257 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
258 $ hg bisect -g # -> update to rev 13 | |
259 Testing changeset 13:b0a32c86eb31 (9 changesets remaining, ~3 tests) | |
260 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
261 $ hg bisect -s # -> update to rev 10 | |
262 Testing changeset 10:429fcd26f52d (9 changesets remaining, ~3 tests) | |
263 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
264 $ hg bisect -b # -> update to rev 8 | |
265 Testing changeset 8:dab8161ac8fc (3 changesets remaining, ~1 tests) | |
266 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
267 $ hg bisect -g # -> update to rev 9 | |
268 Testing changeset 9:3c77083deb4a (2 changesets remaining, ~1 tests) | |
269 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
270 $ hg bisect -b | |
271 The first bad revision is: | |
272 changeset: 9:3c77083deb4a | |
273 user: test | |
274 date: Thu Jan 01 00:00:09 1970 +0000 | |
275 summary: 9 | |
276 | |
277 | |
278 complex bisect test 2 # first good rev is 13 | |
279 | |
280 $ hg bisect -r | |
281 $ hg bisect -g 18 | |
282 $ hg bisect -b 1 # -> update to rev 6 | |
283 Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests) | |
284 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
285 $ hg bisect -s # -> update to rev 10 | |
286 Testing changeset 10:429fcd26f52d (13 changesets remaining, ~3 tests) | |
287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
288 $ hg bisect -b # -> update to rev 12 | |
289 Testing changeset 12:9f259202bbe7 (5 changesets remaining, ~2 tests) | |
290 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
291 $ hg bisect -b # -> update to rev 13 | |
292 Testing changeset 13:b0a32c86eb31 (3 changesets remaining, ~1 tests) | |
293 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
294 $ hg bisect -g | |
295 The first good revision is: | |
296 changeset: 13:b0a32c86eb31 | |
297 user: test | |
298 date: Thu Jan 01 00:00:13 1970 +0000 | |
299 summary: 13 | |
300 | |
301 | |
302 complex bisect test 3 | |
303 | |
304 first bad rev is 15 | |
305 10,9,13 are skipped an might be the first bad revisions as well | |
306 | |
307 $ hg bisect -r | |
308 $ hg bisect -g 1 | |
309 $ hg bisect -b 16 # -> update to rev 6 | |
310 Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests) | |
311 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
312 $ hg bisect -g # -> update to rev 13 | |
313 Testing changeset 13:b0a32c86eb31 (8 changesets remaining, ~3 tests) | |
314 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
315 $ hg bisect -s # -> update to rev 10 | |
316 Testing changeset 10:429fcd26f52d (8 changesets remaining, ~3 tests) | |
317 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
318 $ hg bisect -s # -> update to rev 12 | |
319 Testing changeset 12:9f259202bbe7 (8 changesets remaining, ~3 tests) | |
320 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
321 $ hg bisect -g # -> update to rev 9 | |
322 Testing changeset 9:3c77083deb4a (5 changesets remaining, ~2 tests) | |
323 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
324 $ hg bisect -s # -> update to rev 15 | |
325 Testing changeset 15:857b178a7cf3 (5 changesets remaining, ~2 tests) | |
326 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
327 $ hg bisect -b | |
328 Due to skipped revisions, the first bad revision could be any of: | |
329 changeset: 9:3c77083deb4a | |
330 user: test | |
331 date: Thu Jan 01 00:00:09 1970 +0000 | |
332 summary: 9 | |
333 | |
334 changeset: 10:429fcd26f52d | |
335 parent: 9:3c77083deb4a | |
336 parent: 6:a214d5d3811a | |
337 user: test | |
338 date: Thu Jan 01 00:00:10 1970 +0000 | |
339 summary: merge 6,9 | |
340 | |
341 changeset: 13:b0a32c86eb31 | |
342 user: test | |
343 date: Thu Jan 01 00:00:13 1970 +0000 | |
344 summary: 13 | |
345 | |
346 changeset: 15:857b178a7cf3 | |
347 parent: 13:b0a32c86eb31 | |
348 parent: 10:429fcd26f52d | |
349 user: test | |
350 date: Thu Jan 01 00:00:15 1970 +0000 | |
351 summary: merge 10,13 | |
352 | |
353 | |
354 complex bisect test 4 | |
355 | |
356 first good revision is 17 | |
357 15,16 are skipped an might be the first good revisions as well | |
358 | |
359 $ hg bisect -r | |
360 $ hg bisect -g 17 | |
361 $ hg bisect -b 8 # -> update to rev 10 | |
362 Testing changeset 13:b0a32c86eb31 (8 changesets remaining, ~3 tests) | |
363 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
364 $ hg bisect -b # -> update to rev 13 | |
365 Testing changeset 10:429fcd26f52d (5 changesets remaining, ~2 tests) | |
366 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
367 $ hg bisect -b # -> update to rev 15 | |
368 Testing changeset 15:857b178a7cf3 (3 changesets remaining, ~1 tests) | |
369 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
370 $ hg bisect -s # -> update to rev 16 | |
371 Testing changeset 16:609d82a7ebae (3 changesets remaining, ~1 tests) | |
372 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
373 $ hg bisect -s | |
374 Due to skipped revisions, the first good revision could be any of: | |
375 changeset: 15:857b178a7cf3 | |
376 parent: 13:b0a32c86eb31 | |
377 parent: 10:429fcd26f52d | |
378 user: test | |
379 date: Thu Jan 01 00:00:15 1970 +0000 | |
380 summary: merge 10,13 | |
381 | |
382 changeset: 16:609d82a7ebae | |
383 user: test | |
384 date: Thu Jan 01 00:00:16 1970 +0000 | |
385 summary: 16 | |
386 | |
387 changeset: 17:228c06deef46 | |
388 user: test | |
389 date: Thu Jan 01 00:00:17 1970 +0000 | |
390 summary: 17 | |
391 |