changeset 35271:3fd5f05a5b87

push: move bundle2-pushkey based bookmarks exchange in its own function We are about to introduce an alternative way to push bookmark over bundle2.
author Boris Feld <boris.feld@octobus.net>
date Sun, 15 Oct 2017 19:22:56 +0200
parents f392066d127c
children ae79d878702b
files mercurial/exchange.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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