# HG changeset patch # User Pierre-Yves David # Date 1653470836 -7200 # Node ID d89bfc07528996f384d274c13d73bd9acec000a3 # Parent 1b04d5213d0f6700b39d62f16066ace3e3342008 bundlespec: do not check for `-` in the params portion of the bundlespec Otherwise bundle parameter with `-` in their names result in a crash. diff -r 1b04d5213d0f -r d89bfc075289 mercurial/bundlecaches.py --- a/mercurial/bundlecaches.py Wed May 18 10:38:11 2022 +0100 +++ b/mercurial/bundlecaches.py Wed May 25 11:27:16 2022 +0200 @@ -192,7 +192,8 @@ % spec ) - if b'-' in spec: + pre_args = spec.split(b';', 1)[0] + if b'-' in pre_args: compression, version = spec.split(b'-', 1) if compression not in util.compengines.supportedbundlenames: diff -r 1b04d5213d0f -r d89bfc075289 tests/test-obsolete-bundle-strip.t --- a/tests/test-obsolete-bundle-strip.t Wed May 18 10:38:11 2022 +0100 +++ b/tests/test-obsolete-bundle-strip.t Wed May 25 11:27:16 2022 +0200 @@ -1494,6 +1494,14 @@ obsmarkers -- {} (mandatory: True) version: 1 (50 bytes) 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + + $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes;obsolescence-mandatory=no' --all --hidden bundle-type-with-obs-adv + 1 changesets found + $ hg debugbundle bundle-type-with-obs-adv --part-type obsmarkers + Stream params: {Compression: BZ} + obsmarkers -- {} (mandatory: False) + version: 1 (50 bytes) + 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} $ hg bundle -R repo-with-obs --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs 1 changesets found $ hg debugbundle bundle-type-without-obs --part-type obsmarkers