# HG changeset patch # User Pierre-Yves David # Date 2014-09-25 09:53:49 # Node ID 76a43e0db516a83af6e43548e77041ae1055b1d0 # Parent 4d52e6eb98ea18a30448adca185cc9446ea78c31 push: sanitize handling of bookmark push return value Mixing return and assignment does not make sense, let's unify this. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5076,8 +5076,8 @@ def push(ui, repo, dest=None, **opts): if opts.get('bookmark'): bresult = bookmarks.pushtoremote(ui, repo, other, opts['bookmark']) if bresult == 2: - return 2 - if not result and bresult: + result = 2 + elif not result and bresult: result = 2 return result