comparison tests/test-phases.t @ 35721:aa05b95949fe stable

tests: adjust hooks for Windows I'm not sure why these weren't working on Windows. The failures were generally in the style of: - remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: 1 -> 0 + remote: "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" and - abort: pretxnclose-bookmark.force-forward hook exited with status 1 - [255] + abort: pretxnclose-bookmark.force-public hook exited with status 255 + [255] These failures originated in ee5f0d047b41::f6d17075608f.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 20 Oct 2017 23:01:56 -0400
parents eb1b964b354b
children 06c976acc581
comparison
equal deleted inserted replaced
35720:af924308110a 35721:aa05b95949fe
1 $ cat > $TESTTMP/hook.sh << 'EOF'
2 > echo "test-hook-close-phase: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE"
3 > EOF
1 4
2 $ cat >> $HGRCPATH << EOF 5 $ cat >> $HGRCPATH << EOF
3 > [extensions] 6 > [extensions]
4 > phasereport=$TESTDIR/testlib/ext-phase-report.py 7 > phasereport=$TESTDIR/testlib/ext-phase-report.py
5 > [hooks] 8 > [hooks]
6 > txnclose-phase.test = echo "test-hook-close-phase: \$HG_NODE: \$HG_OLDPHASE -> \$HG_PHASE" 9 > txnclose-phase.test = sh $TESTTMP/hook.sh
7 > EOF 10 > EOF
8 11
9 $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; } 12 $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
10 $ mkcommit() { 13 $ mkcommit() {
11 > echo "$1" > "$1" 14 > echo "$1" > "$1"
794 797
795 Install a hook that prevent b3325c91a4d9 to become public 798 Install a hook that prevent b3325c91a4d9 to become public
796 799
797 $ cat >> .hg/hgrc << EOF 800 $ cat >> .hg/hgrc << EOF
798 > [hooks] 801 > [hooks]
799 > pretxnclose-phase.nopublish_D = (echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ] 802 > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]"
800 > EOF 803 > EOF
801 804
802 Try various actions. only the draft move should succeed 805 Try various actions. only the draft move should succeed
803 806
804 $ hg phase --public b3325c91a4d9 807 $ hg phase --public b3325c91a4d9