diff mercurial/bundlecaches.py @ 48623:baddab229b86

stream-clone: add a explicit set list requirements relevant to stream clone This set explicitly lists all the requirements that "stream clone" will preserve. Any other one will not be preserved. The role of listing the relevant one was previously filled by `repo.supportedformat`, but it seems clearer to use that such global and explicit set. The `repo.supportedformat` attribute will be cleaned up in a later changeset The true meaning of `repo.supportedformat` vs `repo._basesupported` was lost over time so, the content is currently bad. For example, `dirstate-v2` is currently considered relevant to the stream clone, or internal phase is missing. We kept the same content in this changeset and we will fix them later. Differential Revision: https://phab.mercurial-scm.org/D12032
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 17 Jan 2022 19:26:36 +0100
parents dc3800569157
children 642e31cb55f0
line wrap: on
line diff
--- a/mercurial/bundlecaches.py	Mon Jan 24 11:49:06 2022 +0100
+++ b/mercurial/bundlecaches.py	Mon Jan 17 19:26:36 2022 +0100
@@ -195,7 +195,7 @@
     # repo supports and error if the bundle isn't compatible.
     if version == b'packed1' and b'requirements' in params:
         requirements = set(params[b'requirements'].split(b','))
-        missingreqs = requirements - repo.supportedformats
+        missingreqs = requirements - requirementsmod.STREAM_FIXED_REQUIREMENTS
         if missingreqs:
             raise error.UnsupportedBundleSpecification(
                 _(b'missing support for repository features: %s')