Show More
@@ -158,9 +158,10 b' def get(repo, status):' | |||||
158 | """ |
|
158 | """ | |
159 | Return a list of revision(s) that match the given status: |
|
159 | Return a list of revision(s) that match the given status: | |
160 |
|
160 | |||
161 |
- ``good``, ``bad``, ``skip``: |
|
161 | - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip | |
162 | - ``range`` : all csets taking part in the bisection |
|
162 | - ``goods``, ``bads`` : csets topologicaly good/bad | |
163 |
- `` |
|
163 | - ``range`` : csets taking part in the bisection | |
|
164 | - ``pruned`` : csets that are goods, bads or skipped | |||
164 | - ``untested`` : csets whose fate is yet unknown |
|
165 | - ``untested`` : csets whose fate is yet unknown | |
165 | - ``ignored`` : csets ignored due to DAG topology |
|
166 | - ``ignored`` : csets ignored due to DAG topology | |
166 | """ |
|
167 | """ | |
@@ -178,16 +179,20 b' def get(repo, status):' | |||||
178 | # that's because the bisection can go either way |
|
179 | # that's because the bisection can go either way | |
179 | range = '( bisect(bad)::bisect(good) | bisect(good)::bisect(bad) )' |
|
180 | range = '( bisect(bad)::bisect(good) | bisect(good)::bisect(bad) )' | |
180 |
|
181 | |||
181 | # 'pruned' is all csets whose fate is already known: |
|
182 | _t = [c.rev() for c in repo.set('bisect(good)::bisect(bad)')] | |
182 | # - a good ancestor and a good ascendant, or |
|
183 | # The sets of topologically good or bad csets | |
183 | # - a bad ancestor and a bad descendant, or |
|
184 | if len(_t) == 0: | |
184 | # - skipped |
|
185 | # Goods are topologically after bads | |
185 | # But in case of irrelevant goods/bads, we also need to |
|
186 | goods = 'bisect(good)::' # Pruned good csets | |
186 | # include them. |
|
187 | bads = '::bisect(bad)' # Pruned bad csets | |
187 | pg = 'bisect(good)::bisect(good)' # Pruned goods |
|
188 | else: | |
188 | pb = 'bisect(bad)::bisect(bad)' # Pruned bads |
|
189 | # Goods are topologically before bads | |
189 | ps = 'bisect(skip)' # Pruned skipped |
|
190 | goods = '::bisect(good)' # Pruned good csets | |
190 | pruned = '( (%s) | (%s) | (%s) )' % (pg, pb, ps) |
|
191 | bads = 'bisect(bad)::' # Pruned bad csets | |
|
192 | ||||
|
193 | # 'pruned' is all csets whose fate is already known: good, bad, skip | |||
|
194 | skips = 'bisect(skip)' # Pruned skipped csets | |||
|
195 | pruned = '( (%s) | (%s) | (%s) )' % (goods, bads, skips) | |||
191 |
|
196 | |||
192 | # 'untested' is all cset that are- in 'range', but not in 'pruned' |
|
197 | # 'untested' is all cset that are- in 'range', but not in 'pruned' | |
193 | untested = '( (%s) - (%s) )' % (range, pruned) |
|
198 | untested = '( (%s) - (%s) )' % (range, pruned) | |
@@ -208,6 +213,10 b' def get(repo, status):' | |||||
208 | return [c.rev() for c in repo.set(untested)] |
|
213 | return [c.rev() for c in repo.set(untested)] | |
209 | elif status == 'ignored': |
|
214 | elif status == 'ignored': | |
210 | return [c.rev() for c in repo.set(ignored)] |
|
215 | return [c.rev() for c in repo.set(ignored)] | |
|
216 | elif status == "goods": | |||
|
217 | return [c.rev() for c in repo.set(goods)] | |||
|
218 | elif status == "bads": | |||
|
219 | return [c.rev() for c in repo.set(bads)] | |||
211 |
|
220 | |||
212 | else: |
|
221 | else: | |
213 | raise error.ParseError(_('invalid bisect state')) |
|
222 | raise error.ParseError(_('invalid bisect state')) |
@@ -237,13 +237,14 b' def author(repo, subset, x):' | |||||
237 |
|
237 | |||
238 | def bisect(repo, subset, x): |
|
238 | def bisect(repo, subset, x): | |
239 | """``bisect(string)`` |
|
239 | """``bisect(string)`` | |
240 |
Changesets marked in the specified bisect status |
|
240 | Changesets marked in the specified bisect status: | |
241 | ``skip``), or any of the meta-status: |
|
|||
242 |
|
241 | |||
243 | - ``range`` : all csets taking part in the bisection |
|
242 | - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip | |
244 | - ``pruned`` : csets that are good, bad or skipped |
|
243 | - ``goods``, ``bads`` : csets topologicaly good/bad | |
245 | - ``untested`` : csets whose fate is yet unknown |
|
244 | - ``range`` : csets taking part in the bisection | |
246 | - ``ignored`` : csets ignored due to DAG topology |
|
245 | - ``pruned`` : csets that are goods, bads or skipped | |
|
246 | - ``untested`` : csets whose fate is yet unknown | |||
|
247 | - ``ignored`` : csets ignored due to DAG topology | |||
247 | """ |
|
248 | """ | |
248 | status = getstring(x, _("bisect requires a string")).lower() |
|
249 | status = getstring(x, _("bisect requires a string")).lower() | |
249 | return [r for r in subset if r in hbisect.get(repo, status)] |
|
250 | return [r for r in subset if r in hbisect.get(repo, status)] |
@@ -322,9 +322,26 b' complex bisect test 1 # first bad rev i' | |||||
322 | 15:857b178a7cf3 |
|
322 | 15:857b178a7cf3 | |
323 | 16:609d82a7ebae |
|
323 | 16:609d82a7ebae | |
324 | 17:228c06deef46 |
|
324 | 17:228c06deef46 | |
|
325 | 18:d42e18c7bc9b | |||
325 | $ hg log -q -r 'bisect(untested)' |
|
326 | $ hg log -q -r 'bisect(untested)' | |
326 | 11:82ca6f06eccd |
|
327 | 11:82ca6f06eccd | |
327 | 12:9f259202bbe7 |
|
328 | 12:9f259202bbe7 | |
|
329 | $ hg log -q -r 'bisect(goods)' | |||
|
330 | 0:33b1f9bc8bc5 | |||
|
331 | 1:4ca5088da217 | |||
|
332 | 2:051e12f87bf1 | |||
|
333 | 3:0950834f0a9c | |||
|
334 | 4:5c668c22234f | |||
|
335 | 5:385a529b6670 | |||
|
336 | 6:a214d5d3811a | |||
|
337 | 8:dab8161ac8fc | |||
|
338 | $ hg log -q -r 'bisect(bads)' | |||
|
339 | 9:3c77083deb4a | |||
|
340 | 10:429fcd26f52d | |||
|
341 | 15:857b178a7cf3 | |||
|
342 | 16:609d82a7ebae | |||
|
343 | 17:228c06deef46 | |||
|
344 | 18:d42e18c7bc9b | |||
328 |
|
345 | |||
329 | complex bisect test 2 # first good rev is 13 |
|
346 | complex bisect test 2 # first good rev is 13 | |
330 |
|
347 | |||
@@ -337,6 +354,7 b' complex bisect test 2 # first good rev ' | |||||
337 | Testing changeset 10:429fcd26f52d (13 changesets remaining, ~3 tests) |
|
354 | Testing changeset 10:429fcd26f52d (13 changesets remaining, ~3 tests) | |
338 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
355 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
339 | $ hg log -q -r 'bisect(pruned)' |
|
356 | $ hg log -q -r 'bisect(pruned)' | |
|
357 | 0:33b1f9bc8bc5 | |||
340 | 1:4ca5088da217 |
|
358 | 1:4ca5088da217 | |
341 | 6:a214d5d3811a |
|
359 | 6:a214d5d3811a | |
342 | 18:d42e18c7bc9b |
|
360 | 18:d42e18c7bc9b | |
@@ -344,6 +362,7 b' complex bisect test 2 # first good rev ' | |||||
344 | Testing changeset 12:9f259202bbe7 (5 changesets remaining, ~2 tests) |
|
362 | Testing changeset 12:9f259202bbe7 (5 changesets remaining, ~2 tests) | |
345 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
363 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
346 | $ hg log -q -r 'bisect(pruned)' |
|
364 | $ hg log -q -r 'bisect(pruned)' | |
|
365 | 0:33b1f9bc8bc5 | |||
347 | 1:4ca5088da217 |
|
366 | 1:4ca5088da217 | |
348 | 2:051e12f87bf1 |
|
367 | 2:051e12f87bf1 | |
349 | 3:0950834f0a9c |
|
368 | 3:0950834f0a9c | |
@@ -396,8 +415,10 b' 10,9,13 are skipped an might be the firs' | |||||
396 | Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests) |
|
415 | Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests) | |
397 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
416 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
398 | $ hg log -q -r 'bisect(pruned)' |
|
417 | $ hg log -q -r 'bisect(pruned)' | |
|
418 | 0:33b1f9bc8bc5 | |||
399 | 1:4ca5088da217 |
|
419 | 1:4ca5088da217 | |
400 | 16:609d82a7ebae |
|
420 | 16:609d82a7ebae | |
|
421 | 17:228c06deef46 | |||
401 | $ hg bisect -g # -> update to rev 13 |
|
422 | $ hg bisect -g # -> update to rev 13 | |
402 | Testing changeset 13:b0a32c86eb31 (8 changesets remaining, ~3 tests) |
|
423 | Testing changeset 13:b0a32c86eb31 (8 changesets remaining, ~3 tests) | |
403 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
424 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
@@ -408,6 +429,7 b' 10,9,13 are skipped an might be the firs' | |||||
408 | Testing changeset 12:9f259202bbe7 (8 changesets remaining, ~3 tests) |
|
429 | Testing changeset 12:9f259202bbe7 (8 changesets remaining, ~3 tests) | |
409 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
430 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
410 | $ hg log -q -r 'bisect(pruned)' |
|
431 | $ hg log -q -r 'bisect(pruned)' | |
|
432 | 0:33b1f9bc8bc5 | |||
411 | 1:4ca5088da217 |
|
433 | 1:4ca5088da217 | |
412 | 2:051e12f87bf1 |
|
434 | 2:051e12f87bf1 | |
413 | 3:0950834f0a9c |
|
435 | 3:0950834f0a9c | |
@@ -417,6 +439,7 b' 10,9,13 are skipped an might be the firs' | |||||
417 | 10:429fcd26f52d |
|
439 | 10:429fcd26f52d | |
418 | 13:b0a32c86eb31 |
|
440 | 13:b0a32c86eb31 | |
419 | 16:609d82a7ebae |
|
441 | 16:609d82a7ebae | |
|
442 | 17:228c06deef46 | |||
420 | $ hg bisect -g # -> update to rev 9 |
|
443 | $ hg bisect -g # -> update to rev 9 | |
421 | Testing changeset 9:3c77083deb4a (5 changesets remaining, ~2 tests) |
|
444 | Testing changeset 9:3c77083deb4a (5 changesets remaining, ~2 tests) | |
422 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
445 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
@@ -484,6 +507,13 b' 15,16 are skipped an might be the first ' | |||||
484 | Testing changeset 15:857b178a7cf3 (3 changesets remaining, ~1 tests) |
|
507 | Testing changeset 15:857b178a7cf3 (3 changesets remaining, ~1 tests) | |
485 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
508 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
486 | $ hg log -q -r 'bisect(pruned)' |
|
509 | $ hg log -q -r 'bisect(pruned)' | |
|
510 | 0:33b1f9bc8bc5 | |||
|
511 | 1:4ca5088da217 | |||
|
512 | 2:051e12f87bf1 | |||
|
513 | 3:0950834f0a9c | |||
|
514 | 4:5c668c22234f | |||
|
515 | 5:385a529b6670 | |||
|
516 | 6:a214d5d3811a | |||
487 | 8:dab8161ac8fc |
|
517 | 8:dab8161ac8fc | |
488 | 9:3c77083deb4a |
|
518 | 9:3c77083deb4a | |
489 | 10:429fcd26f52d |
|
519 | 10:429fcd26f52d | |
@@ -495,6 +525,13 b' 15,16 are skipped an might be the first ' | |||||
495 | Testing changeset 16:609d82a7ebae (3 changesets remaining, ~1 tests) |
|
525 | Testing changeset 16:609d82a7ebae (3 changesets remaining, ~1 tests) | |
496 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
526 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
497 | $ hg log -q -r 'bisect(pruned)' |
|
527 | $ hg log -q -r 'bisect(pruned)' | |
|
528 | 0:33b1f9bc8bc5 | |||
|
529 | 1:4ca5088da217 | |||
|
530 | 2:051e12f87bf1 | |||
|
531 | 3:0950834f0a9c | |||
|
532 | 4:5c668c22234f | |||
|
533 | 5:385a529b6670 | |||
|
534 | 6:a214d5d3811a | |||
498 | 8:dab8161ac8fc |
|
535 | 8:dab8161ac8fc | |
499 | 9:3c77083deb4a |
|
536 | 9:3c77083deb4a | |
500 | 10:429fcd26f52d |
|
537 | 10:429fcd26f52d | |
@@ -533,6 +570,13 b' 15,16 are skipped an might be the first ' | |||||
533 | 16:609d82a7ebae |
|
570 | 16:609d82a7ebae | |
534 | 17:228c06deef46 |
|
571 | 17:228c06deef46 | |
535 | $ hg log -q -r 'bisect(pruned)' |
|
572 | $ hg log -q -r 'bisect(pruned)' | |
|
573 | 0:33b1f9bc8bc5 | |||
|
574 | 1:4ca5088da217 | |||
|
575 | 2:051e12f87bf1 | |||
|
576 | 3:0950834f0a9c | |||
|
577 | 4:5c668c22234f | |||
|
578 | 5:385a529b6670 | |||
|
579 | 6:a214d5d3811a | |||
536 | 8:dab8161ac8fc |
|
580 | 8:dab8161ac8fc | |
537 | 9:3c77083deb4a |
|
581 | 9:3c77083deb4a | |
538 | 10:429fcd26f52d |
|
582 | 10:429fcd26f52d | |
@@ -552,6 +596,11 b' test unrelated revs:' | |||||
552 | [255] |
|
596 | [255] | |
553 | $ hg log -q -r 'bisect(range)' |
|
597 | $ hg log -q -r 'bisect(range)' | |
554 | $ hg log -q -r 'bisect(pruned)' |
|
598 | $ hg log -q -r 'bisect(pruned)' | |
|
599 | 0:33b1f9bc8bc5 | |||
|
600 | 1:4ca5088da217 | |||
|
601 | 2:051e12f87bf1 | |||
|
602 | 3:0950834f0a9c | |||
|
603 | 4:5c668c22234f | |||
555 | 7:50c76098bbf2 |
|
604 | 7:50c76098bbf2 | |
556 | 14:faa450606157 |
|
605 | 14:faa450606157 | |
557 | $ hg bisect --reset |
|
606 | $ hg bisect --reset | |
@@ -594,12 +643,16 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
594 | 16:609d82a7ebae |
|
643 | 16:609d82a7ebae | |
595 | 17:228c06deef46 |
|
644 | 17:228c06deef46 | |
596 | $ hg log -q -r 'bisect(pruned)' |
|
645 | $ hg log -q -r 'bisect(pruned)' | |
|
646 | 0:33b1f9bc8bc5 | |||
|
647 | 1:4ca5088da217 | |||
|
648 | 8:dab8161ac8fc | |||
597 | 11:82ca6f06eccd |
|
649 | 11:82ca6f06eccd | |
598 | 12:9f259202bbe7 |
|
650 | 12:9f259202bbe7 | |
599 | 13:b0a32c86eb31 |
|
651 | 13:b0a32c86eb31 | |
600 | 15:857b178a7cf3 |
|
652 | 15:857b178a7cf3 | |
601 | 16:609d82a7ebae |
|
653 | 16:609d82a7ebae | |
602 | 17:228c06deef46 |
|
654 | 17:228c06deef46 | |
|
655 | 18:d42e18c7bc9b | |||
603 | $ hg log -q -r 'bisect(untested)' |
|
656 | $ hg log -q -r 'bisect(untested)' | |
604 | $ hg log -q -r 'bisect(ignored)' |
|
657 | $ hg log -q -r 'bisect(ignored)' | |
605 | 2:051e12f87bf1 |
|
658 | 2:051e12f87bf1 | |
@@ -633,6 +686,18 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
633 | 4:5c668c22234f |
|
686 | 4:5c668c22234f | |
634 | 5:385a529b6670 |
|
687 | 5:385a529b6670 | |
635 | 6:a214d5d3811a |
|
688 | 6:a214d5d3811a | |
|
689 | $ hg log -q -r 'bisect(goods)' | |||
|
690 | 0:33b1f9bc8bc5 | |||
|
691 | 1:4ca5088da217 | |||
|
692 | 8:dab8161ac8fc | |||
|
693 | 11:82ca6f06eccd | |||
|
694 | 12:9f259202bbe7 | |||
|
695 | 13:b0a32c86eb31 | |||
|
696 | $ hg log -q -r 'bisect(bads)' | |||
|
697 | 15:857b178a7cf3 | |||
|
698 | 16:609d82a7ebae | |||
|
699 | 17:228c06deef46 | |||
|
700 | 18:d42e18c7bc9b | |||
636 | $ hg bisect -b |
|
701 | $ hg bisect -b | |
637 | The first bad revision is: |
|
702 | The first bad revision is: | |
638 | changeset: 9:3c77083deb4a |
|
703 | changeset: 9:3c77083deb4a | |
@@ -651,6 +716,8 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
651 | 16:609d82a7ebae |
|
716 | 16:609d82a7ebae | |
652 | 17:228c06deef46 |
|
717 | 17:228c06deef46 | |
653 | $ hg log -q -r 'bisect(pruned)' |
|
718 | $ hg log -q -r 'bisect(pruned)' | |
|
719 | 0:33b1f9bc8bc5 | |||
|
720 | 1:4ca5088da217 | |||
654 | 8:dab8161ac8fc |
|
721 | 8:dab8161ac8fc | |
655 | 9:3c77083deb4a |
|
722 | 9:3c77083deb4a | |
656 | 10:429fcd26f52d |
|
723 | 10:429fcd26f52d | |
@@ -660,6 +727,7 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
660 | 15:857b178a7cf3 |
|
727 | 15:857b178a7cf3 | |
661 | 16:609d82a7ebae |
|
728 | 16:609d82a7ebae | |
662 | 17:228c06deef46 |
|
729 | 17:228c06deef46 | |
|
730 | 18:d42e18c7bc9b | |||
663 | $ hg log -q -r 'bisect(untested)' |
|
731 | $ hg log -q -r 'bisect(untested)' | |
664 | $ hg log -q -r 'bisect(ignored)' |
|
732 | $ hg log -q -r 'bisect(ignored)' | |
665 | 2:051e12f87bf1 |
|
733 | 2:051e12f87bf1 | |
@@ -667,6 +735,20 b' end at merge: 17 bad, 11 good (but 9 is ' | |||||
667 | 4:5c668c22234f |
|
735 | 4:5c668c22234f | |
668 | 5:385a529b6670 |
|
736 | 5:385a529b6670 | |
669 | 6:a214d5d3811a |
|
737 | 6:a214d5d3811a | |
|
738 | $ hg log -q -r 'bisect(goods)' | |||
|
739 | 0:33b1f9bc8bc5 | |||
|
740 | 1:4ca5088da217 | |||
|
741 | 8:dab8161ac8fc | |||
|
742 | 11:82ca6f06eccd | |||
|
743 | 12:9f259202bbe7 | |||
|
744 | 13:b0a32c86eb31 | |||
|
745 | $ hg log -q -r 'bisect(bads)' | |||
|
746 | 9:3c77083deb4a | |||
|
747 | 10:429fcd26f52d | |||
|
748 | 15:857b178a7cf3 | |||
|
749 | 16:609d82a7ebae | |||
|
750 | 17:228c06deef46 | |||
|
751 | 18:d42e18c7bc9b | |||
670 |
|
752 | |||
671 | user adds irrelevant but consistent information (here: -g 2) to bisect state |
|
753 | user adds irrelevant but consistent information (here: -g 2) to bisect state | |
672 |
|
754 | |||
@@ -698,9 +780,16 b' user adds irrelevant but consistent info' | |||||
698 | 12:9f259202bbe7 |
|
780 | 12:9f259202bbe7 | |
699 | 13:b0a32c86eb31 |
|
781 | 13:b0a32c86eb31 | |
700 | $ hg log -q -r 'bisect(pruned)' |
|
782 | $ hg log -q -r 'bisect(pruned)' | |
|
783 | 0:33b1f9bc8bc5 | |||
|
784 | 1:4ca5088da217 | |||
701 | 2:051e12f87bf1 |
|
785 | 2:051e12f87bf1 | |
702 | 8:dab8161ac8fc |
|
786 | 8:dab8161ac8fc | |
703 | 11:82ca6f06eccd |
|
787 | 11:82ca6f06eccd | |
704 | 12:9f259202bbe7 |
|
788 | 12:9f259202bbe7 | |
705 | 13:b0a32c86eb31 |
|
789 | 13:b0a32c86eb31 | |
|
790 | 14:faa450606157 | |||
|
791 | 15:857b178a7cf3 | |||
|
792 | 16:609d82a7ebae | |||
|
793 | 17:228c06deef46 | |||
|
794 | 18:d42e18c7bc9b | |||
706 | $ hg log -q -r 'bisect(untested)' |
|
795 | $ hg log -q -r 'bisect(untested)' |
General Comments 0
You need to be logged in to leave comments.
Login now