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

login
register
mail settings
Submitter Yuya Nishihara
Date April 1, 2018, 2:46 a.m.
Message ID <c8be87f32f1cdf473685.1522550760@mimosa>
Download mbox | patch
Permalink /patch/30090/
State Deferred
Headers show

Comments

Yuya Nishihara - April 1, 2018, 2:46 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1521299496 -32400
#      Sun Mar 18 00:11:36 2018 +0900
# Node ID c8be87f32f1cdf473685b8302300265d57f3b512
# Parent  a26aace92f3a4e7e0acfa8d0e61ad11ec182902c
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, d.show(context))
 
     def gen(data):
         yield "; ".join(render(d) for d in data)