procutil: port over windows encoding fixes from logtoprocess
authorAugie Fackler <augie@google.com>
Tue, 16 Oct 2018 14:42:57 -0400
changeset 40548 8fab95aa5280
parent 40547 3fbfbc8c9f82
child 40549 2e09d1cae90c
procutil: port over windows encoding fixes from logtoprocess Differential Revision: https://phab.mercurial-scm.org/D5121
mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py	Wed Oct 03 14:01:04 2018 -0400
+++ b/mercurial/utils/procutil.py	Tue Oct 16 14:42:57 2018 -0400
@@ -481,8 +481,10 @@
         # we can't use close_fds *and* redirect stdin. I'm not sure that we
         # need to because the detached process has no console connection.
         subprocess.Popen(
-            script, shell=shell, env=env, close_fds=True,
-            creationflags=_creationflags, stdout=stdout, stderr=stderr)
+            tonativestr(script),
+            shell=shell, env=tonativeenv(env), close_fds=True,
+            creationflags=_creationflags, stdout=stdout,
+            stderr=stderr)
 else:
     def runbgcommand(cmd, env, shell=False, stdout=None, stderr=None):
         '''Spawn a command without waiting for it to finish.'''