35 $ hg tip --template "{date|isodate}\n" |
35 $ hg tip --template "{date|isodate}\n" |
36 2008-08-21 18:22 +0000 |
36 2008-08-21 18:22 +0000 |
37 |
37 |
38 List of filters: |
38 List of filters: |
39 |
39 |
40 :addbreaks: Any text. Add an XHTML "<br />" tag before the end of |
40 .. filtersmarker |
41 every line except the last. |
|
42 |
|
43 :age: Date. Returns a human-readable date/time difference between the |
|
44 given date/time and the current date/time. |
|
45 |
|
46 :basename: Any text. Treats the text as a path, and returns the last |
|
47 component of the path after splitting by the path separator |
|
48 (ignoring trailing separators). For example, "foo/bar/baz" becomes |
|
49 "baz" and "foo/bar//" becomes "bar". |
|
50 |
|
51 :stripdir: Treat the text as path and strip a directory level, if |
|
52 possible. For example, "foo" and "foo/bar" becomes "foo". |
|
53 |
|
54 :date: Date. Returns a date in a Unix date format, including the |
|
55 timezone: "Mon Sep 04 15:13:13 2006 0700". |
|
56 |
|
57 :domain: Any text. Finds the first string that looks like an email |
|
58 address, and extracts just the domain component. Example: ``User |
|
59 <user@example.com>`` becomes ``example.com``. |
|
60 |
|
61 :email: Any text. Extracts the first string that looks like an email |
|
62 address. Example: ``User <user@example.com>`` becomes |
|
63 ``user@example.com``. |
|
64 |
|
65 :escape: Any text. Replaces the special XML/XHTML characters "&", "<" |
|
66 and ">" with XML entities. |
|
67 |
|
68 :hex: Any text. Convert a binary Mercurial node identifier into |
|
69 its long hexadecimal representation. |
|
70 |
|
71 :fill68: Any text. Wraps the text to fit in 68 columns. |
|
72 |
|
73 :fill76: Any text. Wraps the text to fit in 76 columns. |
|
74 |
|
75 :firstline: Any text. Returns the first line of text. |
|
76 |
|
77 :nonempty: Any text. Returns '(none)' if the string is empty. |
|
78 |
|
79 :hgdate: Date. Returns the date as a pair of numbers: "1157407993 |
|
80 25200" (Unix timestamp, timezone offset). |
|
81 |
|
82 :isodate: Date. Returns the date in ISO 8601 format: "2009-08-18 13:00 |
|
83 +0200". |
|
84 |
|
85 :isodatesec: Date. Returns the date in ISO 8601 format, including |
|
86 seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date |
|
87 filter. |
|
88 |
|
89 :localdate: Date. Converts a date to local date. |
|
90 |
|
91 :obfuscate: Any text. Returns the input text rendered as a sequence of |
|
92 XML entities. |
|
93 |
|
94 :person: Any text. Returns the text before an email address. |
|
95 |
|
96 :rfc822date: Date. Returns a date using the same format used in email |
|
97 headers: "Tue, 18 Aug 2009 13:00:13 +0200". |
|
98 |
|
99 :rfc3339date: Date. Returns a date using the Internet date format |
|
100 specified in RFC 3339: "2009-08-18T13:00:13+02:00". |
|
101 |
|
102 :short: Changeset hash. Returns the short form of a changeset hash, |
|
103 i.e. a 12 hexadecimal digit string. |
|
104 |
|
105 :shortdate: Date. Returns a date like "2006-09-18". |
|
106 |
|
107 :stringify: Any type. Turns the value into text by converting values into |
|
108 text and concatenating them. |
|
109 |
|
110 :strip: Any text. Strips all leading and trailing whitespace. |
|
111 |
|
112 :tabindent: Any text. Returns the text, with every line except the |
|
113 first starting with a tab character. |
|
114 |
|
115 :urlescape: Any text. Escapes all "special" characters. For example, |
|
116 "foo bar" becomes "foo%20bar". |
|
117 |
|
118 :user: Any text. Returns the user portion of an email address. |
|