Mercurial > hg > mercurial-source
changeset 40505:255d1885c7f8
py3: resolve Unicode issues around `hg serve` on Windows
Presumably we're going to want to use CreateProcessW(), and possibly get rid of
pycompat.getcwd() here (which maps to the DeprecationWarning causing
os.getcwdb()) to use os.getcwd() directly. But this was a minimal change to
get rid of some stacktraces in test-run-tests.t.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 19 Sep 2018 23:54:16 -0400 |
parents | ac32685011a3 |
children | 7d9b1b50cad5 |
files | mercurial/win32.py mercurial/windows.py |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/win32.py +++ b/mercurial/win32.py @@ -579,10 +579,11 @@ env = '\0' env += '\0' - args = subprocess.list2cmdline(args) + args = subprocess.list2cmdline(pycompat.rapply(encoding.strfromlocal, args)) + # TODO: CreateProcessW on py3? res = _kernel32.CreateProcessA( - None, args, None, None, False, _CREATE_NO_WINDOW, + None, encoding.strtolocal(args), None, None, False, _CREATE_NO_WINDOW, env, pycompat.getcwd(), ctypes.byref(si), ctypes.byref(pi)) if not res: raise ctypes.WinError()