Skip to content
Snippets Groups Projects
Commit 0913a49e authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

bundle-spec: add an official method to format a spec into a string

This will be useful for automatic-clonebundles.
parent 40638610
No related branches found
No related tags found
2 merge requests!618Draft: 6.5rc0,!614bridge automatic clone bundle generation and inline clone bundle serving
......@@ -89,6 +89,12 @@
if overwrite or key not in self._explicit_params:
self._explicit_params[key] = value
def as_spec(self):
parts = [b"%s-%s" % (self.compression, self.version)]
for param in sorted(self._explicit_params.items()):
parts.append(b'%s=%s' % param)
return b';'.join(parts)
# Maps bundle version human names to changegroup versions.
_bundlespeccgversions = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment