merge with stable
authorMatt Mackall <mpm@selenic.com>
Sat, 30 Apr 2011 02:42:05 -0500
changeset 14047 30ccb7d03864
parent 14046 b24e5a708fad (current diff)
parent 14025 1052b1421a48 (diff)
child 14048 58e58406ed19
merge with stable
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Thu Apr 28 17:02:39 2011 +0200
+++ b/mercurial/subrepo.py	Sat Apr 30 02:42:05 2011 -0500
@@ -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'