equal
deleted
inserted
replaced
166 self.t = expand or None |
166 self.t = expand or None |
167 self.path = path |
167 self.path = path |
168 self.node = node |
168 self.node = node |
169 |
169 |
170 kwmaps = self.ui.configitems('keywordmaps') |
170 kwmaps = self.ui.configitems('keywordmaps') |
171 if kwmaps: |
171 if kwmaps: # override default templates |
172 self.templates = {} |
172 kwmaps = [(k, templater.parsestring(v, quoted=False)) |
173 for k, v in kwmaps: |
173 for (k, v) in kwmaps] |
174 self.templates[k] = templater.parsestring(v, quoted=False) |
174 self.templates = dict(kwmaps) |
175 escaped = [re.escape(k) for k in self.templates.keys()] |
175 escaped = [re.escape(k) for k in 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 |