Patchwork [2,of,8] bundle2caps: advertises the available versions for changegroup packer

login
register
mail settings
Submitter Sune Foldager
Date Oct. 17, 2014, 1:14 p.m.
Message ID <9280656032da93b18a28.1413551693@Cuivienen.local>
Download mbox | patch
Permalink /patch/6361/
State Superseded
Headers show

Comments

Sune Foldager - Oct. 17, 2014, 1:14 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1411619334 25200
#      Wed Sep 24 21:28:54 2014 -0700
# Node ID 9280656032da93b18a28333506f19e394ed2680a
# Parent  e4f93393a4e62d3d8fd4e26acfde28d1abef11f1
bundle2caps: advertises the available versions for changegroup packer

This will let bundle2 client and server detect what packer they should be using.

This detection part is not done. I expect it to be done with the addition of the
second packer (with general delta support).

Patch

diff -r e4f93393a4e6 -r 9280656032da mercurial/bundle2.py
--- a/mercurial/bundle2.py	Wed Sep 24 21:24:06 2014 -0700
+++ b/mercurial/bundle2.py	Wed Sep 24 21:28:54 2014 -0700
@@ -779,7 +779,6 @@ 
 capabilities = {'HG2X': (),
                 'b2x:listkeys': (),
                 'b2x:pushkey': (),
-                'b2x:changegroup': (),
                }
 
 def getrepocaps(repo):
@@ -788,6 +787,7 @@ 
     Exists to allow extensions (like evolution) to mutate the capabilities.
     """
     caps = capabilities.copy()
+    caps['b2x:changegroup'] = tuple(sorted(changegroup.packermap.keys()))
     if obsolete.isenabled(repo, obsolete.exchangeopt):
         supportedformat = tuple('V%i' % v for v in obsolete.formats)
         caps['b2x:obsmarkers'] = supportedformat