[PATCH 06 of 12 V3] push: move bundle2-pushkey based bookmarks exchange in its own function

Boris Feld boris.feld at octobus.net
Mon Nov 20 11:51:57 EST 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1508088176 -7200
#      Sun Oct 15 19:22:56 2017 +0200
# Node ID 4e1cd835a6f067784fc4b3843fea34a397bb26b9
# Parent  fd2b6b05ecbe8aeb0d844112be6cc5d0e72a62bd
# EXP-Topic b2.bookmarks
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 4e1cd835a6f0
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 --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -896,8 +896,10 @@ def _pushb2bookmarks(pushop, bundler):
     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


More information about the Mercurial-devel mailing list