comparison mercurial/win32.py @ 39818:24e493ec2229

py3: rename pycompat.getcwd() to encoding.getcwd() (API) We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we need encoding.strtolocal() to encode the result of os.getcwd().
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 21 Sep 2018 19:48:23 -0400
parents edaa40dc5fe5
children 576474baa209
comparison
equal deleted inserted replaced
39817:94c25f694ec3 39818:24e493ec2229
582 args = subprocess.list2cmdline(pycompat.rapply(encoding.strfromlocal, args)) 582 args = subprocess.list2cmdline(pycompat.rapply(encoding.strfromlocal, args))
583 583
584 # TODO: CreateProcessW on py3? 584 # TODO: CreateProcessW on py3?
585 res = _kernel32.CreateProcessA( 585 res = _kernel32.CreateProcessA(
586 None, encoding.strtolocal(args), None, None, False, _CREATE_NO_WINDOW, 586 None, encoding.strtolocal(args), None, None, False, _CREATE_NO_WINDOW,
587 env, pycompat.getcwd(), ctypes.byref(si), ctypes.byref(pi)) 587 env, encoding.getcwd(), ctypes.byref(si), ctypes.byref(pi))
588 if not res: 588 if not res:
589 raise ctypes.WinError() 589 raise ctypes.WinError()
590 590
591 return pi.dwProcessId 591 return pi.dwProcessId
592 592