--- a/hgkw/keyword.py Tue Jul 24 15:13:16 2007 +0200
+++ b/hgkw/keyword.py Thu Jul 26 18:24:35 2007 +0200
@@ -127,9 +127,6 @@
templates[k] = templater.parsestring(templates[k],
quoted=False)
self.templates = templates or self.deftemplates
- escaped = [re.escape(k) for k in self.templates.keys()]
- rawkeyword = r'\$(%s)[^$\n\r]*?\$'
- self.re_kw = re.compile(rawkeyword % '|'.join(escaped))
if self.t:
templater.common_filters['utcdate'] = utcdate
try:
@@ -139,6 +136,9 @@
# depending on hg rev changeset_templater has extra "brinfo" arg
self.t = cmdutil.changeset_templater(self.ui, self.repo,
False, None, '', False)
+ escaped = [re.escape(k) for k in self.templates.keys()]
+ rawkeyword = r'\$(%s)(: [^$\n\r]*? )??\$'
+ self.re_kw = re.compile(rawkeyword % '|'.join(escaped))
def _ctxnode(self, node):
'''Obtains missing node from file context.'''