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