changeset 14488:278a4e0fdfed

subrepo: svn abort now depends on exit code (issue2833)
author Regis Desgroppes <regis.desgroppes@nokia.com>
date Tue, 31 May 2011 16:22:04 -0500
parents 37901cf0680b
children 3a27faf9a999
files mercurial/subrepo.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Tue May 31 12:41:22 2011 +0200
+++ b/mercurial/subrepo.py	Tue May 31 16:22:04 2011 -0500
@@ -544,11 +544,13 @@
         env['LC_MESSAGES'] = 'C'
         p = subprocess.Popen(cmd, bufsize=-1, close_fds=util.closefds,
                              stdout=subprocess.PIPE, stderr=subprocess.PIPE,
-                             universal_newlines=True, env=env)
+                              universal_newlines=True, env=env)
         stdout, stderr = p.communicate()
         stderr = stderr.strip()
+        if p.returncode:
+            raise util.Abort(stderr or 'exited with code %d' % p.returncode)
         if stderr:
-            raise util.Abort(stderr)
+            self._ui.warn(stderr + '\n')
         return stdout
 
     @propertycache