diff --git a/contrib/win32/hg.bat b/contrib/win32/hg.bat index c3edf68bea7541916526a7022bc513745d53a70b_Y29udHJpYi93aW4zMi9oZy5iYXQ=..7905b7bc4b210503266ea4e72a6fd73ff8c43d67_Y29udHJpYi93aW4zMi9oZy5iYXQ= 100644 --- a/contrib/win32/hg.bat +++ b/contrib/win32/hg.bat @@ -4,6 +4,9 @@ setlocal set HG=%~f0 +# Clear the variable that's set by the test runner for now. +set PYTHONLEGACYWINDOWSSTDIO= + rem Use a full path to Python (relative to this script) if it exists, rem as the standard Python install does not put python.exe on the PATH... rem Otherwise, expect that python.exe can be found on the PATH. diff --git a/mercurial/exewrapper.c b/mercurial/exewrapper.c index c3edf68bea7541916526a7022bc513745d53a70b_bWVyY3VyaWFsL2V4ZXdyYXBwZXIuYw==..7905b7bc4b210503266ea4e72a6fd73ff8c43d67_bWVyY3VyaWFsL2V4ZXdyYXBwZXIuYw== 100644 --- a/mercurial/exewrapper.c +++ b/mercurial/exewrapper.c @@ -47,6 +47,8 @@ void(__cdecl * Py_SetPythonHome)(TCHAR * home); int(__cdecl * Py_Main)(int argc, TCHAR *argv[]); + /* Clear the variable that's set by the test runner */ + _wputenv(L"PYTHONLEGACYWINDOWSSTDIO="); if (GetModuleFileName(NULL, pyscript, _countof(pyscript)) == 0) { err = "GetModuleFileName failed"; goto bail;