diff mercurial/cmdutil.py @ 8360:acc202b71619

templater: provide the standard template filters by default
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Tue, 12 May 2009 12:04:05 +0200
parents b87a50b7125c
children 52e6117a9940
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue May 12 10:57:55 2009 +0200
+++ b/mercurial/cmdutil.py	Tue May 12 12:04:05 2009 +0200
@@ -712,10 +712,8 @@
 
     def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
         changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
-        filters = templatefilters.filters.copy()
-        filters['formatnode'] = (ui.debugflag and (lambda x: x)
-                                 or (lambda x: x[:12]))
-        self.t = templater.templater(mapfile, filters,
+        formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
+        self.t = templater.templater(mapfile, {'formatnode': formatnode},
                                      cache={
                                          'parent': '{rev}:{node|formatnode} ',
                                          'manifest': '{rev}:{node|formatnode}',