# HG changeset patch # User Christian Ebert # Date 1300140674 -3600 # Node ID 2061f728babf4a548f22f4a64f9253f371ae644c # Parent ddd525b7dd4acb77172200188d6fe359d929f8bf# Parent 24924dfb8326959a8251efe87d13666ca4dd5f38 Merge with default diff -r ddd525b7dd4a -r 2061f728babf hgkw/keyword.py --- a/hgkw/keyword.py Sat Mar 12 12:46:31 2011 +0100 +++ b/hgkw/keyword.py Mon Mar 14 23:11:14 2011 +0100 @@ -110,14 +110,26 @@ # date like in cvs' $Date def utcdate(text): + ''':utcdate: Date. Returns a UTC-date in this format: "2009/08/18 11:00:13". + ''' return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S') # date like in svn's $Date def svnisodate(text): + ''':svnisodate: Date. Returns a date in this format: "2009-08-18 13:00:13 + +0200 (Tue, 18 Aug 2009)". + ''' return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)') # date like in svn's $Id def svnutcdate(text): + ''':svnutcdate: Date. Returns a UTC-date in this format: "2009-08-18 + 11:00:13Z". + ''' 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': ''} @@ -179,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):