Merge with default stable
authorChristian Ebert <blacktrash@gmx.net>
Mon, 14 Mar 2011 23:11:14 +0100
branchstable
changeset 894 2061f728babf
parent 890 ddd525b7dd4a (current diff)
parent 893 24924dfb8326 (diff)
child 895 1a9cd0b534a0
Merge with default
--- 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):