diff mercurial/templateutil.py @ 37107:7db3c28dfdfd

formatter: port handling of 'originalnode' to populatemap() hook This isn't a pure templating business, so let's move out of the templater module. Note that this works only in web templates where mapping['node'] is a static value.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Mar 2018 17:41:07 +0900
parents f0b6fbea00cf
children 888507ec655e
line wrap: on
line diff
--- a/mercurial/templateutil.py	Thu Mar 15 21:52:47 2018 +0900
+++ b/mercurial/templateutil.py	Sat Mar 17 17:41:07 2018 +0900
@@ -406,7 +406,6 @@
         if isinstance(v, dict):
             lm = context.overlaymap(mapping, v)
             lm['index'] = i
-            lm['originalnode'] = mapping.get('node')
             yield evalrawexp(context, lm, targ)
         else:
             # v is not an iterable of dicts, this happen when 'key'