# HG changeset patch # User FUJIWARA Katsunori # Date 2015-01-21 15:08:13 # Node ID 42f3042cc17f302971b365a0be89f679c4620da7 # Parent caff3675cba5225c4f32a2585eaa50fe53c2d942 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" diff --git a/tests/test-tag.t b/tests/test-tag.t --- a/tests/test-tag.t +++ b/tests/test-tag.t @@ -395,7 +395,10 @@ commit hook on tag used to be run withou $ 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" < 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