tests: move a multi-statement debuglocks hook into a shell script for Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 16 Nov 2014 22:03:57 -0500
changeset 23349 7dd1870120b2
parent 23348 bbe56e07e07a
child 23350 e63941631a3f
tests: move a multi-statement debuglocks hook into a shell script for Windows Before this patch, a part of "test-push-hook-lock.t" fails unexpectedly on Windows environment, because semicolon (";") isn't recognized as the command separator by "cmd.exe". This is fixed the same way as a similar issue in 7c253c23de3b.
tests/test-push-hook-lock.t
--- a/tests/test-push-hook-lock.t	Sun Nov 16 16:26:15 2014 -0500
+++ b/tests/test-push-hook-lock.t	Sun Nov 16 22:03:57 2014 -0500
@@ -15,8 +15,12 @@
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
+  $ cat <<EOF > $TESTTMP/debuglocks-pretxn-hook.sh
+  > hg debuglocks
+  > true
+  > EOF
   $ echo '[hooks]' >> 2/.hg/hgrc
-  $ echo 'pretxnchangegroup.a = hg debuglocks; true' >> 2/.hg/hgrc
+  $ echo "pretxnchangegroup.a = sh $TESTTMP/debuglocks-pretxn-hook.sh" >> 2/.hg/hgrc
   $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
 
   $ echo bar >> 3/foo