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.
--- 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