hgkw/keyword.py
branchkwmap-templates
changeset 104 e8b9a500f2e1
parent 103 e086f7eb0198
child 105 2a8b0a71c2ec
--- a/hgkw/keyword.py	Tue Jan 16 03:14:40 2007 +0100
+++ b/hgkw/keyword.py	Tue Jan 16 05:02:38 2007 +0100
@@ -93,10 +93,8 @@
     def __init__(self, ui, repo):
         self.ui = ui
         self.repo = repo
-        templates = {}
-        for k, v in self.ui.configitems('keywordmaps'):
-            templates[k] = v
-        self.templates = templates or deftemplates
+        self.templates = (dict(self.ui.configitems('keywordmaps'))
+                or deftemplates)
         self.re_kw = re.compile(r'\$(%s)[^$]*?\$' %
                 '|'.join(re.escape(k) for k in self.templates.keys()))
         self.t = cmdutil.changeset_templater(self.ui, self.repo,