##// END OF EJS Templates
subrepo: make stdin for svn a pipe for non-interactive use (issue2759)...
Augie Fackler -
r14492:f0f96509 default
parent child Browse files
Show More
@@ -528,12 +528,16 class svnsubrepo(abstractsubrepo):
528 528
529 529 def _svncommand(self, commands, filename=''):
530 530 cmd = ['svn']
531 extrakw = {}
532 if not self._ui.interactive():
533 # Making stdin be a pipe should prevent svn from behaving
534 # interactively even if we can't pass --non-interactive.
535 extrakw['stdin'] = subprocess.PIPE
531 536 # Starting in svn 1.5 --non-interactive is a global flag
532 537 # instead of being per-command, but we need to support 1.4 so
533 538 # we have to be intelligent about what commands take
534 539 # --non-interactive.
535 if (not self._ui.interactive() and
536 commands[0] in ('update', 'checkout', 'commit')):
540 if commands[0] in ('update', 'checkout', 'commit'):
537 541 cmd.append('--non-interactive')
538 542 cmd.extend(commands)
539 543 if filename is not None:
@@ -544,7 +548,7 class svnsubrepo(abstractsubrepo):
544 548 env['LC_MESSAGES'] = 'C'
545 549 p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds,
546 550 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
547 universal_newlines=True, env=env)
551 universal_newlines=True, env=env, **extrakw)
548 552 stdout, stderr = p.communicate()
549 553 stderr = stderr.strip()
550 554 if p.returncode:
General Comments 0
You need to be logged in to leave comments. Login now