# HG changeset patch # User Yuya Nishihara # Date 2018-03-16 14:11:55 # Node ID d3f7930a9563ee0c1cf64e7176e4e26abb6f0232 # Parent 1101d6747d2ddca98322341844a7cd27fd37e2c3 templatekw: mark _showlist() as deprecated (API) .. api:: ``templatekw._showlist()`` is deprecated in favor of ``templateutil._showcompatlist()``, which takes ``context`` in place of ``templ``. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -36,6 +36,10 @@ compatlist = templateutil.compatlist _showcompatlist = templateutil._showcompatlist def _showlist(name, values, templ, mapping, plural=None, separator=' '): + ui = mapping.get('ui') + if ui: + ui.deprecwarn("templatekw._showlist() is deprecated, use " + "templateutil._showcompatlist()", '4.6') context = templ # this is actually a template context, not a templater return _showcompatlist(context, mapping, name, values, plural, separator)