# HG changeset patch # User Pierre-Yves David # Date 2016-05-05 14:29:31 # Node ID 77de985d7c91c67650d9fba0e4b21dfdbd894eeb # Parent e6f490e328635312ee214a12bc7fd3c7d46bf9ce 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. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1161,6 +1161,9 @@ class ui(object): - 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)