equal
deleted
inserted
replaced
91 provides keyword expansion function. |
91 provides keyword expansion function. |
92 ''' |
92 ''' |
93 def __init__(self, ui, repo): |
93 def __init__(self, ui, repo): |
94 self.ui = ui |
94 self.ui = ui |
95 self.repo = repo |
95 self.repo = repo |
96 templates = {} |
96 self.templates = (dict(self.ui.configitems('keywordmaps')) |
97 for k, v in self.ui.configitems('keywordmaps'): |
97 or deftemplates) |
98 templates[k] = v |
|
99 self.templates = templates or deftemplates |
|
100 self.re_kw = re.compile(r'\$(%s)[^$]*?\$' % |
98 self.re_kw = re.compile(r'\$(%s)[^$]*?\$' % |
101 '|'.join(re.escape(k) for k in self.templates.keys())) |
99 '|'.join(re.escape(k) for k in self.templates.keys())) |
102 self.t = cmdutil.changeset_templater(self.ui, self.repo, |
100 self.t = cmdutil.changeset_templater(self.ui, self.repo, |
103 False, '', False) |
101 False, '', False) |
104 |
102 |