Mercurial > evolve
comparison tests/test-inhibit.t @ 1339:0e2eb196923a
inhibit: create direct access extension
Since we want to use direct access without necessarily using inhibit, this
patch separates both extensions. Inhibit depends on direct access and we add
a test to check that it complains if that is not the case.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Thu, 14 May 2015 11:23:40 -0700 |
parents | 77cbf9121e8a |
children | 41628bd60ee6 |
comparison
equal
deleted
inserted
replaced
1338:77cbf9121e8a | 1339:0e2eb196923a |
---|---|
7 > [extensions] | 7 > [extensions] |
8 > rebase= | 8 > rebase= |
9 > strip= | 9 > strip= |
10 > EOF | 10 > EOF |
11 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH | 11 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH |
12 $ echo "directaccess=$(echo $(dirname $TESTDIR))/hgext/directaccess.py" >> $HGRCPATH | |
12 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH | 13 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH |
13 $ mkcommit() { | 14 $ mkcommit() { |
14 > echo "$1" > "$1" | 15 > echo "$1" > "$1" |
15 > hg add "$1" | 16 > hg add "$1" |
16 > hg ci -m "add $1" | 17 > hg ci -m "add $1" |
560 adding manifests | 561 adding manifests |
561 adding file changes | 562 adding file changes |
562 added 2 changesets with 1 changes to 2 files (+1 heads) | 563 added 2 changesets with 1 changes to 2 files (+1 heads) |
563 (run 'hg heads' to see heads, 'hg merge' to merge) | 564 (run 'hg heads' to see heads, 'hg merge' to merge) |
564 | 565 |
565 Only allow direct access and check that evolve works like before | 566 Only allow direct access and check that evolve works like before |
566 $ cat >> $HGRCPATH <<EOF | 567 $ cat >> $HGRCPATH <<EOF |
567 > [inhibit] | 568 > [extensions] |
568 > onlydirectaccess = True | 569 > inhibit=! |
569 > EOF | 570 > EOF |
570 | 571 |
571 $ hg up 15 | 572 $ hg up 15 |
572 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 573 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
574 working directory parent is obsolete! | |
573 $ echo "CM" > cM | 575 $ echo "CM" > cM |
574 $ hg amend | 576 $ hg amend |
575 1 new unstable changesets | |
576 $ hg log -G | 577 $ hg log -G |
577 @ 21:721c3c279519 add cM | 578 @ 21:721c3c279519 add cM |
578 | | 579 | |
579 | o 16:a438c045eb37 add cN | 580 | o 16:a438c045eb37 add cN |
580 | | | 581 | | |
581 | x 15:2d66e189f5b5 add cM | 582 | x 15:2d66e189f5b5 add cM |
582 |/ | 583 |/ |
583 o 14:d66ccb8c5871 add cL | 584 o 14:d66ccb8c5871 add cL |
584 | | 585 | |
585 | o 9:55c73a90e4b4 add cJ | 586 o 7:18214586bf78 add cJ |
586 | | | 587 | |
587 o | 7:18214586bf78 add cJ | 588 o 6:cf5c4f4554ce add cH |
588 |/ | 589 | |
589 o 6:cf5c4f4554ce add cH | 590 o 5:5419eb264a33 add cG |
590 | | 591 | |
591 o 5:5419eb264a33 add cG | 592 o 4:98065434e5c6 add cE |
592 | | 593 | |
593 o 4:98065434e5c6 add cE | 594 o 0:54ccbc537fc2 add cA |
594 | | 595 |
595 o 0:54ccbc537fc2 add cA | 596 |
596 | 597 Inhibit should not work without directaccess |
598 $ cat >> $HGRCPATH <<EOF | |
599 > [extensions] | |
600 > directaccess=! | |
601 > EOF | |
602 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH | |
603 | |
604 $ hg up 15 | |
605 abort: Cannot use inhibit without the direct access extension | |
606 [255] | |
607 |