contrib/hgclient.py
changeset 40984 6a372f943e49
parent 40589 054d0fcba2c4
child 43076 2372284d9457
--- a/contrib/hgclient.py	Mon Dec 17 23:08:26 2018 -0500
+++ b/contrib/hgclient.py	Tue Dec 18 00:54:32 2018 -0500
@@ -33,7 +33,12 @@
         cmdline += [b'-R', path]
     cmdline.extend(extraargs)
 
-    server = subprocess.Popen(cmdline, stdin=subprocess.PIPE,
+    def tonative(cmdline):
+        if os.name != r'nt':
+            return cmdline
+        return [arg.decode("utf-8") for arg in cmdline]
+
+    server = subprocess.Popen(tonative(cmdline), stdin=subprocess.PIPE,
                               stdout=subprocess.PIPE)
 
     return server