##// END OF EJS Templates
subrepo: use subprocess.Popen without the shell...
Eric Eisner -
r13108:dcaad69c default
parent child Browse files
Show More
@@ -484,13 +484,10 b' class svnsubrepo(abstractsubrepo):'
484 484 def _svncommand(self, commands, filename=''):
485 485 path = os.path.join(self._ctx._repo.origroot, self._path, filename)
486 486 cmd = ['svn'] + commands + [path]
487 cmd = [util.shellquote(arg) for arg in cmd]
488 cmd = util.quotecommand(' '.join(cmd))
489 487 env = dict(os.environ)
490 488 # Avoid localized output, preserve current locale for everything else.
491 489 env['LC_MESSAGES'] = 'C'
492 p = subprocess.Popen(cmd, shell=True, bufsize=-1,
493 close_fds=util.closefds,
490 p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds,
494 491 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
495 492 universal_newlines=True, env=env)
496 493 stdout, stderr = p.communicate()
@@ -626,12 +623,8 b' class gitsubrepo(abstractsubrepo):'
626 623 The methods tries to call the git command. versions previor to 1.6.0
627 624 are not supported and very probably fail.
628 625 """
629 cmd = ['git'] + commands
630 cmd = [util.shellquote(arg) for arg in cmd]
631 cmd = util.quotecommand(' '.join(cmd))
632
633 626 # print git's stderr, which is mostly progress and useful info
634 p = subprocess.Popen(cmd, shell=True, bufsize=-1, cwd=cwd, env=env,
627 p = subprocess.Popen(['git'] + commands, bufsize=-1, cwd=cwd, env=env,
635 628 close_fds=util.closefds,
636 629 stdout=subprocess.PIPE)
637 630 if stream:
General Comments 0
You need to be logged in to leave comments. Login now