# HG changeset patch # User Matt Harbison <matt_harbi...@yahoo.com> # Date 1526871918 14400 # Sun May 20 23:05:18 2018 -0400 # Node ID 341bec645529aa249423f3aa683dac876d9e1510 # Parent 6acf41bb8d40c55073e846b81c7466f4b0d390dc tests: stabilize test-patch.t on Windows
$PYTHON needs to be quoted when invoking with cmd.exe, because the value expands to c:/Python27/python.exe, which seems to be interpreted as 'c' being a command. We can't just convert to '\', because there are a few places that run $PYTHON directly in MSYS. If unquoted there, it results in c:Python27python.exe being run. I wonder if we should bake the quotes into the environment variable to avoid this. It also wasn't happy with the quoting around exit1.py: c:/Python27/python.exe: can't open file ''$TESTTMP/d/exit1.py'': [Errno 22] Invalid argument diff --git a/tests/test-patch.t b/tests/test-patch.t --- a/tests/test-patch.t +++ b/tests/test-patch.t @@ -97,7 +97,7 @@ Error exit (issue4746) > sys.exit(1) > EOF - $ hg import ../c/p --config ui.patch="$PYTHON '`pwd`/exit1.py'" + $ hg import ../c/p --config ui.patch="\"$PYTHON\" `pwd`/exit1.py" applying ../c/p abort: patch command failed: exited with status 1 [255] _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel