comparison mercurial/templater.py @ 4336:35ad84669ca5

Merge with crew-stable
author Brendan Cully <brendan@kublai.com>
date Tue, 10 Apr 2007 10:34:43 -0700
parents 1063a631cb8e 66a3fe30f9fc
children e21a0e12ff10
comparison
equal deleted inserted replaced
4334:1cc5fc1d0994 4336:35ad84669ca5
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