comparison mercurial/ui.py @ 29096:33a10e212b80

devel: use the new 'config' argument of the develwarn in deprecwarn Controling all deprecation warnings with the same config seems sensible. This mirror a fix (about missing gating) submitted for stable but with the new API.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sun, 08 May 2016 10:43:41 +0200
parents 3f33831a9202
children e9ce33c642e8
comparison
equal deleted inserted replaced
29095:3f33831a9202 29096:33a10e212b80
1167 if not (self.configbool('devel', 'all-warnings') 1167 if not (self.configbool('devel', 'all-warnings')
1168 or self.configbool('devel', 'deprec-warn')): 1168 or self.configbool('devel', 'deprec-warn')):
1169 return 1169 return
1170 msg += ("\n(compatibility will be dropped after Mercurial-%s," 1170 msg += ("\n(compatibility will be dropped after Mercurial-%s,"
1171 " update your code.)") % version 1171 " update your code.)") % version
1172 self.develwarn(msg, stacklevel=2) 1172 self.develwarn(msg, stacklevel=2, config='deprec-warn')
1173 1173
1174 class paths(dict): 1174 class paths(dict):
1175 """Represents a collection of paths and their configs. 1175 """Represents a collection of paths and their configs.
1176 1176
1177 Data is initially derived from ui instances and the config files they have 1177 Data is initially derived from ui instances and the config files they have