Add extra datefilters in a single update call
authorChristian Ebert <blacktrash@gmx.net>
Thu, 15 Jul 2010 10:24:31 +0200
changeset 771 09e39675a702
parent 769 3bf3212b13bc
child 772 5ac8451a1bc4
child 773 9f939fae8ff3
Add extra datefilters in a single update call
hgkw/keyword.py
--- a/hgkw/keyword.py	Tue Jun 15 21:58:53 2010 +0200
+++ b/hgkw/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.'''