# HG changeset patch # User Pierre-Yves David # Date 1411638809 25200 # Node ID 62ab9ca90b367845075c3e68806c6e8588c69fc4 # Parent eef31f9a4c0f9f58cd5e6006e503367a974f4451 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. diff -r eef31f9a4c0f -r 62ab9ca90b36 mercurial/commands.py --- 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 diff -r eef31f9a4c0f -r 62ab9ca90b36 mercurial/exchange.py --- a/mercurial/exchange.py Thu Sep 25 00:57:36 2014 -0700 +++ b/mercurial/exchange.py Thu Sep 25 02:53:29 2014 -0700 @@ -216,6 +216,10 @@ if locallock is not None: locallock.release() + if pushop.bookmarks: + pushop.bkresult = bookmod.pushtoremote(repo.ui, repo, remote, + pushop.bookmarks) + return pushop # list of steps to perform discovery before push