mercurial/scmutil.py
changeset 39826 c31ce080eb75
parent 39777 b63dee7bd0d9
child 39836 f1d6021453c2
--- a/mercurial/scmutil.py	Fri Sep 21 21:14:27 2018 -0400
+++ b/mercurial/scmutil.py	Sun Sep 23 00:47:04 2018 -0400
@@ -1339,9 +1339,11 @@
         if spec.startswith("shell:"):
             # external commands should be run relative to the repo root
             cmd = spec[6:]
-            proc = subprocess.Popen(cmd, shell=True, bufsize=-1,
+            proc = subprocess.Popen(pycompat.rapply(procutil.tonativestr, cmd),
+                                    shell=True, bufsize=-1,
                                     close_fds=procutil.closefds,
-                                    stdout=subprocess.PIPE, cwd=repo.root)
+                                    stdout=subprocess.PIPE,
+                                    cwd=procutil.tonativestr(repo.root))
             src = proc.stdout
         else:
             # treat as a URL or file