# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2016-12-21 20:24:17 # Node ID 5861bdbeb9a3a9e5d34df80d24d78bdbe4eea5b8 # Parent 6ada1658fc6b13d4862ff290914c9acb9b200336 py3: use pycompat.getcwd instead of os.getcwd diff --git a/mercurial/win32.py b/mercurial/win32.py --- a/mercurial/win32.py +++ b/mercurial/win32.py @@ -14,7 +14,10 @@ import os import random import subprocess -from . import encoding +from . import ( + encoding, + pycompat, +) _kernel32 = ctypes.windll.kernel32 _advapi32 = ctypes.windll.advapi32 @@ -440,7 +443,7 @@ def spawndetached(args): res = _kernel32.CreateProcessA( None, args, None, None, False, _CREATE_NO_WINDOW, - env, os.getcwd(), ctypes.byref(si), ctypes.byref(pi)) + env, pycompat.getcwd(), ctypes.byref(si), ctypes.byref(pi)) if not res: raise ctypes.WinError() diff --git a/tests/test-check-code.t b/tests/test-check-code.t --- a/tests/test-check-code.t +++ b/tests/test-check-code.t @@ -31,9 +31,6 @@ New errors are not allowed. Warnings are > policy = os.environ.get('HGMODULEPOLICY', policy) use encoding.environ instead (py3) Skipping mercurial/statprof.py it has no-che?k-code (glob) - mercurial/win32.py:443: - > env, os.getcwd(), ctypes.byref(si), ctypes.byref(pi)) - use pycompat.getcwd instead (py3) [1] @commands in debugcommands.py should be in alphabetical order.