equal
deleted
inserted
replaced
122 kwtools['inc'], kwtools['exc']) |
122 kwtools['inc'], kwtools['exc']) |
123 self.restrict = kwtools['hgcmd'] in restricted.split() |
123 self.restrict = kwtools['hgcmd'] in restricted.split() |
124 |
124 |
125 kwmaps = self.ui.configitems('keywordmaps') |
125 kwmaps = self.ui.configitems('keywordmaps') |
126 if kwmaps: # override default templates |
126 if kwmaps: # override default templates |
127 kwmaps = [(k, templater.parsestring(v, False)) |
127 self.templates = dict((k, templater.parsestring(v, False)) |
128 for (k, v) in kwmaps] |
128 for k, v in kwmaps) |
129 self.templates = dict(kwmaps) |
|
130 escaped = map(re.escape, self.templates.keys()) |
129 escaped = map(re.escape, self.templates.keys()) |
131 kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped) |
130 kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped) |
132 self.re_kw = re.compile(kwpat) |
131 self.re_kw = re.compile(kwpat) |
133 |
132 |
134 templatefilters.filters['utcdate'] = utcdate |
133 templatefilters.filters['utcdate'] = utcdate |