pull: retrieve bookmarks through bundle2
We can retrieve any pushkey namespace through bundle2. So we also ask for
bookmark data and use them to update the local repo.
--- a/mercurial/exchange.py Sat Sep 27 01:37:56 2014 -0700
+++ b/mercurial/exchange.py Sat Sep 27 01:59:56 2014 -0700
@@ -892,7 +892,7 @@
kwargs['heads'] = pullop.heads or pullop.rheads
kwargs['cg'] = pullop.fetch
if 'b2x:listkeys' in remotecaps:
- kwargs['listkeys'] = ['phase']
+ kwargs['listkeys'] = ['phase', 'bookmarks']
if not pullop.fetch:
pullop.repo.ui.status(_("no changes found\n"))
pullop.cgresult = 0
@@ -922,6 +922,12 @@
if namespace == 'phases':
_pullapplyphases(pullop, value)
+ # processing bookmark update
+ for namespace, value in op.records['listkeys']:
+ if namespace == 'bookmarks':
+ pullop.remotebookmarks = value
+ _pullbookmarks(pullop)
+
def _pullbundle2extraprepare(pullop, kwargs):
"""hook function so that extensions can extend the getbundle call"""
pass