subrepo: svn abort now depends on exit code (issue2833)
authorRegis Desgroppes <regis.desgroppes@nokia.com>
Tue, 31 May 2011 16:22:04 -0500
changeset 14488 278a4e0fdfed
parent 14487 37901cf0680b
child 14489 3a27faf9a999
subrepo: svn abort now depends on exit code (issue2833)
mercurial/subrepo.py
--- 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