--- a/mercurial/utils/procutil.py Sat Jul 04 11:15:58 2020 +0200
+++ b/mercurial/utils/procutil.py Sat Jul 04 11:21:44 2020 +0200
@@ -37,6 +37,11 @@
osutil = policy.importmod('osutil')
+if pycompat.iswindows:
+ from .. import windows as platform
+else:
+ from .. import posix as platform
+
def isatty(fp):
try:
@@ -94,11 +99,8 @@
stdout = os.fdopen(stdout.fileno(), 'wb', 1)
if pycompat.iswindows:
- from .. import windows as platform
+ stdout = platform.winstdout(stdout)
- stdout = platform.winstdout(stdout)
-else:
- from .. import posix as platform
findexe = platform.findexe
_gethgcmd = platform.gethgcmd