From patchwork Thu Sep 25 04:36:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2, of, 3, RFC] bundle2caps: advertises the available versions for changegroup packer From: Pierre-Yves David X-Patchwork-Id: 5979 Message-Id: To: mercurial-devel@selenic.com, Sune Foldager Cc: Pierre-Yves David Date: Wed, 24 Sep 2014 21:36:30 -0700 # HG changeset patch # User Pierre-Yves David # Date 1411619334 25200 # Wed Sep 24 21:28:54 2014 -0700 # Node ID d77b259843fe058eceef0e56fc05959b17b3a961 # Parent 7850f829f2b1a731653c96e78a5acc10300d02a3 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). diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -777,19 +777,19 @@ class unbundlepart(unpackermixin): return data capabilities = {'HG2X': (), 'b2x:listkeys': (), 'b2x:pushkey': (), - 'b2x:changegroup': (), } def getrepocaps(repo): """return the bundle2 capabilities for a given repo Exists to allow extensions (like evolution) to mutate the capabilities. """ caps = capabilities.copy() + caps['b2x:changegroup'] = tuple(sorted(changegroup.packermap.keys())) if obsolete._enabled: supportedformat = tuple('V%i' % v for v in obsolete.formats) caps['b2x:obsmarkers'] = supportedformat return caps