perf: make perf::bundle compatible before
61ba04693d65
A small change to make it compatible with a wider set of revision.
--- a/contrib/perf.py Thu Sep 01 16:51:26 2022 +0200
+++ b/contrib/perf.py Fri Aug 26 00:48:54 2022 +0200
@@ -1092,9 +1092,14 @@
bundle_spec = opts.get(b'type')
- bundle_spec = bundlecaches.parsebundlespec(repo, bundle_spec, strict=False)
-
- cgversion = bundle_spec.params[b"cg.version"]
+ bundle_spec = parsebundlespec(repo, bundle_spec, strict=False)
+
+ cgversion = bundle_spec.params.get(b"cg.version")
+ if cgversion is None:
+ if bundle_spec.version == b'v1':
+ cgversion = b'01'
+ if bundle_spec.version == b'v2':
+ cgversion = b'02'
if cgversion not in changegroup.supportedoutgoingversions(repo):
err = b"repository does not support bundle version %s"
raise error.Abort(err % cgversion)