changeset 36603:45f149bf08d1

templatekw: fix dict construction in _showlist to not mix bytes and strs What we had was fine on Python 2, but was slightly wrong on Python 3. This works on both. Differential Revision: https://phab.mercurial-scm.org/D2554
author Augie Fackler <augie@google.com>
date Fri, 02 Mar 2018 09:09:38 -0500
parents 9b6b02a5b589
children df7b7d5033a5
files mercurial/templatekw.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatekw.py	Fri Mar 02 09:08:11 2018 -0500
+++ b/mercurial/templatekw.py	Fri Mar 02 09:09:38 2018 -0500
@@ -205,7 +205,9 @@
             yield separator.join(values)
         else:
             for v in values:
-                yield dict(v, **strmapping)
+                r = dict(v)
+                r.update(mapping)
+                yield r
         return
     startname = 'start_' + plural
     if startname in templ: