mercurial/commands.py
changeset 22625 62ab9ca90b36
parent 22623 cd7e17aa6040
child 22626 fb74a5833467
--- a/mercurial/commands.py	Thu Sep 25 00:57:36 2014 -0700
+++ b/mercurial/commands.py	Thu Sep 25 02:53:29 2014 -0700
@@ -5074,11 +5074,10 @@
 
     result = not pushop.cgresult
 
-    if opts.get('bookmark'):
-        bresult = bookmarks.pushtoremote(ui, repo, other, opts['bookmark'])
-        if bresult == 2:
+    if pushop.bkresult is not None:
+        if pushop.bkresult == 2:
             result = 2
-        elif not result and bresult:
+        elif not result and pushop.bkresult:
             result = 2
 
     return result