##// END OF EJS Templates
formatter: document lookuptemplate()
Yuya Nishihara -
r32834:9d76812f default
parent child Browse files
Show More
@@ -1647,8 +1647,9 class changeset_templater(changeset_prin
1647 1647 self.t(self._parts['footer'], **props))
1648 1648
1649 1649 def _lookuplogtemplate(ui, tmpl, style):
1650 """
1651 Find the template matching the given template spec or style.
1650 """Find the template matching the given template spec or style
1651
1652 See formatter.lookuptemplate() for details.
1652 1653 """
1653 1654
1654 1655 # ui settings
@@ -374,6 +374,21 class templateformatter(baseformatter):
374 374 self._out.write(templater.stringify(g))
375 375
376 376 def lookuptemplate(ui, topic, tmpl):
377 """Find the template matching the given -T/--template spec 'tmpl'
378
379 'tmpl' can be any of the following:
380
381 - a literal template (e.g. '{rev}')
382 - a map-file name or path (e.g. 'changelog')
383 - a reference to [templates] in config file
384 - a path to raw template file
385
386 A map file defines a stand-alone template environment. If a map file
387 selected, all templates defined in the file will be loaded, and the
388 template matching the given topic will be rendered. No aliases will be
389 loaded from user config.
390 """
391
377 392 # looks like a literal template?
378 393 if '{' in tmpl:
379 394 return tmpl, None
General Comments 0
You need to be logged in to leave comments. Login now