[PATCH 2 of 2] svn subrepo: tell Subversion when we are non-interactive (issue2759)

Augie Fackler durin42 at gmail.com
Mon Apr 11 07:50:27 CDT 2011


# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1302525268 18000
# Node ID dbaeeea102e8a45cfb4ab1a8cceac5294ef5e4c1
# Parent  e5feb6a3b3693352dc3652fc7e2ed422734a328a
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,11 @@
 
     def _svncommand(self, commands, filename=''):
         path = os.path.join(self._ctx._repo.origroot, self._path, filename)
-        cmd = ['svn'] + commands + [path]
+        cmd = ['svn']
+        if not self._ui.interactive():
+            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