Mercurial > hg
comparison tests/test-bisect.t @ 20306:fe8e254c7ad6 stable
merge default into stable for 2.9 code freeze
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 21 Jan 2014 14:30:06 -0600 |
parents | 0d32dd60016c |
children | fab9dda0f2a3 |
comparison
equal
deleted
inserted
replaced
20213:8c69c69dbcd2 | 20306:fe8e254c7ad6 |
---|---|
459 > if repo['.'].rev() < 6: | 459 > if repo['.'].rev() < 6: |
460 > sys.exit(1) | 460 > sys.exit(1) |
461 > EOF | 461 > EOF |
462 $ chmod +x script.py | 462 $ chmod +x script.py |
463 $ hg bisect -r | 463 $ hg bisect -r |
464 $ hg bisect --good tip | 464 $ hg up -qr tip |
465 $ hg bisect --bad 0 | |
466 Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests) | |
467 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
468 $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters" | 465 $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters" |
466 changeset 31:58c80a7c8a40: good | |
467 abort: cannot bisect (no known bad revisions) | |
468 [255] | |
469 $ hg up -qr 0 | |
470 $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters" | |
471 changeset 0:b99c7b9c8e11: bad | |
469 changeset 15:e7fa0811edb0: good | 472 changeset 15:e7fa0811edb0: good |
470 changeset 7:03750880c6b5: good | 473 changeset 7:03750880c6b5: good |
471 changeset 3:b53bea5e2fcb: bad | 474 changeset 3:b53bea5e2fcb: bad |
472 changeset 5:7874a09ea728: bad | 475 changeset 5:7874a09ea728: bad |
473 changeset 6:a3d5c6fdf0d3: good | 476 changeset 6:a3d5c6fdf0d3: good |
514 ensure that we still don't have a working dir | 517 ensure that we still don't have a working dir |
515 | 518 |
516 $ hg parents | 519 $ hg parents |
517 | 520 |
518 | 521 |
522 test the same case, this time with updating | |
523 | |
524 $ cat > script.sh <<'EOF' | |
525 > #!/bin/sh | |
526 > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127) | |
527 > current="`hg log -r \"bisect(current)\" --template {node}`" | |
528 > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127) | |
529 > rev="`hg log -r . --template {rev}`" | |
530 > test "$rev" -ge 6 | |
531 > EOF | |
532 $ chmod +x script.sh | |
533 $ hg bisect -r | |
534 $ hg up -qr tip | |
535 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" | |
536 changeset 31:58c80a7c8a40: good | |
537 abort: cannot bisect (no known bad revisions) | |
538 [255] | |
539 $ hg up -qr 0 | |
540 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" | |
541 changeset 0:b99c7b9c8e11: bad | |
542 changeset 15:e7fa0811edb0: good | |
543 changeset 7:03750880c6b5: good | |
544 changeset 3:b53bea5e2fcb: bad | |
545 changeset 5:7874a09ea728: bad | |
546 changeset 6:a3d5c6fdf0d3: good | |
547 The first good revision is: | |
548 changeset: 6:a3d5c6fdf0d3 | |
549 user: test | |
550 date: Thu Jan 01 00:00:06 1970 +0000 | |
551 summary: msg 6 | |
552 | |
553 | |
554 | |
519 Check that bisect does not break on obsolete changesets | 555 Check that bisect does not break on obsolete changesets |
520 ========================================================= | 556 ========================================================= |
521 | 557 |
522 $ cat > ${TESTTMP}/obs.py << EOF | 558 $ cat > ${TESTTMP}/obs.py << EOF |
523 > import mercurial.obsolete | 559 > import mercurial.obsolete |