changeset 470:6bfaa9deb432

svnexternals: display svn commands output with --verbose Really useful to debug svn connectivity or locking problems.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 18 Jul 2009 20:44:33 -0500
parents 5567af673f83
children 893e40e97f6c
files hgsubversion/svnexternals.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnexternals.py
+++ b/hgsubversion/svnexternals.py
@@ -242,9 +242,13 @@ class externalsupdater:
         args = ['svn'] + args
         self.ui.debug(_('updating externals: %r, cwd=%s\n') % (args, cwd))
         shell = os.name == 'nt'
-        r = subprocess.call(args, cwd=cwd, shell=shell,
-                            stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-        if r != 0: raise hgutil.Abort("subprocess '%s' failed" % ' '.join(args))
+        p = subprocess.Popen(args, cwd=cwd, shell=shell,
+                             stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        for line in p.stdout:
+            self.ui.note(line)
+        p.wait()
+        if p.returncode != 0:
+            raise hgutil.Abort("subprocess '%s' failed" % ' '.join(args))
 
 def updateexternals(ui, args, repo, **opts):
     """update repository externals