changeset 11616:fda0e478fb79

keyword: add extra datefilters in a single update call
author Christian Ebert <blacktrash@gmx.net>
date Thu, 15 Jul 2010 10:24:31 +0200
parents 6dbdf5c5c5bd
children 9f10adb70a04
files hgext/keyword.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Mon Jul 19 00:43:34 2010 +0200
+++ b/hgext/keyword.py	Thu Jul 15 10:24:31 2010 +0200
@@ -159,9 +159,9 @@
         kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped)
         self.re_kw = re.compile(kwpat)
 
-        templatefilters.filters['utcdate'] = utcdate
-        templatefilters.filters['svnisodate'] = svnisodate
-        templatefilters.filters['svnutcdate'] = svnutcdate
+        templatefilters.filters.update({'utcdate': utcdate,
+                                        'svnisodate': svnisodate,
+                                        'svnutcdate': svnutcdate})
 
     def substitute(self, data, path, ctx, subfunc):
         '''Replaces keywords in data with expanded template.'''