# HG changeset patch # User Matt Mackall # Date 2014-04-15 18:15:35 # Node ID 693b4cb4330fdeda073e68983396079f463b3f03 # Parent 254f55b64e318bb595e147bda8247a32d5b09498 subrepo: return non-zero exit code when a subrepo push doesn't succeed diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4774,8 +4774,9 @@ def push(ui, repo, dest=None, **opts): 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,