push: feed pushoperation object to _pushbookmark function
This will able the bookmark synchronisation to have full information on the
ongoing push and pass information to other operation.
--- a/mercurial/exchange.py Mon Feb 10 17:31:26 2014 -0600
+++ b/mercurial/exchange.py Thu Jan 30 17:51:41 2014 -0800
@@ -255,13 +255,16 @@
if locallock is not None:
locallock.release()
- _pushbookmark(pushop.ui, unfi, pushop.remote, pushop.revs)
+ _pushbookmark(pushop)
return ret
-def _pushbookmark(ui, repo, remote, revs):
+def _pushbookmark(pushop):
"""Update bookmark position on remote"""
+ ui = pushop.ui
+ repo = pushop.repo.unfiltered()
+ remote = pushop.remote
ui.debug("checking for updated bookmarks\n")
- revnums = map(repo.changelog.rev, revs or [])
+ revnums = map(repo.changelog.rev, pushop.revs or [])
ancestors = [a for a in repo.changelog.ancestors(revnums, inclusive=True)]
(addsrc, adddst, advsrc, advdst, diverge, differ, invalid
) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'),