510 self._ctx = ctx |
510 self._ctx = ctx |
511 self._ui = ctx._repo.ui |
511 self._ui = ctx._repo.ui |
512 |
512 |
513 def _svncommand(self, commands, filename=''): |
513 def _svncommand(self, commands, filename=''): |
514 path = os.path.join(self._ctx._repo.origroot, self._path, filename) |
514 path = os.path.join(self._ctx._repo.origroot, self._path, filename) |
515 cmd = ['svn'] + commands + [path] |
515 cmd = ['svn'] |
|
516 # Starting in svn 1.5 --non-interactive is a global flag |
|
517 # instead of being per-command, but we need to support 1.4 so |
|
518 # we have to be intelligent about what commands take |
|
519 # --non-interactive. |
|
520 if (not self._ui.interactive() and |
|
521 commands[0] in ('update', 'checkout', 'commit')): |
|
522 cmd.append('--non-interactive') |
|
523 cmd.extend(commands) |
|
524 cmd.append(path) |
516 env = dict(os.environ) |
525 env = dict(os.environ) |
517 # Avoid localized output, preserve current locale for everything else. |
526 # Avoid localized output, preserve current locale for everything else. |
518 env['LC_MESSAGES'] = 'C' |
527 env['LC_MESSAGES'] = 'C' |
519 p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds, |
528 p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds, |
520 stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
529 stdout=subprocess.PIPE, stderr=subprocess.PIPE, |