From patchwork Wed Jan 12 14:11:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11994: requirements: do not warn about dropping share-safe, unless explicitly set From: phabricator X-Patchwork-Id: 50320 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 12 Jan 2022 14:11:38 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If we are just altering the default value, this is "fine". This will get tested once share-safe become the default. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11994 AFFECTED FILES mercurial/localrepo.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -3726,13 +3726,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