hgkw/keyword.py
branchkwmap-templates
changeset 153 7e97ea52335a
parent 152 7ca8e7661609
child 155 b62dacbd2166
equal deleted inserted replaced
152:7ca8e7661609 153:7e97ea52335a
   137             for k in templates.keys():
   137             for k in templates.keys():
   138                 templates[k] = templater.parsestring(templates[k],
   138                 templates[k] = templater.parsestring(templates[k],
   139                         quoted=False)
   139                         quoted=False)
   140         self.templates = templates or deftemplates
   140         self.templates = templates or deftemplates
   141         self.re_kw = re.compile(r'\$(%s)[^$]*?\$' %
   141         self.re_kw = re.compile(r'\$(%s)[^$]*?\$' %
   142                 '|'.join(re.escape(k) for k in self.templates.keys()))
   142                 '|'.join([re.escape(k) for k in self.templates.keys()]))
   143         templater.common_filters['utcdate'] = utcdate
   143         templater.common_filters['utcdate'] = utcdate
   144         try:
   144         try:
   145             self.t = cmdutil.changeset_templater(ui, repo,
   145             self.t = cmdutil.changeset_templater(ui, repo,
   146                     False, '', False)
   146                     False, '', False)
   147         except TypeError:
   147         except TypeError: