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

Yuya Nishihara yuya at tcha.org
Sun Apr 1 02:46:00 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1521299496 -32400
#      Sun Mar 18 00:11:36 2018 +0900
# Node ID c8be87f32f1cdf473685b8302300265d57f3b512
# Parent  a26aace92f3a4e7e0acfa8d0e61ad11ec182902c
templatekw: do not directly call .gen

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)


More information about the Mercurial-devel mailing list