# HG changeset patch # User Matt Mackall # Date 1272670338 18000 # Node ID 49e14ec67144c0295e7116f5a32799c591fb2105 # Parent 26abd91d9e8475a78e1def9c484124f1a36f7e70 subrepo: propagate and catch push failures diff -r 26abd91d9e84 -r 49e14ec67144 mercurial/commands.py --- a/mercurial/commands.py Mon Apr 26 20:13:14 2010 +0900 +++ b/mercurial/commands.py Fri Apr 30 18:32:18 2010 -0500 @@ -2453,7 +2453,8 @@ c = repo[''] subs = c.substate # only repos that are committed for s in sorted(subs): - c.sub(s).push(opts.get('force')) + if not c.sub(s).push(opts.get('force')): + return False r = repo.push(other, opts.get('force'), revs=revs) return r == 0 diff -r 26abd91d9e84 -r 49e14ec67144 mercurial/subrepo.py --- a/mercurial/subrepo.py Mon Apr 26 20:13:14 2010 +0900 +++ b/mercurial/subrepo.py Fri Apr 30 18:32:18 2010 -0500 @@ -258,12 +258,13 @@ c = self._repo[''] subs = c.substate # only repos that are committed for s in sorted(subs): - c.sub(s).push(force) + if not c.sub(s).push(force): + return False self._repo.ui.status(_('pushing subrepo %s\n') % self._path) dsturl = _abssource(self._repo, True) other = hg.repository(self._repo.ui, dsturl) - self._repo.push(other, force) + return self._repo.push(other, force) class svnsubrepo(object): def __init__(self, ctx, path, state):