diff mercurial/templater.py @ 37073:1101d6747d2d

templater: drop 'templ' from resources dict Partially resolves cycle, templ -> context -> templ. This will make it easier to replace the resources dict with new immutable resource mapper interface.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 16 Mar 2018 23:09:21 +0900
parents 04aafcec00b9
children 44757e6dad93
line wrap: on
line diff
--- a/mercurial/templater.py	Fri Mar 16 23:01:51 2018 +0900
+++ b/mercurial/templater.py	Fri Mar 16 23:09:21 2018 +0900
@@ -738,8 +738,7 @@
         self.filters = templatefilters.filters.copy()
         self.filters.update(filters)
         self.defaults = defaults
-        self._resources = {'templ': lambda context, mapping, key: self}
-        self._resources.update(resources)
+        self._resources = resources
         self._aliases = aliases
         self.minchunk, self.maxchunk = minchunk, maxchunk
         self.ecache = {}