diff mercurial/commands.py @ 22625:62ab9ca90b36

push: perform bookmark export in the push function This part is responsible for adding new bookmarks on the remote. Before that, it was done on its own in `commands.push`. The export is still not integrated with the rest of the push process, but at least it now dwells in the right function.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 25 Sep 2014 02:53:29 -0700
parents cd7e17aa6040
children fb74a5833467
line wrap: on
line diff
--- 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