[PATCH 9 of 9 (38 total)] push: feed pushoperation object to _pushbookmark function
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Sat Feb 1 19:33:05 CST 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1391133101 28800
# Thu Jan 30 17:51:41 2014 -0800
# Node ID 1129420c8bef3308c0e4a9fa49a2825f0a2abb2a
# Parent bfddf50093a9713b679db4e45f79469ec8cd9c72
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.
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -252,17 +252,20 @@ def push(repo, remote, force=False, revs
lock.release()
finally:
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
+ 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'),
srchex=hex)
More information about the Mercurial-devel
mailing list