comparison mercurial/commands.py @ 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 67b6f1144e90
children e6e34c17b1cc
comparison
equal deleted inserted replaced
21033:254f55b64e31 21034:693b4cb4330f
4772 try: 4772 try:
4773 # push subrepos depth-first for coherent ordering 4773 # push subrepos depth-first for coherent ordering
4774 c = repo[''] 4774 c = repo['']
4775 subs = c.substate # only repos that are committed 4775 subs = c.substate # only repos that are committed
4776 for s in sorted(subs): 4776 for s in sorted(subs):
4777 if c.sub(s).push(opts) == 0: 4777 result = c.sub(s).push(opts)
4778 return False 4778 if result == 0:
4779 return not result
4779 finally: 4780 finally:
4780 del repo._subtoppath 4781 del repo._subtoppath
4781 result = repo.push(other, opts.get('force'), revs=revs, 4782 result = repo.push(other, opts.get('force'), revs=revs,
4782 newbranch=opts.get('new_branch')) 4783 newbranch=opts.get('new_branch'))
4783 4784