# HG changeset patch # User Matt Mackall # Date 2012-01-30 17:26:20 # Node ID 04604d1a9fc374ed85ff912e13b9e00c458659ed # Parent 7f47873d748492e7a687416420281adc9830bde9 push: more precise failure check on subrepo push This will let us distinguish between nothing to push and push failed diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4419,7 +4419,7 @@ def push(ui, repo, dest=None, **opts): c = repo[''] subs = c.substate # only repos that are committed for s in sorted(subs): - if not c.sub(s).push(opts): + if c.sub(s).push(opts) == 0: return False finally: del repo._subtoppath diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -528,7 +528,7 @@ class hgsubrepo(abstractsubrepo): c = self._repo[''] subs = c.substate # only repos that are committed for s in sorted(subs): - if not c.sub(s).push(opts): + if c.sub(s).push(opts) == 0: return False dsturl = _abssource(self._repo, True)