Patchwork [09,of,12] templatekw: drop deprecated showlist() and showdict()

login
register
mail settings
Submitter Matt Harbison
Date May 11, 2018, 5:11 a.m.
Message ID <130f5016ec6b87f7cb35.1526015482@Envy>
Download mbox | patch
Permalink /patch/31498/
State Accepted
Headers show

Comments

Matt Harbison - May 11, 2018, 5:11 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1526004041 14400
#      Thu May 10 22:00:41 2018 -0400
# Node ID 130f5016ec6b87f7cb3516f03f1ffbc3d4285897
# Parent  bd95f109936c19621c0021fa292f61d88ce590bc
templatekw: drop deprecated showlist() and showdict()

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -38,34 +38,6 @@  compatdict = templateutil.compatdict
 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)
-
-def showdict(name, data, mapping, plural=None, key='key', value='value',
-             fmt=None, separator=' '):
-    ui = mapping.get('ui')
-    if ui:
-        ui.deprecwarn("templatekw.showdict() is deprecated, use "
-                      "templateutil.compatdict()", '4.6')
-    c = [{key: k, value: v} for k, v in data.iteritems()]
-    f = _showlist(name, c, mapping['templ'], mapping, plural, separator)
-    return hybriddict(data, key=key, value=value, fmt=fmt, gen=f)
-
-def showlist(name, values, mapping, plural=None, element=None, separator=' '):
-    ui = mapping.get('ui')
-    if ui:
-        ui.deprecwarn("templatekw.showlist() is deprecated, use "
-                      "templateutil.compatlist()", '4.6')
-    if not element:
-        element = name
-    f = _showlist(name, values, mapping['templ'], mapping, plural, separator)
-    return hybridlist(values, name=element, gen=f)
-
 def getlatesttags(context, mapping, pattern=None):
     '''return date, distance and name for the latest tag of rev'''
     repo = context.resource(mapping, 'repo')