diff tests/test-phases.t @ 34938: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
line wrap: on
line diff
--- a/tests/test-phases.t	Fri Oct 20 21:29:15 2017 -0400
+++ b/tests/test-phases.t	Fri Oct 20 23:01:56 2017 -0400
@@ -1,9 +1,12 @@
+  $ cat > $TESTTMP/hook.sh << 'EOF'
+  > echo "test-hook-close-phase: $HG_NODE:  $HG_OLDPHASE -> $HG_PHASE"
+  > EOF
 
   $ cat >> $HGRCPATH << EOF
   > [extensions]
   > phasereport=$TESTDIR/testlib/ext-phase-report.py
   > [hooks]
-  > txnclose-phase.test = echo "test-hook-close-phase: \$HG_NODE:  \$HG_OLDPHASE -> \$HG_PHASE"
+  > txnclose-phase.test = sh $TESTTMP/hook.sh
   > EOF
 
   $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
@@ -796,7 +799,7 @@
 
   $ cat >> .hg/hgrc << EOF
   > [hooks]
-  > pretxnclose-phase.nopublish_D = (echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]
+  > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]"
   > EOF
 
 Try various actions. only the draft move should succeed