requirements: do not warn about dropping share-safe, unless explicitly set
If we are just altering the default value, this is "fine". This will get tested
once share-safe become the default.
Differential Revision: https://phab.mercurial-scm.org/D11994
--- a/mercurial/localrepo.py Tue Jan 11 06:40:44 2022 +0100
+++ b/mercurial/localrepo.py Mon Jan 10 12:48:35 2022 +0100
@@ -3719,13 +3719,13 @@
)
if requirementsmod.SHARESAFE_REQUIREMENT in requirements:
- ui.warn(
- _(
+ if ui.hasconfig(b'format', b'use-share-safe'):
+ msg = _(
b"ignoring enabled 'format.use-share-safe' config because "
b"it is incompatible with disabled 'format.usestore'"
b" config\n"
)
- )
+ ui.warn(msg)
dropped.add(requirementsmod.SHARESAFE_REQUIREMENT)
return dropped