Mercurial > public > mercurial-scm > hg-stable
diff mercurial/upgrade_utils/auto_upgrade.py @ 49343:9e203cda3238
auto-upgrade: add an option to silence the share-safe message
For well tested case, the message can get in the way, so we add a way to disable
it.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 14 Jun 2022 15:11:36 +0200 |
parents | 71774d799de7 |
children | 1b9114709428 |
line wrap: on
line diff
--- a/mercurial/upgrade_utils/auto_upgrade.py Tue Jun 14 15:45:37 2022 +0200 +++ b/mercurial/upgrade_utils/auto_upgrade.py Tue Jun 14 15:11:36 2022 +0200 @@ -44,6 +44,10 @@ b'format', b'use-share-safe.automatic-upgrade-of-mismatching-repositories', ) + auto_upgrade_quiet = ui.configbool( + b'format', + b'use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet', + ) action = None @@ -61,7 +65,7 @@ hint = b"(see `hg help config.format.use-share-safe` for details)\n" def action(): - if not ui.quiet: + if not (ui.quiet or auto_upgrade_quiet): ui.write_err(msg) ui.write_err(hint) requirements.add(requirementsmod.SHARESAFE_REQUIREMENT) @@ -75,7 +79,7 @@ hint = b"(see `hg help config.format.use-share-safe` for details)\n" def action(): - if not ui.quiet: + if not (ui.quiet or auto_upgrade_quiet): ui.write_err(msg) ui.write_err(hint) requirements.discard(requirementsmod.SHARESAFE_REQUIREMENT)