# HG changeset patch # User Pierre-Yves David # Date 1411808396 25200 # Node ID c9276945eba3c4fe659cc3e961c7577c64439484 # Parent f48ac29c2a9e24b6df96115464556b8dd767533e 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. diff -r f48ac29c2a9e -r c9276945eba3 mercurial/exchange.py --- 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