[PATCH] svn subrepo: tell Subversion when we are non-interactive (issue2759)
Augie Fackler
durin42 at gmail.com
Fri Apr 29 03:06:39 CDT 2011
# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1304064348 18000
# Node ID ac6ab343896771440b86af2b9defc7b31497f95b
# Parent 98f79a5c308665e1ce1b020bb66ed37f47f102e6
svn subrepo: tell Subversion when we are non-interactive (issue2759)
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -512,7 +512,16 @@
def _svncommand(self, commands, filename=''):
path = os.path.join(self._ctx._repo.origroot, self._path, filename)
- cmd = ['svn'] + commands + [path]
+ cmd = ['svn']
+ # Starting in svn 1.5 --non-interactive is a global flag
+ # instead of being per-command, but we need to support 1.4 so
+ # we have to be intelligent about what commands take
+ # --non-interactive.
+ if (not self._ui.interactive() and
+ commands[0] in ('update', 'checkout', 'commit')):
+ cmd.append('--non-interactive')
+ cmd.extend(commands)
+ cmd.append(path)
env = dict(os.environ)
# Avoid localized output, preserve current locale for everything else.
env['LC_MESSAGES'] = 'C'
More information about the Mercurial-devel
mailing list