changeset 13634:15470463f932

keyword: offer additional datefilters when the extension is enabled Before the additional datefilters (utcdate, svnisodate, svnutcdate) were used when kwtemplater was initialized. Now they always be used once the extension is enabled.
author Christian Ebert <blacktrash@gmx.net>
date Mon, 14 Mar 2011 12:26:50 +0100
parents 20d13244f192
children 4e976235c985
files hgext/keyword.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Mon Mar 14 12:19:59 2011 +0100
+++ b/hgext/keyword.py	Mon Mar 14 12:26:50 2011 +0100
@@ -126,6 +126,10 @@
     '''
     return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
 
+templatefilters.filters.update({'utcdate': utcdate,
+                                'svnisodate': svnisodate,
+                                'svnutcdate': svnutcdate})
+
 # make keyword tools accessible
 kwtools = {'templater': None, 'hgcmd': ''}
 
@@ -187,9 +191,6 @@
                                   for k, v in kwmaps)
         else:
             self.templates = _defaultkwmaps(self.ui)
-        templatefilters.filters.update({'utcdate': utcdate,
-                                        'svnisodate': svnisodate,
-                                        'svnutcdate': svnutcdate})
 
     @util.propertycache
     def escape(self):