devel: use the new 'config' argument of the develwarn in deprecwarn
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 08 May 2016 10:43:41 +0200
changeset 29096 33a10e212b80
parent 29095 3f33831a9202
child 29097 ff4cc44364e3
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.
mercurial/ui.py
--- a/mercurial/ui.py	Sun May 08 10:43:41 2016 +0200
+++ b/mercurial/ui.py	Sun May 08 10:43:41 2016 +0200
@@ -1169,7 +1169,7 @@
             return
         msg += ("\n(compatibility will be dropped after Mercurial-%s,"
                 " update your code.)") % version
-        self.develwarn(msg, stacklevel=2)
+        self.develwarn(msg, stacklevel=2, config='deprec-warn')
 
 class paths(dict):
     """Represents a collection of paths and their configs.