Mercurial > public > mercurial-scm > hg
comparison mercurial/templater.py @ 1914:a5bf0030df5f
make --style=compact look for map-cmdline.compact.
change name of key in map file from changelog to changeset.
rename command map files to start with map-cmdline.
rename ui.logmap to ui.style in hgrc.
now --style=foo does this:
tries to open foo as file.
tries as map-cmdline.foo in template path.
tries as foo in template path.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sat, 04 Mar 2006 15:15:18 -0800 |
parents | 74cf2b2f43d4 |
children | 2f500a4b6e99 |
comparison
equal
deleted
inserted
replaced
1913:74cf2b2f43d4 | 1914:a5bf0030df5f |
---|---|
74 | 74 |
75 if not mapfile: | 75 if not mapfile: |
76 return | 76 return |
77 i = 0 | 77 i = 0 |
78 for l in file(mapfile): | 78 for l in file(mapfile): |
79 l = l.rstrip('\r\n') | 79 l = l.strip() |
80 i += 1 | 80 i += 1 |
81 if l.startswith('#') or not l.strip(): continue | 81 if not l or l[0] in '#;': continue |
82 m = re.match(r'([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.+)$', l) | 82 m = re.match(r'([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.+)$', l) |
83 if m: | 83 if m: |
84 key, val = m.groups() | 84 key, val = m.groups() |
85 if val[0] in "'\"": | 85 if val[0] in "'\"": |
86 try: | 86 try: |