[PATCH 2 of 8 V2] bundle2caps: advertises the available versions for changegroup packer
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri Oct 17 14:56:26 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1411619334 25200
# Wed Sep 24 21:28:54 2014 -0700
# Node ID df5caaacde8b95b5eda6ddef48b9bbbec8374a69
# Parent 7571e3b56091ecd772a4b845a1c72cae3a9abf25
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
@@ -806,10 +806,11 @@ 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.isenabled(repo, obsolete.exchangeopt):
supportedformat = tuple('V%i' % v for v in obsolete.formats)
caps['b2x:obsmarkers'] = supportedformat
return caps
More information about the Mercurial-devel
mailing list