From patchwork Wed Jan 21 15:10:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5, of, 7, STABLE] tests: invoke hg command indirectly from shell script to run on Windows From: Katsunori FUJIWARA X-Patchwork-Id: 7529 Message-Id: To: mercurial-devel@selenic.com Date: Thu, 22 Jan 2015 00:10:52 +0900 # HG changeset patch # User FUJIWARA Katsunori # Date 1421852893 -32400 # Thu Jan 22 00:08:13 2015 +0900 # Branch stable # Node ID ef59640c1ab192e862b54b9530c3dc281371caf5 # Parent 4935b1a52e6812c2733a541c9ae907456e23e0f6 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