# HG changeset patch # User Bernhard Leiner # Date 1230401126 -3600 # Node ID 21233de9c0531281b145595dbddcd73b8d6874ca # Parent a9221c7f51a4a38a2f362799b2d2c5819ae25b61 Circumvent removal of valid bisect candidates due to previously skipped ones As reported in issue 1445: A valid candidate revision for a bisect test is not considered for testing due to its skipped ancestor. If this revision is the only untested one left an assertion error occurs. diff -r a9221c7f51a4 -r 21233de9c053 mercurial/hbisect.py --- a/mercurial/hbisect.py Wed Dec 31 15:04:18 2008 +0100 +++ b/mercurial/hbisect.py Sat Dec 27 19:05:26 2008 +0100 @@ -102,7 +102,7 @@ if value == perfect: # found a perfect candidate? quit early break - if y < perfect: # all downhill from here? + if y < perfect and rev not in skip: # all downhill from here? for c in children.get(rev, []): poison[c] = True # poison children continue diff -r a9221c7f51a4 -r 21233de9c053 tests/test-bisect --- a/tests/test-bisect Wed Dec 31 15:04:18 2008 +0100 +++ b/tests/test-bisect Sat Dec 27 19:05:26 2008 +0100 @@ -72,3 +72,13 @@ echo % test no action hg bisect -r hg bisect || echo failure + +echo % reproduce AssertionError, issue1445 +hg bisect -r +hg bisect -b 6 +hg bisect -g 0 +hg bisect -s +hg bisect -s +hg bisect -s +hg bisect -s +hg bisect -g diff -r a9221c7f51a4 -r 21233de9c053 tests/test-bisect.out --- a/tests/test-bisect.out Wed Dec 31 15:04:18 2008 +0100 +++ b/tests/test-bisect.out Sat Dec 27 19:05:26 2008 +0100 @@ -286,3 +286,20 @@ % test no action abort: cannot bisect (no known good revisions) failure +% reproduce AssertionError, issue1445 +Testing changeset 3:b53bea5e2fcb (6 changesets remaining, ~2 tests) +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +Testing changeset 2:db07c04beaca (6 changesets remaining, ~2 tests) +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +Testing changeset 4:9b2ba8336a65 (6 changesets remaining, ~2 tests) +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +Testing changeset 1:5cd978ea5149 (6 changesets remaining, ~2 tests) +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +Testing changeset 5:7874a09ea728 (6 changesets remaining, ~2 tests) +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +The first bad revision is: +changeset: 6:a3d5c6fdf0d3 +user: test +date: Thu Jan 01 00:00:06 1970 +0000 +summary: msg 6 +