comparison mercurial/commands.py @ 22621:76a43e0db516

push: sanitize handling of bookmark push return value Mixing return and assignment does not make sense, let's unify this.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 25 Sep 2014 02:53:49 -0700
parents 1625770c2ce1
children cd7e17aa6040
comparison
equal deleted inserted replaced
22620:4d52e6eb98ea 22621:76a43e0db516
5074 result = not pushop.cgresult 5074 result = not pushop.cgresult
5075 5075
5076 if opts.get('bookmark'): 5076 if opts.get('bookmark'):
5077 bresult = bookmarks.pushtoremote(ui, repo, other, opts['bookmark']) 5077 bresult = bookmarks.pushtoremote(ui, repo, other, opts['bookmark'])
5078 if bresult == 2: 5078 if bresult == 2:
5079 return 2 5079 result = 2
5080 if not result and bresult: 5080 elif not result and bresult:
5081 result = 2 5081 result = 2
5082 5082
5083 return result 5083 return result
5084 5084
5085 @command('recover', []) 5085 @command('recover', [])