tests: invoke hg command indirectly from shell script to run on Windows stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 22 Jan 2015 00:08:13 +0900
branchstable
changeset 23951 42f3042cc17f
parent 23950 caff3675cba5
child 23952 ea61e278ae92
tests: invoke hg command indirectly from shell script to run on Windows Before this patch, test-tag.t can't run successfully on Windows, because: - quoted hg command ('"hg"') prevents "hg.bat" from working correctly (only at testing with pure Python build) "%~f0" and "%~dp0hg" in "hg.bat" cause unexpected result in this case. BTW, quoted "\path\to\hg" works correctly. - "`pwd`" in the command line is expanded unexpectedly not "C:\path\to\TESTTMP" but "C;C:\path\to\TESTTMP"
tests/test-tag.t
--- a/tests/test-tag.t	Wed Jan 21 15:23:13 2015 -0800
+++ b/tests/test-tag.t	Thu Jan 22 00:08:13 2015 +0900
@@ -395,7 +395,10 @@
   $ hg -R repo-tag commit -A -m "test"
   adding test
   $ hg init repo-tag-target
-  $ hg -R repo-tag --config hooks.commit="\"hg\" push \"`pwd`/repo-tag-target\"" tag tag
+  $ cat > "$TESTTMP/issue3344.sh" <<EOF
+  > hg push "$TESTTMP/repo-tag-target"
+  > EOF
+  $ hg -R repo-tag --config hooks.commit="sh ../issue3344.sh" tag tag
   pushing to $TESTTMP/repo-tag-target (glob)
   searching for changes
   adding changesets