# HG changeset patch # User Pierre-Yves David # Date 2022-01-10 11:48:35 # Node ID 4c1135d157002afdce43fdb21984ceb6d7839af7 # Parent a62ba33455344ec1b23f8b59c9d3456be9d442c4 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 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -3719,13 +3719,13 @@ def checkrequirementscompat(ui, requirem ) 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