##// END OF EJS Templates
keyword: use util.datestr for utcdate filter, expose through variable
Christian Ebert -
r9308:6fdd39f5 default
parent child Browse files
Show More
@@ -82,7 +82,7 b' from mercurial.hgweb import webcommands'
82 from mercurial.lock import release
82 from mercurial.lock import release
83 from mercurial.node import nullid
83 from mercurial.node import nullid
84 from mercurial.i18n import _
84 from mercurial.i18n import _
85 import re, shutil, tempfile, time
85 import re, shutil, tempfile
86
86
87 commands.optionalrepo += ' kwdemo'
87 commands.optionalrepo += ' kwdemo'
88
88
@@ -95,9 +95,8 b" nokwcommands = ('add addremove annotate "
95 # not when reading filelog, and unexpand when reading from working dir
95 # not when reading filelog, and unexpand when reading from working dir
96 restricted = 'merge record resolve qfold qimport qnew qpush qrefresh qrecord'
96 restricted = 'merge record resolve qfold qimport qnew qpush qrefresh qrecord'
97
97
98 def utcdate(date):
98 # provide cvs-like UTC date filter
99 '''Returns hgdate in cvs-like UTC format.'''
99 utcdate = lambda x: util.datestr(x, '%Y/%m/%d %H:%M:%S')
100 return time.strftime('%Y/%m/%d %H:%M:%S', time.gmtime(date[0]))
101
100
102 # make keyword tools accessible
101 # make keyword tools accessible
103 kwtools = {'templater': None, 'hgcmd': '', 'inc': [], 'exc': ['.hg*']}
102 kwtools = {'templater': None, 'hgcmd': '', 'inc': [], 'exc': ['.hg*']}
General Comments 0
You need to be logged in to leave comments. Login now