diff -r 91d63fd58e7d -r f1d6021453c2 mercurial/scmutil.py --- a/mercurial/scmutil.py Tue Sep 25 22:11:17 2018 -0400 +++ b/mercurial/scmutil.py Tue Sep 25 23:25:36 2018 -0400 @@ -1339,7 +1339,7 @@ if spec.startswith("shell:"): # external commands should be run relative to the repo root cmd = spec[6:] - proc = subprocess.Popen(pycompat.rapply(procutil.tonativestr, cmd), + proc = subprocess.Popen(procutil.tonativestr(cmd), shell=True, bufsize=-1, close_fds=procutil.closefds, stdout=subprocess.PIPE,