push: feed pushoperation object to _pushbookmark function
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 30 Jan 2014 17:51:41 -0800
changeset 20431 bebf8b8479f3
parent 20430 d98ba4a87427
child 20432 1b926f0bbf8a
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.
mercurial/exchange.py
--- 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'),