changeset 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 4d52e6eb98ea
children ce6b9edee725
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Sep 25 01:43:24 2014 -0700
+++ b/mercurial/commands.py	Thu Sep 25 02:53:49 2014 -0700
@@ -5076,8 +5076,8 @@
     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