Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 14025:1052b1421a48 stable
subrepo: tell Subversion when we are non-interactive (issue2759)
$ hg clone repo repo-clone -v
updating to branch default
resolving manifests
getting .hgsub
getting .hgsubstate
abort: svn: OPTIONS of 'https://subversion.srv/project': Server certificate
verification failed: issuer is not trusted (https://subversion.srv)
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 29 Apr 2011 03:05:48 -0500 |
parents | 71ea5b2b9517 |
children | 30ccb7d03864 9e8a9d45945c |
comparison
equal
deleted
inserted
replaced
14023:2cd1520664b8 | 14025:1052b1421a48 |
---|---|
520 self._ctx = ctx | 520 self._ctx = ctx |
521 self._ui = ctx._repo.ui | 521 self._ui = ctx._repo.ui |
522 | 522 |
523 def _svncommand(self, commands, filename=''): | 523 def _svncommand(self, commands, filename=''): |
524 path = os.path.join(self._ctx._repo.origroot, self._path, filename) | 524 path = os.path.join(self._ctx._repo.origroot, self._path, filename) |
525 cmd = ['svn'] + commands + [path] | 525 cmd = ['svn'] |
526 # Starting in svn 1.5 --non-interactive is a global flag | |
527 # instead of being per-command, but we need to support 1.4 so | |
528 # we have to be intelligent about what commands take | |
529 # --non-interactive. | |
530 if (not self._ui.interactive() and | |
531 commands[0] in ('update', 'checkout', 'commit')): | |
532 cmd.append('--non-interactive') | |
533 cmd.extend(commands) | |
534 cmd.append(path) | |
526 env = dict(os.environ) | 535 env = dict(os.environ) |
527 # Avoid localized output, preserve current locale for everything else. | 536 # Avoid localized output, preserve current locale for everything else. |
528 env['LC_MESSAGES'] = 'C' | 537 env['LC_MESSAGES'] = 'C' |
529 p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds, | 538 p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds, |
530 stdout=subprocess.PIPE, stderr=subprocess.PIPE, | 539 stdout=subprocess.PIPE, stderr=subprocess.PIPE, |