changeset 21034:693b4cb4330f

subrepo: return non-zero exit code when a subrepo push doesn't succeed
author Matt Mackall <mpm@selenic.com>
date Tue, 15 Apr 2014 14:15:35 -0400
parents 254f55b64e31
children e6e34c17b1cc
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Apr 14 23:27:31 2014 -0400
+++ b/mercurial/commands.py	Tue Apr 15 14:15:35 2014 -0400
@@ -4774,8 +4774,9 @@
         c = repo['']
         subs = c.substate # only repos that are committed
         for s in sorted(subs):
-            if c.sub(s).push(opts) == 0:
-                return False
+            result = c.sub(s).push(opts)
+            if result == 0:
+                return not result
     finally:
         del repo._subtoppath
     result = repo.push(other, opts.get('force'), revs=revs,