Show More
@@ -160,6 +160,7 b' def get(repo, status):' | |||||
160 |
|
160 | |||
161 | - ``good``, ``bad``, ``skip``: as the names imply |
|
161 | - ``good``, ``bad``, ``skip``: as the names imply | |
162 | - ``range`` : all csets taking part in the bisection |
|
162 | - ``range`` : all csets taking part in the bisection | |
|
163 | - ``pruned`` : good|bad|skip, excluding out-of-range csets | |||
163 | """ |
|
164 | """ | |
164 | state = load_state(repo) |
|
165 | state = load_state(repo) | |
165 | if status in ('good', 'bad', 'skip'): |
|
166 | if status in ('good', 'bad', 'skip'): | |
@@ -190,6 +191,9 b' def get(repo, status):' | |||||
190 |
|
191 | |||
191 | if status == 'range': |
|
192 | if status == 'range': | |
192 | return [c for c in range] |
|
193 | return [c for c in range] | |
|
194 | elif status == 'pruned': | |||
|
195 | # We do not want skipped csets that are out-of-range | |||
|
196 | return [c for c in range if c in (goods | bads | skips)] | |||
193 |
|
197 | |||
194 | else: |
|
198 | else: | |
195 | raise error.ParseError(_('invalid bisect state')) |
|
199 | raise error.ParseError(_('invalid bisect state')) |
@@ -241,6 +241,7 b' def bisect(repo, subset, x):' | |||||
241 | ``skip``), or any of the meta-status: |
|
241 | ``skip``), or any of the meta-status: | |
242 |
|
242 | |||
243 | - ``range`` : all csets taking part in the bisection |
|
243 | - ``range`` : all csets taking part in the bisection | |
|
244 | - ``pruned`` : good|bad|skip, excluding out-of-range csets | |||
244 | """ |
|
245 | """ | |
245 | status = getstring(x, _("bisect requires a string")).lower() |
|
246 | status = getstring(x, _("bisect requires a string")).lower() | |
246 | return [r for r in subset if r in hbisect.get(repo, status)] |
|
247 | return [r for r in subset if r in hbisect.get(repo, status)] |
@@ -288,6 +288,14 b' complex bisect test 1 # first bad rev i' | |||||
288 | 15:857b178a7cf3 |
|
288 | 15:857b178a7cf3 | |
289 | 16:609d82a7ebae |
|
289 | 16:609d82a7ebae | |
290 | 17:228c06deef46 |
|
290 | 17:228c06deef46 | |
|
291 | $ hg log -q -r 'bisect(pruned)' | |||
|
292 | 0:33b1f9bc8bc5 | |||
|
293 | 6:a214d5d3811a | |||
|
294 | 8:dab8161ac8fc | |||
|
295 | 9:3c77083deb4a | |||
|
296 | 10:429fcd26f52d | |||
|
297 | 13:b0a32c86eb31 | |||
|
298 | 17:228c06deef46 | |||
291 |
|
299 | |||
292 | complex bisect test 2 # first good rev is 13 |
|
300 | complex bisect test 2 # first good rev is 13 | |
293 |
|
301 | |||
@@ -327,6 +335,13 b' complex bisect test 2 # first good rev ' | |||||
327 | 13:b0a32c86eb31 |
|
335 | 13:b0a32c86eb31 | |
328 | 15:857b178a7cf3 |
|
336 | 15:857b178a7cf3 | |
329 | 18:d42e18c7bc9b |
|
337 | 18:d42e18c7bc9b | |
|
338 | $ hg log -q -r 'bisect(pruned)' | |||
|
339 | 1:4ca5088da217 | |||
|
340 | 6:a214d5d3811a | |||
|
341 | 10:429fcd26f52d | |||
|
342 | 12:9f259202bbe7 | |||
|
343 | 13:b0a32c86eb31 | |||
|
344 | 18:d42e18c7bc9b | |||
330 |
|
345 | |||
331 | complex bisect test 3 |
|
346 | complex bisect test 3 | |
332 |
|
347 | |||
@@ -394,6 +409,15 b' 10,9,13 are skipped an might be the firs' | |||||
394 | 13:b0a32c86eb31 |
|
409 | 13:b0a32c86eb31 | |
395 | 15:857b178a7cf3 |
|
410 | 15:857b178a7cf3 | |
396 | 16:609d82a7ebae |
|
411 | 16:609d82a7ebae | |
|
412 | $ hg log -q -r 'bisect(pruned)' | |||
|
413 | 1:4ca5088da217 | |||
|
414 | 6:a214d5d3811a | |||
|
415 | 9:3c77083deb4a | |||
|
416 | 10:429fcd26f52d | |||
|
417 | 12:9f259202bbe7 | |||
|
418 | 13:b0a32c86eb31 | |||
|
419 | 15:857b178a7cf3 | |||
|
420 | 16:609d82a7ebae | |||
397 |
|
421 | |||
398 | complex bisect test 4 |
|
422 | complex bisect test 4 | |
399 |
|
423 | |||
@@ -443,6 +467,13 b' 15,16 are skipped an might be the first ' | |||||
443 | 15:857b178a7cf3 |
|
467 | 15:857b178a7cf3 | |
444 | 16:609d82a7ebae |
|
468 | 16:609d82a7ebae | |
445 | 17:228c06deef46 |
|
469 | 17:228c06deef46 | |
|
470 | $ hg log -q -r 'bisect(pruned)' | |||
|
471 | 8:dab8161ac8fc | |||
|
472 | 10:429fcd26f52d | |||
|
473 | 13:b0a32c86eb31 | |||
|
474 | 15:857b178a7cf3 | |||
|
475 | 16:609d82a7ebae | |||
|
476 | 17:228c06deef46 | |||
446 |
|
477 | |||
447 | test unrelated revs: |
|
478 | test unrelated revs: | |
448 |
|
479 | |||
@@ -452,6 +483,7 b' test unrelated revs:' | |||||
452 | abort: starting revisions are not directly related |
|
483 | abort: starting revisions are not directly related | |
453 | [255] |
|
484 | [255] | |
454 | $ hg log -q -r 'bisect(range)' |
|
485 | $ hg log -q -r 'bisect(range)' | |
|
486 | $ hg log -q -r 'bisect(pruned)' | |||
455 | $ hg bisect --reset |
|
487 | $ hg bisect --reset | |
456 |
|
488 | |||
457 | end at merge: 17 bad, 11 good (but 9 is first bad) |
|
489 | end at merge: 17 bad, 11 good (but 9 is first bad) | |
@@ -483,6 +515,11 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
483 | 15:857b178a7cf3 |
|
515 | 15:857b178a7cf3 | |
484 | 16:609d82a7ebae |
|
516 | 16:609d82a7ebae | |
485 | 17:228c06deef46 |
|
517 | 17:228c06deef46 | |
|
518 | $ hg log -q -r 'bisect(pruned)' | |||
|
519 | 11:82ca6f06eccd | |||
|
520 | 13:b0a32c86eb31 | |||
|
521 | 15:857b178a7cf3 | |||
|
522 | 17:228c06deef46 | |||
486 | $ hg bisect --extend |
|
523 | $ hg bisect --extend | |
487 | Extending search to changeset 8:dab8161ac8fc |
|
524 | Extending search to changeset 8:dab8161ac8fc | |
488 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
525 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
@@ -506,6 +543,13 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
506 | 15:857b178a7cf3 |
|
543 | 15:857b178a7cf3 | |
507 | 16:609d82a7ebae |
|
544 | 16:609d82a7ebae | |
508 | 17:228c06deef46 |
|
545 | 17:228c06deef46 | |
|
546 | $ hg log -q -r 'bisect(pruned)' | |||
|
547 | 8:dab8161ac8fc | |||
|
548 | 9:3c77083deb4a | |||
|
549 | 11:82ca6f06eccd | |||
|
550 | 13:b0a32c86eb31 | |||
|
551 | 15:857b178a7cf3 | |||
|
552 | 17:228c06deef46 | |||
509 |
|
553 | |||
510 | user adds irrelevant but consistent information (here: -g 2) to bisect state |
|
554 | user adds irrelevant but consistent information (here: -g 2) to bisect state | |
511 |
|
555 | |||
@@ -530,3 +574,7 b' user adds irrelevant but consistent info' | |||||
530 | 11:82ca6f06eccd |
|
574 | 11:82ca6f06eccd | |
531 | 12:9f259202bbe7 |
|
575 | 12:9f259202bbe7 | |
532 | 13:b0a32c86eb31 |
|
576 | 13:b0a32c86eb31 | |
|
577 | $ hg log -q -r 'bisect(pruned)' | |||
|
578 | 8:dab8161ac8fc | |||
|
579 | 11:82ca6f06eccd | |||
|
580 | 13:b0a32c86eb31 |
General Comments 0
You need to be logged in to leave comments.
Login now