diff 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
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