Mercurial > hg > pyhgsh
comparison mercurial/templater.py @ 1975:6e1a8ea5d717
Duplicate cache when creating templater.
author | Shun-ichi Goto <shunichi.goto@gmail.com> |
---|---|
date | Sat, 18 Mar 2006 09:51:25 -0800 |
parents | 778281d46bb2 |
children | 04c17fc39c84 |
comparison
equal
deleted
inserted
replaced
1974:0d54675cd566 | 1975:6e1a8ea5d717 |
---|---|
63 '''set up template engine. | 63 '''set up template engine. |
64 mapfile is name of file to read map definitions from. | 64 mapfile is name of file to read map definitions from. |
65 filters is dict of functions. each transforms a value into another. | 65 filters is dict of functions. each transforms a value into another. |
66 defaults is dict of default map definitions.''' | 66 defaults is dict of default map definitions.''' |
67 self.mapfile = mapfile or 'template' | 67 self.mapfile = mapfile or 'template' |
68 self.cache = cache | 68 self.cache = cache.copy() |
69 self.map = {} | 69 self.map = {} |
70 self.base = (mapfile and os.path.dirname(mapfile)) or '' | 70 self.base = (mapfile and os.path.dirname(mapfile)) or '' |
71 self.filters = filters | 71 self.filters = filters |
72 self.defaults = defaults | 72 self.defaults = defaults |
73 | 73 |