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