##// END OF EJS Templates
templater: process mapping dict by resource callables...
Yuya Nishihara -
r36998:036e4483 default
parent child Browse files
Show More
@@ -508,6 +508,9 b' def templateresources(ui, repo=None):'
508 508 }
509 509
510 510 def getsome(context, mapping, key):
511 v = mapping.get(key)
512 if v is not None:
513 return v
511 514 return resmap.get(key)
512 515
513 516 return {
@@ -565,8 +565,6 b' class engine(object):'
565 565 evaluation"""
566 566 v = None
567 567 if key in self._resources:
568 v = mapping.get(key)
569 if v is None and key in self._resources:
570 568 v = self._resources[key](self, mapping, key)
571 569 if v is None:
572 570 raise templateutil.ResourceUnavailable(
@@ -671,8 +669,7 b' class templater(object):'
671 669 - ``defaults``: a dict of symbol values/functions; may be overridden
672 670 by a ``mapping`` dict.
673 671 - ``resources``: a dict of functions returning internal data
674 (e.g. cache), inaccessible from user template; may be overridden by
675 a ``mapping`` dict.
672 (e.g. cache), inaccessible from user template.
676 673 - ``cache``: a dict of preloaded template fragments.
677 674 - ``aliases``: a list of alias (name, replacement) pairs.
678 675
General Comments 0
You need to be logged in to leave comments. Login now