Show More
@@ -225,6 +225,10 b' def isodate(date):' | |||||
225 | '''turn a (timestamp, tzoff) tuple into an iso 8631 date and time.''' |
|
225 | '''turn a (timestamp, tzoff) tuple into an iso 8631 date and time.''' | |
226 | return util.datestr(date, format='%Y-%m-%d %H:%M') |
|
226 | return util.datestr(date, format='%Y-%m-%d %H:%M') | |
227 |
|
227 | |||
|
228 | def hgdate(date): | |||
|
229 | '''turn a (timestamp, tzoff) tuple into an hg cset timestamp.''' | |||
|
230 | return "%d %d" % date | |||
|
231 | ||||
228 | def nl2br(text): |
|
232 | def nl2br(text): | |
229 | '''replace raw newlines with xhtml line breaks.''' |
|
233 | '''replace raw newlines with xhtml line breaks.''' | |
230 | return text.replace('\n', '<br/>\n') |
|
234 | return text.replace('\n', '<br/>\n') | |
@@ -282,6 +286,7 b' common_filters = {' | |||||
282 | "fill76": lambda x: fill(x, width=76), |
|
286 | "fill76": lambda x: fill(x, width=76), | |
283 | "firstline": lambda x: x.splitlines(1)[0].rstrip('\r\n'), |
|
287 | "firstline": lambda x: x.splitlines(1)[0].rstrip('\r\n'), | |
284 | "tabindent": lambda x: indent(x, '\t'), |
|
288 | "tabindent": lambda x: indent(x, '\t'), | |
|
289 | "hgdate": hgdate, | |||
285 | "isodate": isodate, |
|
290 | "isodate": isodate, | |
286 | "obfuscate": obfuscate, |
|
291 | "obfuscate": obfuscate, | |
287 | "permissions": lambda x: x and "-rwxr-xr-x" or "-rw-r--r--", |
|
292 | "permissions": lambda x: x and "-rwxr-xr-x" or "-rw-r--r--", |
General Comments 0
You need to be logged in to leave comments.
Login now