Skip to content
Snippets Groups Projects
Commit 77de985d authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

deprecation: gate deprecation warning behind devel configuration

Regular users are not supposed to be exposed to the API deprecation warnings.
We now only issue them when the developper warnings are enabled.
parent e6f490e3
No related branches found
No related tags found
No related merge requests found
......@@ -1161,6 +1161,9 @@
- msg: message explaining what is deprecated and how to upgrade,
- version: last version where the API will be supported,
"""
if not (self.configbool('devel', 'all-warnings')
or self.configbool('devel', 'deprec-warn')):
return
msg += ("\n(compatibility will be dropped after Mercurial-%s,"
" update your code.)") % version
self.develwarn(msg, stacklevel=2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment