comparison mercurial/templater.py @ 4341:f4a1eac52d43

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 10 Apr 2007 14:05:15 -0500
parents 1063a631cb8e 66a3fe30f9fc
children e21a0e12ff10
comparison
equal deleted inserted replaced
4325:aa26759c6fb3 4341:f4a1eac52d43
25 template expansion works like this. a map file contains key=value 25 template expansion works like this. a map file contains key=value
26 pairs. if value is quoted, it is treated as string. otherwise, it 26 pairs. if value is quoted, it is treated as string. otherwise, it
27 is treated as name of template file. 27 is treated as name of template file.
28 28
29 templater is asked to expand a key in map. it looks up key, and 29 templater is asked to expand a key in map. it looks up key, and
30 looks for atrings like this: {foo}. it expands {foo} by looking up 30 looks for strings like this: {foo}. it expands {foo} by looking up
31 foo in map, and substituting it. expansion is recursive: it stops 31 foo in map, and substituting it. expansion is recursive: it stops
32 when there is no more {foo} to replace. 32 when there is no more {foo} to replace.
33 33
34 expansion also allows formatting and filtering. 34 expansion also allows formatting and filtering.
35 35