Mercurial > public > mercurial-scm > hg-stable
diff mercurial/utils/procutil.py @ 39841:f1d6021453c2
py3: remove a couple of superfluous calls to pycompat.rapply()
These places can only be strings.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 25 Sep 2018 23:25:36 -0400 |
parents | c31ce080eb75 |
children | a9f56e4501c1 |
line wrap: on
line diff
--- a/mercurial/utils/procutil.py Tue Sep 25 22:11:17 2018 -0400 +++ b/mercurial/utils/procutil.py Tue Sep 25 23:25:36 2018 -0400 @@ -137,7 +137,7 @@ # Setting bufsize to -1 lets the system decide the buffer size. # The default for bufsize is 0, meaning unbuffered. This leads to # poor performance on Mac OS X: http://bugs.python.org/issue4194 - p = subprocess.Popen(pycompat.rapply(tonativestr, cmd), + p = subprocess.Popen(tonativestr(cmd), shell=True, bufsize=-1, close_fds=closefds, stdin=subprocess.PIPE, stdout=subprocess.PIPE, @@ -149,7 +149,7 @@ return stdin, stdout, stderr def popen4(cmd, env=None, bufsize=-1): - p = subprocess.Popen(pycompat.rapply(tonativestr, cmd), + p = subprocess.Popen(tonativestr(cmd), shell=True, bufsize=bufsize, close_fds=closefds, stdin=subprocess.PIPE, stdout=subprocess.PIPE, @@ -159,7 +159,7 @@ def pipefilter(s, cmd): '''filter string S through command CMD, returning its output''' - p = subprocess.Popen(pycompat.rapply(tonativestr, cmd), + p = subprocess.Popen(tonativestr(cmd), shell=True, close_fds=closefds, stdin=subprocess.PIPE, stdout=subprocess.PIPE) pout, perr = p.communicate(s) @@ -351,12 +351,12 @@ cmd = quotecommand(cmd) env = shellenviron(environ) if out is None or isstdout(out): - rc = subprocess.call(pycompat.rapply(tonativestr, cmd), + rc = subprocess.call(tonativestr(cmd), shell=True, close_fds=closefds, env=tonativeenv(env), cwd=pycompat.rapply(tonativestr, cwd)) else: - proc = subprocess.Popen(pycompat.rapply(tonativestr, cmd), + proc = subprocess.Popen(tonativestr(cmd), shell=True, close_fds=closefds, env=tonativeenv(env), cwd=pycompat.rapply(tonativestr, cwd),