Show More
@@ -225,6 +225,10 b' def isodate(date):' | |||
|
225 | 225 | '''turn a (timestamp, tzoff) tuple into an iso 8631 date and time.''' |
|
226 | 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 | 232 | def nl2br(text): |
|
229 | 233 | '''replace raw newlines with xhtml line breaks.''' |
|
230 | 234 | return text.replace('\n', '<br/>\n') |
@@ -282,6 +286,7 b' common_filters = {' | |||
|
282 | 286 | "fill76": lambda x: fill(x, width=76), |
|
283 | 287 | "firstline": lambda x: x.splitlines(1)[0].rstrip('\r\n'), |
|
284 | 288 | "tabindent": lambda x: indent(x, '\t'), |
|
289 | "hgdate": hgdate, | |
|
285 | 290 | "isodate": isodate, |
|
286 | 291 | "obfuscate": obfuscate, |
|
287 | 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