Patchwork [3,of,8,V2] templatekw: do not directly call .gen

login
register
mail settings
Submitter Yuya Nishihara
Date April 3, 2018, 3:40 p.m.
Message ID <b37a96bd6c1bcea5d24c.1522770005@mimosa>
Download mbox | patch
Permalink /patch/30164/
State Accepted
Headers show

Comments

Yuya Nishihara - April 3, 2018, 3:40 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1521299496 -32400
#      Sun Mar 18 00:11:36 2018 +0900
# Node ID b37a96bd6c1bcea5d24c6fc04a92fc6bd407e75e
# Parent  b02b53e4cc2049324d69e3c4a16357f79400a5e4
templatekw: do not directly call .gen

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -613,10 +613,7 @@  def showsuccessorssets(context, mapping)
 
     # Format the successorssets
     def render(d):
-        t = []
-        for i in d.gen():
-            t.append(i)
-        return "".join(t)
+        return templateutil.stringify(context, mapping, d)
 
     def gen(data):
         yield "; ".join(render(d) for d in data)