hgkw/keyword.py
changeset 364 d935536a6abc
parent 358 3eff5c04034f
child 365 e99ace93ded0
--- a/hgkw/keyword.py	Wed Jan 30 01:24:10 2008 +0100
+++ b/hgkw/keyword.py	Fri Feb 01 00:48:37 2008 +0100
@@ -81,7 +81,7 @@
 '''
 
 from mercurial import commands, cmdutil, context, filelog, localrepo
-from mercurial import patch, revlog, templater, util
+from mercurial import patch, revlog, templater, templatefilters, util
 from mercurial.node import *
 from mercurial.i18n import _
 import re, shutil, tempfile, time
@@ -122,7 +122,7 @@
         kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped)
         self.re_kw = re.compile(kwpat)
 
-        templater.common_filters['utcdate'] = utcdate
+        templatefilters.filters['utcdate'] = utcdate
         self.ct = cmdutil.changeset_templater(self.ui, self.repo,
                                               False, '', False)
 
@@ -152,7 +152,8 @@
             self.ct.use_template(self.templates[kw])
             self.ui.pushbuffer()
             self.ct.show(changenode=node, root=self.repo.root, file=path)
-            return '$%s: %s $' % (kw, templater.firstline(self.ui.popbuffer()))
+            ekw = templatefilters.firstline(self.ui.popbuffer())
+            return '$%s: %s $' % (kw, ekw)
 
         return subfunc(kwsub, data)