equal
deleted
inserted
replaced
170 kwmaps = self.ui.configitems('keywordmaps') |
170 kwmaps = self.ui.configitems('keywordmaps') |
171 if kwmaps: # override default templates |
171 if kwmaps: # override default templates |
172 kwmaps = [(k, templater.parsestring(v, quoted=False)) |
172 kwmaps = [(k, templater.parsestring(v, quoted=False)) |
173 for (k, v) in kwmaps] |
173 for (k, v) in kwmaps] |
174 self.templates = dict(kwmaps) |
174 self.templates = dict(kwmaps) |
175 escaped = [re.escape(k) for k in self.templates.keys()] |
175 escaped = map(re.escape, self.templates.keys()) |
176 kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped) |
176 kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped) |
177 self.re_kw = re.compile(kwpat) |
177 self.re_kw = re.compile(kwpat) |
178 if self.t: |
178 if self.t: |
179 templater.common_filters['utcdate'] = utcdate |
179 templater.common_filters['utcdate'] = utcdate |
180 self.t = self._changeset_templater() |
180 self.t = self._changeset_templater() |