changeset 17462:8085fed2bf0a stable

tests: correct quoting of double quotes in here documents used to write hooks Some shells, e.g. ksh89, will emit \" in a here document as ", while others will emit \". To be sure of getting \", we specify \\". This gets test-commit-amend.t and test-largefiles.t working on AIX.
author Jim Hague <jim.hague@acm.org>
date Mon, 03 Sep 2012 17:25:50 +0100
parents bacde764fba0
children 8fea378242e3 1450538f25e8
files tests/test-commit-amend.t tests/test-largefiles.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-commit-amend.t	Thu Aug 30 16:47:08 2012 +0200
+++ b/tests/test-commit-amend.t	Mon Sep 03 17:25:50 2012 +0100
@@ -25,7 +25,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [hooks]
-  > pretxncommit.foo = sh -c "echo \"pretxncommit \$HG_NODE\"; hg id -r \$HG_NODE"
+  > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE"
   > EOF
 
 Amending changeset with changes in working dir:
--- a/tests/test-largefiles.t	Thu Aug 30 16:47:08 2012 +0200
+++ b/tests/test-largefiles.t	Mon Sep 03 17:25:50 2012 +0100
@@ -13,7 +13,7 @@
   > patterns=glob:**.dat
   > usercache=${USERCACHE}
   > [hooks]
-  > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
+  > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
   > EOF
 
 Create the repo with a couple of revisions of both large and normal
@@ -434,7 +434,7 @@
   $ cd ../addrm
   $ cat >> .hg/hgrc <<EOF
   > [hooks]
-  > post-commit.stat=sh -c "echo \"Invoking status postcommit hook\"; hg status -A"
+  > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A"
   > EOF
   $ touch foo
   $ hg add --large foo