templates: document missing keywords or filters stable
authorPatrick Mezard <pmezard@gmail.com>
Sat, 12 Mar 2011 12:46:31 +0100
branchstable
changeset 890 ddd525b7dd4a
parent 888 8c5c3a0aa6d5
child 891 5d6d605c93f8
child 894 2061f728babf
templates: document missing keywords or filters Keywords keywords are not documented yet but are turned into function definitions to avoid lambda docstring weirdness. [ original upstream message ]
hgkw/keyword.py
--- a/hgkw/keyword.py	Thu Mar 10 13:43:47 2011 +0100
+++ b/hgkw/keyword.py	Sat Mar 12 12:46:31 2011 +0100
@@ -109,11 +109,14 @@
 }
 
 # date like in cvs' $Date
-utcdate = lambda x: util.datestr((x[0], 0), '%Y/%m/%d %H:%M:%S')
+def utcdate(text):
+    return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S')
 # date like in svn's $Date
-svnisodate = lambda x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)')
+def svnisodate(text):
+    return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)')
 # date like in svn's $Id
-svnutcdate = lambda x: util.datestr((x[0], 0), '%Y-%m-%d %H:%M:%SZ')
+def svnutcdate(text):
+    return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
 
 # make keyword tools accessible
 kwtools = {'templater': None, 'hgcmd': ''}