##// END OF EJS Templates
py3: remove a couple of superfluous calls to pycompat.rapply()...
Matt Harbison -
r39868:f1d60214 default
parent child Browse files
Show More
@@ -402,7 +402,7 b' class commandline(object):'
402 402
403 403 def _run(self, cmd, *args, **kwargs):
404 404 def popen(cmdline):
405 p = subprocess.Popen(pycompat.rapply(procutil.tonativestr, cmdline),
405 p = subprocess.Popen(procutil.tonativestr(cmdline),
406 406 shell=True, bufsize=-1,
407 407 close_fds=procutil.closefds,
408 408 stdout=subprocess.PIPE)
@@ -452,7 +452,7 b' def fixfile(ui, opts, fixers, fixctx, pa'
452 452 continue
453 453 ui.debug('subprocess: %s\n' % (command,))
454 454 proc = subprocess.Popen(
455 pycompat.rapply(procutil.tonativestr, command),
455 procutil.tonativestr(command),
456 456 shell=True,
457 457 cwd=procutil.tonativestr(b'/'),
458 458 stdin=subprocess.PIPE,
@@ -66,7 +66,7 b' def uisetup(ui):'
66 66 # we can't use close_fds *and* redirect stdin. I'm not sure that we
67 67 # need to because the detached process has no console connection.
68 68 subprocess.Popen(
69 pycompat.rapply(procutil.tonativestr, script),
69 procutil.tonativestr(script),
70 70 shell=True, env=procutil.tonativeenv(env), close_fds=True,
71 71 creationflags=_creationflags)
72 72 else:
@@ -87,7 +87,7 b' def uisetup(ui):'
87 87 # connect stdin to devnull to make sure the subprocess can't
88 88 # muck up that stream for mercurial.
89 89 subprocess.Popen(
90 pycompat.rapply(procutil.tonativestr, script),
90 procutil.tonativestr(script),
91 91 shell=True, stdin=open(os.devnull, 'r'),
92 92 env=procutil.tonativeenv(env),
93 93 close_fds=True, **newsession)
@@ -1339,7 +1339,7 b' def extdatasource(repo, source):'
1339 1339 if spec.startswith("shell:"):
1340 1340 # external commands should be run relative to the repo root
1341 1341 cmd = spec[6:]
1342 proc = subprocess.Popen(pycompat.rapply(procutil.tonativestr, cmd),
1342 proc = subprocess.Popen(procutil.tonativestr(cmd),
1343 1343 shell=True, bufsize=-1,
1344 1344 close_fds=procutil.closefds,
1345 1345 stdout=subprocess.PIPE,
@@ -137,7 +137,7 b' def popen2(cmd, env=None):'
137 137 # Setting bufsize to -1 lets the system decide the buffer size.
138 138 # The default for bufsize is 0, meaning unbuffered. This leads to
139 139 # poor performance on Mac OS X: http://bugs.python.org/issue4194
140 p = subprocess.Popen(pycompat.rapply(tonativestr, cmd),
140 p = subprocess.Popen(tonativestr(cmd),
141 141 shell=True, bufsize=-1,
142 142 close_fds=closefds,
143 143 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
@@ -149,7 +149,7 b' def popen3(cmd, env=None):'
149 149 return stdin, stdout, stderr
150 150
151 151 def popen4(cmd, env=None, bufsize=-1):
152 p = subprocess.Popen(pycompat.rapply(tonativestr, cmd),
152 p = subprocess.Popen(tonativestr(cmd),
153 153 shell=True, bufsize=bufsize,
154 154 close_fds=closefds,
155 155 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
@@ -159,7 +159,7 b' def popen4(cmd, env=None, bufsize=-1):'
159 159
160 160 def pipefilter(s, cmd):
161 161 '''filter string S through command CMD, returning its output'''
162 p = subprocess.Popen(pycompat.rapply(tonativestr, cmd),
162 p = subprocess.Popen(tonativestr(cmd),
163 163 shell=True, close_fds=closefds,
164 164 stdin=subprocess.PIPE, stdout=subprocess.PIPE)
165 165 pout, perr = p.communicate(s)
@@ -351,12 +351,12 b' def system(cmd, environ=None, cwd=None, '
351 351 cmd = quotecommand(cmd)
352 352 env = shellenviron(environ)
353 353 if out is None or isstdout(out):
354 rc = subprocess.call(pycompat.rapply(tonativestr, cmd),
354 rc = subprocess.call(tonativestr(cmd),
355 355 shell=True, close_fds=closefds,
356 356 env=tonativeenv(env),
357 357 cwd=pycompat.rapply(tonativestr, cwd))
358 358 else:
359 proc = subprocess.Popen(pycompat.rapply(tonativestr, cmd),
359 proc = subprocess.Popen(tonativestr(cmd),
360 360 shell=True, close_fds=closefds,
361 361 env=tonativeenv(env),
362 362 cwd=pycompat.rapply(tonativestr, cwd),
General Comments 0
You need to be logged in to leave comments. Login now