changeset 20017:519120a96c63

template: change extras to use showlist rather than manual templ call. This enables start_extras and end_extras in template maps.
author Matthew Turk <matthewturk@gmail.com>
date Fri, 15 Nov 2013 18:08:50 -0500
parents f4b3bdc3019e
children e13fed95c69b
files mercurial/templatekw.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatekw.py	Fri Nov 15 18:09:02 2013 -0500
+++ b/mercurial/templatekw.py	Fri Nov 15 18:08:50 2013 -0500
@@ -221,11 +221,8 @@
 def showextras(**args):
     """:extras: List of dicts with key, value entries of the 'extras'
     field of this changeset."""
-    templ = args['templ']
-    for key, value in sorted(args['ctx'].extra().items()):
-        args = args.copy()
-        args.update(dict(key=key, value=value))
-        yield templ('extra', **args)
+    yield showlist('extra', sorted(dict(key=a, value=b)
+                   for (a, b) in args['ctx'].extra().items()), **args)
 
 def showfileadds(**args):
     """:file_adds: List of strings. Files added by this changeset."""