changeset 20431:bebf8b8479f3

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.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 30 Jan 2014 17:51:41 -0800
parents d98ba4a87427
children 1b926f0bbf8a
files mercurial/exchange.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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'),