changeset 37071:d3f7930a9563

templatekw: mark _showlist() as deprecated (API) .. api:: ``templatekw._showlist()`` is deprecated in favor of ``templateutil._showcompatlist()``, which takes ``context`` in place of ``templ``.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 16 Mar 2018 23:11:55 +0900
parents 1101d6747d2d
children d64ae4fef471
files mercurial/templatekw.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatekw.py	Fri Mar 16 23:09:21 2018 +0900
+++ b/mercurial/templatekw.py	Fri Mar 16 23:11:55 2018 +0900
@@ -36,6 +36,10 @@
 _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)