From patchwork Thu May 5 17:05:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2, of, 7] devel: use the new 'config' argument of the develwarn in deprecwarn From: Pierre-Yves David X-Patchwork-Id: 14925 Message-Id: <11839ae148f45e30e51c.1462467952@nodosa.octopoid.net> To: mercurial-devel@mercurial-scm.org Date: Thu, 05 May 2016 19:05:52 +0200 # HG changeset patch # User Pierre-Yves David # Date 1462465743 -7200 # Thu May 05 18:29:03 2016 +0200 # Node ID 11839ae148f45e30e51ca34b72ba159343e9dad9 # Parent 4e60a6b778f63b58e62849999d70660c8d29cf8f # EXP-Topic develwarn 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. diff -r 4e60a6b778f6 -r 11839ae148f4 mercurial/ui.py --- a/mercurial/ui.py Thu May 05 15:57:48 2016 +0200 +++ b/mercurial/ui.py Thu May 05 18:29:03 2016 +0200 @@ -1166,7 +1166,7 @@ class ui(object): """ 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.