# HG changeset patch # User Boris Feld # Date 1508088176 -7200 # Node ID 3fd5f05a5b876d35991e920c7ce61f5bea9dffdb # Parent f392066d127ca624275f7e3bcbabc2ce07ff0164 push: move bundle2-pushkey based bookmarks exchange in its own function We are about to introduce an alternative way to push bookmark over bundle2. diff -r f392066d127c -r 3fd5f05a5b87 mercurial/exchange.py --- a/mercurial/exchange.py Tue Oct 17 12:07:24 2017 +0200 +++ b/mercurial/exchange.py Sun Oct 15 19:22:56 2017 +0200 @@ -897,8 +897,10 @@ if 'bookmarks' in pushop.stepsdone: return b2caps = bundle2.bundle2caps(pushop.remote) - if 'pushkey' not in b2caps: - return + if 'pushkey' in b2caps: + return _pushb2bookmarkspushkey(pushop, bundler) + +def _pushb2bookmarkspushkey(pushop, bundler): pushop.stepsdone.add('bookmarks') part2book = [] enc = pushkey.encode