@@ -1000,32 +1000,33 @@ def getbundle(repo, source, heads=None,
bundler.newpart('b2x:changegroup', data=cg.getchunks())
listkeys = kwargs.get('listkeys', ())
for namespace in listkeys:
part = bundler.newpart('b2x:listkeys')
part.addparam('namespace', namespace)
keys = repo.listkeys(namespace).items()
part.data = pushkey.encodekeys(keys)
_getbundleobsmarkerpart(bundler, repo, source, heads=heads, common=common,
- bundlecaps=bundlecaps, **kwargs)
+ bundlecaps=bundlecaps, b2caps=b2caps, **kwargs)
_getbundleextrapart(bundler, repo, source, heads=heads, common=common,
- bundlecaps=bundlecaps, **kwargs)
+ bundlecaps=bundlecaps, b2caps=b2caps, **kwargs)
return util.chunkbuffer(bundler.getchunks())
def _getbundleobsmarkerpart(bundler, repo, source, heads=None, common=None,
- bundlecaps=None, **kwargs):
+ bundlecaps=None, b2caps=None, **kwargs):
+ """add an obsolescence markers part to the requested bundle"""
if kwargs.get('obsmarkers', False):
if heads is None:
heads = repo.heads()
subset = [c.node() for c in repo.set('::%ln', heads)]
markers = repo.obsstore.relevantmarkers(subset)
buildobsmarkerspart(bundler, markers)
def _getbundleextrapart(bundler, repo, source, heads=None, common=None,
- bundlecaps=None, **kwargs):
+ bundlecaps=None, b2caps=None, **kwargs):
"""hook function to let extensions add parts to the requested bundle"""
pass
def check_heads(repo, their_heads, context):
"""check if the heads of a repo have been modified
Used by peer for unbundling.
"""