diff mercurial/templater.py @ 1913:74cf2b2f43d4

fix some things people wanted to be cleaner. rename --map-file to --style. no more -t alias for --template. update docs. rename template entry in map files to changelog. if --verbose, use changelog_verbose if there, else changelog.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Sat, 04 Mar 2006 12:40:10 -0800
parents b288b4bb8448
children a5bf0030df5f
line wrap: on
line diff
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -59,7 +59,7 @@ class templater(object):
     filter uses function to transform value. syntax is
     {key|filter1|filter2|...}.'''
 
-    def __init__(self, mapfile, filters={}, defaults={}):
+    def __init__(self, mapfile, filters={}, cache={}):
         '''set up template engine.
         mapfile is name of file to read map definitions from.
         filters is dict of functions. each transforms a value into another.
@@ -69,7 +69,8 @@ class templater(object):
         self.map = {}
         self.base = (mapfile and os.path.dirname(mapfile)) or ''
         self.filters = filters
-        self.defaults = defaults
+        self.defaults = {}
+        self.cache = cache
 
         if not mapfile:
             return