Patchwork [3,of,7] templater: do not use stringify() to concatenate flattened template output

login
register
mail settings
Submitter Yuya Nishihara
Date March 25, 2018, 5:15 a.m.
Message ID <63e4b6939689ee90bb27.1521954950@mimosa>
Download mbox | patch
Permalink /patch/29840/
State Accepted
Headers show

Comments

Yuya Nishihara - March 25, 2018, 5:15 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1521285186 -32400
#      Sat Mar 17 20:13:06 2018 +0900
# Node ID 63e4b6939689ee90bb27cd6522903bf44c349952
# Parent  60e473afb171c9c2fae598bdacd6880c1ac41ebf
templater: do not use stringify() to concatenate flattened template output

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -815,7 +815,7 @@  class templater(object):
 
     def render(self, t, mapping):
         """Render the specified named template and return result as string"""
-        return templateutil.stringify(self.generate(t, mapping))
+        return b''.join(self.generate(t, mapping))
 
     def generate(self, t, mapping):
         """Return a generator that renders the specified named template and