changeset 48688:4c1135d15700

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 10 Jan 2022 12:48:35 +0100
parents a62ba3345534
children fc80752dbb24
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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