Show More
@@ -1,432 +1,432 | |||||
1 | # template-filters.py - common template expansion filters |
|
1 | # template-filters.py - common template expansion filters | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2008 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2008 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import cgi |
|
10 | import cgi | |
11 | import os |
|
11 | import os | |
12 | import re |
|
12 | import re | |
13 | import time |
|
13 | import time | |
14 |
|
14 | |||
15 | from . import ( |
|
15 | from . import ( | |
16 | encoding, |
|
16 | encoding, | |
17 | hbisect, |
|
17 | hbisect, | |
18 | node, |
|
18 | node, | |
19 | registrar, |
|
19 | registrar, | |
20 | templatekw, |
|
20 | templatekw, | |
21 | util, |
|
21 | util, | |
22 | ) |
|
22 | ) | |
23 |
|
23 | |||
24 | urlerr = util.urlerr |
|
24 | urlerr = util.urlerr | |
25 | urlreq = util.urlreq |
|
25 | urlreq = util.urlreq | |
26 |
|
26 | |||
27 | # filters are callables like: |
|
27 | # filters are callables like: | |
28 | # fn(obj) |
|
28 | # fn(obj) | |
29 | # with: |
|
29 | # with: | |
30 | # obj - object to be filtered (text, date, list and so on) |
|
30 | # obj - object to be filtered (text, date, list and so on) | |
31 | filters = {} |
|
31 | filters = {} | |
32 |
|
32 | |||
33 | templatefilter = registrar.templatefilter(filters) |
|
33 | templatefilter = registrar.templatefilter(filters) | |
34 |
|
34 | |||
35 | @templatefilter('addbreaks') |
|
35 | @templatefilter('addbreaks') | |
36 | def addbreaks(text): |
|
36 | def addbreaks(text): | |
37 | """Any text. Add an XHTML "<br />" tag before the end of |
|
37 | """Any text. Add an XHTML "<br />" tag before the end of | |
38 | every line except the last. |
|
38 | every line except the last. | |
39 | """ |
|
39 | """ | |
40 | return text.replace('\n', '<br/>\n') |
|
40 | return text.replace('\n', '<br/>\n') | |
41 |
|
41 | |||
42 | agescales = [("year", 3600 * 24 * 365, 'Y'), |
|
42 | agescales = [("year", 3600 * 24 * 365, 'Y'), | |
43 | ("month", 3600 * 24 * 30, 'M'), |
|
43 | ("month", 3600 * 24 * 30, 'M'), | |
44 | ("week", 3600 * 24 * 7, 'W'), |
|
44 | ("week", 3600 * 24 * 7, 'W'), | |
45 | ("day", 3600 * 24, 'd'), |
|
45 | ("day", 3600 * 24, 'd'), | |
46 | ("hour", 3600, 'h'), |
|
46 | ("hour", 3600, 'h'), | |
47 | ("minute", 60, 'm'), |
|
47 | ("minute", 60, 'm'), | |
48 | ("second", 1, 's')] |
|
48 | ("second", 1, 's')] | |
49 |
|
49 | |||
50 | @templatefilter('age') |
|
50 | @templatefilter('age') | |
51 | def age(date, abbrev=False): |
|
51 | def age(date, abbrev=False): | |
52 | """Date. Returns a human-readable date/time difference between the |
|
52 | """Date. Returns a human-readable date/time difference between the | |
53 | given date/time and the current date/time. |
|
53 | given date/time and the current date/time. | |
54 | """ |
|
54 | """ | |
55 |
|
55 | |||
56 | def plural(t, c): |
|
56 | def plural(t, c): | |
57 | if c == 1: |
|
57 | if c == 1: | |
58 | return t |
|
58 | return t | |
59 | return t + "s" |
|
59 | return t + "s" | |
60 | def fmt(t, c, a): |
|
60 | def fmt(t, c, a): | |
61 | if abbrev: |
|
61 | if abbrev: | |
62 | return "%d%s" % (c, a) |
|
62 | return "%d%s" % (c, a) | |
63 | return "%d %s" % (c, plural(t, c)) |
|
63 | return "%d %s" % (c, plural(t, c)) | |
64 |
|
64 | |||
65 | now = time.time() |
|
65 | now = time.time() | |
66 | then = date[0] |
|
66 | then = date[0] | |
67 | future = False |
|
67 | future = False | |
68 | if then > now: |
|
68 | if then > now: | |
69 | future = True |
|
69 | future = True | |
70 | delta = max(1, int(then - now)) |
|
70 | delta = max(1, int(then - now)) | |
71 | if delta > agescales[0][1] * 30: |
|
71 | if delta > agescales[0][1] * 30: | |
72 | return 'in the distant future' |
|
72 | return 'in the distant future' | |
73 | else: |
|
73 | else: | |
74 | delta = max(1, int(now - then)) |
|
74 | delta = max(1, int(now - then)) | |
75 | if delta > agescales[0][1] * 2: |
|
75 | if delta > agescales[0][1] * 2: | |
76 | return util.shortdate(date) |
|
76 | return util.shortdate(date) | |
77 |
|
77 | |||
78 | for t, s, a in agescales: |
|
78 | for t, s, a in agescales: | |
79 | n = delta // s |
|
79 | n = delta // s | |
80 | if n >= 2 or s == 1: |
|
80 | if n >= 2 or s == 1: | |
81 | if future: |
|
81 | if future: | |
82 | return '%s from now' % fmt(t, n, a) |
|
82 | return '%s from now' % fmt(t, n, a) | |
83 | return '%s ago' % fmt(t, n, a) |
|
83 | return '%s ago' % fmt(t, n, a) | |
84 |
|
84 | |||
85 | @templatefilter('basename') |
|
85 | @templatefilter('basename') | |
86 | def basename(path): |
|
86 | def basename(path): | |
87 | """Any text. Treats the text as a path, and returns the last |
|
87 | """Any text. Treats the text as a path, and returns the last | |
88 | component of the path after splitting by the path separator |
|
88 | component of the path after splitting by the path separator | |
89 | (ignoring trailing separators). For example, "foo/bar/baz" becomes |
|
89 | (ignoring trailing separators). For example, "foo/bar/baz" becomes | |
90 | "baz" and "foo/bar//" becomes "bar". |
|
90 | "baz" and "foo/bar//" becomes "bar". | |
91 | """ |
|
91 | """ | |
92 | return os.path.basename(path) |
|
92 | return os.path.basename(path) | |
93 |
|
93 | |||
94 | @templatefilter('count') |
|
94 | @templatefilter('count') | |
95 | def count(i): |
|
95 | def count(i): | |
96 | """List or text. Returns the length as an integer.""" |
|
96 | """List or text. Returns the length as an integer.""" | |
97 | return len(i) |
|
97 | return len(i) | |
98 |
|
98 | |||
99 | @templatefilter('domain') |
|
99 | @templatefilter('domain') | |
100 | def domain(author): |
|
100 | def domain(author): | |
101 | """Any text. Finds the first string that looks like an email |
|
101 | """Any text. Finds the first string that looks like an email | |
102 | address, and extracts just the domain component. Example: ``User |
|
102 | address, and extracts just the domain component. Example: ``User | |
103 | <user@example.com>`` becomes ``example.com``. |
|
103 | <user@example.com>`` becomes ``example.com``. | |
104 | """ |
|
104 | """ | |
105 | f = author.find('@') |
|
105 | f = author.find('@') | |
106 | if f == -1: |
|
106 | if f == -1: | |
107 | return '' |
|
107 | return '' | |
108 | author = author[f + 1:] |
|
108 | author = author[f + 1:] | |
109 | f = author.find('>') |
|
109 | f = author.find('>') | |
110 | if f >= 0: |
|
110 | if f >= 0: | |
111 | author = author[:f] |
|
111 | author = author[:f] | |
112 | return author |
|
112 | return author | |
113 |
|
113 | |||
114 | @templatefilter('email') |
|
114 | @templatefilter('email') | |
115 | def email(text): |
|
115 | def email(text): | |
116 | """Any text. Extracts the first string that looks like an email |
|
116 | """Any text. Extracts the first string that looks like an email | |
117 | address. Example: ``User <user@example.com>`` becomes |
|
117 | address. Example: ``User <user@example.com>`` becomes | |
118 | ``user@example.com``. |
|
118 | ``user@example.com``. | |
119 | """ |
|
119 | """ | |
120 | return util.email(text) |
|
120 | return util.email(text) | |
121 |
|
121 | |||
122 | @templatefilter('escape') |
|
122 | @templatefilter('escape') | |
123 | def escape(text): |
|
123 | def escape(text): | |
124 | """Any text. Replaces the special XML/XHTML characters "&", "<" |
|
124 | """Any text. Replaces the special XML/XHTML characters "&", "<" | |
125 | and ">" with XML entities, and filters out NUL characters. |
|
125 | and ">" with XML entities, and filters out NUL characters. | |
126 | """ |
|
126 | """ | |
127 | return cgi.escape(text.replace('\0', ''), True) |
|
127 | return cgi.escape(text.replace('\0', ''), True) | |
128 |
|
128 | |||
129 | para_re = None |
|
129 | para_re = None | |
130 | space_re = None |
|
130 | space_re = None | |
131 |
|
131 | |||
132 | def fill(text, width, initindent='', hangindent=''): |
|
132 | def fill(text, width, initindent='', hangindent=''): | |
133 | '''fill many paragraphs with optional indentation.''' |
|
133 | '''fill many paragraphs with optional indentation.''' | |
134 | global para_re, space_re |
|
134 | global para_re, space_re | |
135 | if para_re is None: |
|
135 | if para_re is None: | |
136 | para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M) |
|
136 | para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M) | |
137 | space_re = re.compile(r' +') |
|
137 | space_re = re.compile(r' +') | |
138 |
|
138 | |||
139 | def findparas(): |
|
139 | def findparas(): | |
140 | start = 0 |
|
140 | start = 0 | |
141 | while True: |
|
141 | while True: | |
142 | m = para_re.search(text, start) |
|
142 | m = para_re.search(text, start) | |
143 | if not m: |
|
143 | if not m: | |
144 | uctext = unicode(text[start:], encoding.encoding) |
|
144 | uctext = unicode(text[start:], encoding.encoding) | |
145 | w = len(uctext) |
|
145 | w = len(uctext) | |
146 | while 0 < w and uctext[w - 1].isspace(): |
|
146 | while 0 < w and uctext[w - 1].isspace(): | |
147 | w -= 1 |
|
147 | w -= 1 | |
148 | yield (uctext[:w].encode(encoding.encoding), |
|
148 | yield (uctext[:w].encode(encoding.encoding), | |
149 | uctext[w:].encode(encoding.encoding)) |
|
149 | uctext[w:].encode(encoding.encoding)) | |
150 | break |
|
150 | break | |
151 | yield text[start:m.start(0)], m.group(1) |
|
151 | yield text[start:m.start(0)], m.group(1) | |
152 | start = m.end(1) |
|
152 | start = m.end(1) | |
153 |
|
153 | |||
154 | return "".join([util.wrap(space_re.sub(' ', util.wrap(para, width)), |
|
154 | return "".join([util.wrap(space_re.sub(' ', util.wrap(para, width)), | |
155 | width, initindent, hangindent) + rest |
|
155 | width, initindent, hangindent) + rest | |
156 | for para, rest in findparas()]) |
|
156 | for para, rest in findparas()]) | |
157 |
|
157 | |||
158 | @templatefilter('fill68') |
|
158 | @templatefilter('fill68') | |
159 | def fill68(text): |
|
159 | def fill68(text): | |
160 | """Any text. Wraps the text to fit in 68 columns.""" |
|
160 | """Any text. Wraps the text to fit in 68 columns.""" | |
161 | return fill(text, 68) |
|
161 | return fill(text, 68) | |
162 |
|
162 | |||
163 | @templatefilter('fill76') |
|
163 | @templatefilter('fill76') | |
164 | def fill76(text): |
|
164 | def fill76(text): | |
165 | """Any text. Wraps the text to fit in 76 columns.""" |
|
165 | """Any text. Wraps the text to fit in 76 columns.""" | |
166 | return fill(text, 76) |
|
166 | return fill(text, 76) | |
167 |
|
167 | |||
168 | @templatefilter('firstline') |
|
168 | @templatefilter('firstline') | |
169 | def firstline(text): |
|
169 | def firstline(text): | |
170 | """Any text. Returns the first line of text.""" |
|
170 | """Any text. Returns the first line of text.""" | |
171 | try: |
|
171 | try: | |
172 | return text.splitlines(True)[0].rstrip('\r\n') |
|
172 | return text.splitlines(True)[0].rstrip('\r\n') | |
173 | except IndexError: |
|
173 | except IndexError: | |
174 | return '' |
|
174 | return '' | |
175 |
|
175 | |||
176 | @templatefilter('hex') |
|
176 | @templatefilter('hex') | |
177 | def hexfilter(text): |
|
177 | def hexfilter(text): | |
178 | """Any text. Convert a binary Mercurial node identifier into |
|
178 | """Any text. Convert a binary Mercurial node identifier into | |
179 | its long hexadecimal representation. |
|
179 | its long hexadecimal representation. | |
180 | """ |
|
180 | """ | |
181 | return node.hex(text) |
|
181 | return node.hex(text) | |
182 |
|
182 | |||
183 | @templatefilter('hgdate') |
|
183 | @templatefilter('hgdate') | |
184 | def hgdate(text): |
|
184 | def hgdate(text): | |
185 | """Date. Returns the date as a pair of numbers: "1157407993 |
|
185 | """Date. Returns the date as a pair of numbers: "1157407993 | |
186 | 25200" (Unix timestamp, timezone offset). |
|
186 | 25200" (Unix timestamp, timezone offset). | |
187 | """ |
|
187 | """ | |
188 | return "%d %d" % text |
|
188 | return "%d %d" % text | |
189 |
|
189 | |||
190 | @templatefilter('isodate') |
|
190 | @templatefilter('isodate') | |
191 | def isodate(text): |
|
191 | def isodate(text): | |
192 | """Date. Returns the date in ISO 8601 format: "2009-08-18 13:00 |
|
192 | """Date. Returns the date in ISO 8601 format: "2009-08-18 13:00 | |
193 | +0200". |
|
193 | +0200". | |
194 | """ |
|
194 | """ | |
195 | return util.datestr(text, '%Y-%m-%d %H:%M %1%2') |
|
195 | return util.datestr(text, '%Y-%m-%d %H:%M %1%2') | |
196 |
|
196 | |||
197 | @templatefilter('isodatesec') |
|
197 | @templatefilter('isodatesec') | |
198 | def isodatesec(text): |
|
198 | def isodatesec(text): | |
199 | """Date. Returns the date in ISO 8601 format, including |
|
199 | """Date. Returns the date in ISO 8601 format, including | |
200 | seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date |
|
200 | seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date | |
201 | filter. |
|
201 | filter. | |
202 | """ |
|
202 | """ | |
203 | return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2') |
|
203 | return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2') | |
204 |
|
204 | |||
205 | def indent(text, prefix): |
|
205 | def indent(text, prefix): | |
206 | '''indent each non-empty line of text after first with prefix.''' |
|
206 | '''indent each non-empty line of text after first with prefix.''' | |
207 | lines = text.splitlines() |
|
207 | lines = text.splitlines() | |
208 | num_lines = len(lines) |
|
208 | num_lines = len(lines) | |
209 | endswithnewline = text[-1:] == '\n' |
|
209 | endswithnewline = text[-1:] == '\n' | |
210 | def indenter(): |
|
210 | def indenter(): | |
211 | for i in xrange(num_lines): |
|
211 | for i in xrange(num_lines): | |
212 | l = lines[i] |
|
212 | l = lines[i] | |
213 | if i and l.strip(): |
|
213 | if i and l.strip(): | |
214 | yield prefix |
|
214 | yield prefix | |
215 | yield l |
|
215 | yield l | |
216 | if i < num_lines - 1 or endswithnewline: |
|
216 | if i < num_lines - 1 or endswithnewline: | |
217 | yield '\n' |
|
217 | yield '\n' | |
218 | return "".join(indenter()) |
|
218 | return "".join(indenter()) | |
219 |
|
219 | |||
220 | @templatefilter('json') |
|
220 | @templatefilter('json') | |
221 | def json(obj, paranoid=True): |
|
221 | def json(obj, paranoid=True): | |
222 | if obj is None: |
|
222 | if obj is None: | |
223 | return 'null' |
|
223 | return 'null' | |
224 | elif obj is False: |
|
224 | elif obj is False: | |
225 | return 'false' |
|
225 | return 'false' | |
226 | elif obj is True: |
|
226 | elif obj is True: | |
227 | return 'true' |
|
227 | return 'true' | |
228 | elif isinstance(obj, (int, long, float)): |
|
228 | elif isinstance(obj, (int, long, float)): | |
229 | return str(obj) |
|
229 | return str(obj) | |
230 | elif isinstance(obj, str): |
|
230 | elif isinstance(obj, str): | |
231 | return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) |
|
231 | return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) | |
232 | elif util.safehasattr(obj, 'keys'): |
|
232 | elif util.safehasattr(obj, 'keys'): | |
233 | out = ['%s: %s' % (json(k), json(v)) |
|
233 | out = ['%s: %s' % (json(k), json(v)) | |
234 | for k, v in sorted(obj.iteritems())] |
|
234 | for k, v in sorted(obj.iteritems())] | |
235 | return '{' + ', '.join(out) + '}' |
|
235 | return '{' + ', '.join(out) + '}' | |
236 | elif util.safehasattr(obj, '__iter__'): |
|
236 | elif util.safehasattr(obj, '__iter__'): | |
237 | out = [json(i) for i in obj] |
|
237 | out = [json(i) for i in obj] | |
238 | return '[' + ', '.join(out) + ']' |
|
238 | return '[' + ', '.join(out) + ']' | |
239 | else: |
|
239 | else: | |
240 | raise TypeError('cannot encode type %s' % obj.__class__.__name__) |
|
240 | raise TypeError('cannot encode type %s' % obj.__class__.__name__) | |
241 |
|
241 | |||
242 | @templatefilter('lower') |
|
242 | @templatefilter('lower') | |
243 | def lower(text): |
|
243 | def lower(text): | |
244 | """Any text. Converts the text to lowercase.""" |
|
244 | """Any text. Converts the text to lowercase.""" | |
245 | return encoding.lower(text) |
|
245 | return encoding.lower(text) | |
246 |
|
246 | |||
247 | @templatefilter('nonempty') |
|
247 | @templatefilter('nonempty') | |
248 | def nonempty(str): |
|
248 | def nonempty(str): | |
249 | """Any text. Returns '(none)' if the string is empty.""" |
|
249 | """Any text. Returns '(none)' if the string is empty.""" | |
250 | return str or "(none)" |
|
250 | return str or "(none)" | |
251 |
|
251 | |||
252 | @templatefilter('obfuscate') |
|
252 | @templatefilter('obfuscate') | |
253 | def obfuscate(text): |
|
253 | def obfuscate(text): | |
254 | """Any text. Returns the input text rendered as a sequence of |
|
254 | """Any text. Returns the input text rendered as a sequence of | |
255 | XML entities. |
|
255 | XML entities. | |
256 | """ |
|
256 | """ | |
257 | text = unicode(text, encoding.encoding, 'replace') |
|
257 | text = unicode(text, encoding.encoding, 'replace') | |
258 | return ''.join(['&#%d;' % ord(c) for c in text]) |
|
258 | return ''.join(['&#%d;' % ord(c) for c in text]) | |
259 |
|
259 | |||
260 | @templatefilter('permissions') |
|
260 | @templatefilter('permissions') | |
261 | def permissions(flags): |
|
261 | def permissions(flags): | |
262 | if "l" in flags: |
|
262 | if "l" in flags: | |
263 | return "lrwxrwxrwx" |
|
263 | return "lrwxrwxrwx" | |
264 | if "x" in flags: |
|
264 | if "x" in flags: | |
265 | return "-rwxr-xr-x" |
|
265 | return "-rwxr-xr-x" | |
266 | return "-rw-r--r--" |
|
266 | return "-rw-r--r--" | |
267 |
|
267 | |||
268 | @templatefilter('person') |
|
268 | @templatefilter('person') | |
269 | def person(author): |
|
269 | def person(author): | |
270 | """Any text. Returns the name before an email address, |
|
270 | """Any text. Returns the name before an email address, | |
271 | interpreting it as per RFC 5322. |
|
271 | interpreting it as per RFC 5322. | |
272 |
|
272 | |||
273 | >>> person('foo@bar') |
|
273 | >>> person('foo@bar') | |
274 | 'foo' |
|
274 | 'foo' | |
275 | >>> person('Foo Bar <foo@bar>') |
|
275 | >>> person('Foo Bar <foo@bar>') | |
276 | 'Foo Bar' |
|
276 | 'Foo Bar' | |
277 | >>> person('"Foo Bar" <foo@bar>') |
|
277 | >>> person('"Foo Bar" <foo@bar>') | |
278 | 'Foo Bar' |
|
278 | 'Foo Bar' | |
279 | >>> person('"Foo \"buz\" Bar" <foo@bar>') |
|
279 | >>> person('"Foo \"buz\" Bar" <foo@bar>') | |
280 | 'Foo "buz" Bar' |
|
280 | 'Foo "buz" Bar' | |
281 | >>> # The following are invalid, but do exist in real-life |
|
281 | >>> # The following are invalid, but do exist in real-life | |
282 | ... |
|
282 | ... | |
283 | >>> person('Foo "buz" Bar <foo@bar>') |
|
283 | >>> person('Foo "buz" Bar <foo@bar>') | |
284 | 'Foo "buz" Bar' |
|
284 | 'Foo "buz" Bar' | |
285 | >>> person('"Foo Bar <foo@bar>') |
|
285 | >>> person('"Foo Bar <foo@bar>') | |
286 | 'Foo Bar' |
|
286 | 'Foo Bar' | |
287 | """ |
|
287 | """ | |
288 | if '@' not in author: |
|
288 | if '@' not in author: | |
289 | return author |
|
289 | return author | |
290 | f = author.find('<') |
|
290 | f = author.find('<') | |
291 | if f != -1: |
|
291 | if f != -1: | |
292 | return author[:f].strip(' "').replace('\\"', '"') |
|
292 | return author[:f].strip(' "').replace('\\"', '"') | |
293 | f = author.find('@') |
|
293 | f = author.find('@') | |
294 | return author[:f].replace('.', ' ') |
|
294 | return author[:f].replace('.', ' ') | |
295 |
|
295 | |||
296 | @templatefilter('revescape') |
|
296 | @templatefilter('revescape') | |
297 | def revescape(text): |
|
297 | def revescape(text): | |
298 | """Any text. Escapes all "special" characters, except @. |
|
298 | """Any text. Escapes all "special" characters, except @. | |
299 | Forward slashes are escaped twice to prevent web servers from prematurely |
|
299 | Forward slashes are escaped twice to prevent web servers from prematurely | |
300 | unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz". |
|
300 | unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz". | |
301 | """ |
|
301 | """ | |
302 | return urlreq.quote(text, safe='/@').replace('/', '%252F') |
|
302 | return urlreq.quote(text, safe='/@').replace('/', '%252F') | |
303 |
|
303 | |||
304 | @templatefilter('rfc3339date') |
|
304 | @templatefilter('rfc3339date') | |
305 | def rfc3339date(text): |
|
305 | def rfc3339date(text): | |
306 | """Date. Returns a date using the Internet date format |
|
306 | """Date. Returns a date using the Internet date format | |
307 | specified in RFC 3339: "2009-08-18T13:00:13+02:00". |
|
307 | specified in RFC 3339: "2009-08-18T13:00:13+02:00". | |
308 | """ |
|
308 | """ | |
309 | return util.datestr(text, "%Y-%m-%dT%H:%M:%S%1:%2") |
|
309 | return util.datestr(text, "%Y-%m-%dT%H:%M:%S%1:%2") | |
310 |
|
310 | |||
311 | @templatefilter('rfc822date') |
|
311 | @templatefilter('rfc822date') | |
312 | def rfc822date(text): |
|
312 | def rfc822date(text): | |
313 | """Date. Returns a date using the same format used in email |
|
313 | """Date. Returns a date using the same format used in email | |
314 | headers: "Tue, 18 Aug 2009 13:00:13 +0200". |
|
314 | headers: "Tue, 18 Aug 2009 13:00:13 +0200". | |
315 | """ |
|
315 | """ | |
316 | return util.datestr(text, "%a, %d %b %Y %H:%M:%S %1%2") |
|
316 | return util.datestr(text, "%a, %d %b %Y %H:%M:%S %1%2") | |
317 |
|
317 | |||
318 | @templatefilter('short') |
|
318 | @templatefilter('short') | |
319 | def short(text): |
|
319 | def short(text): | |
320 | """Changeset hash. Returns the short form of a changeset hash, |
|
320 | """Changeset hash. Returns the short form of a changeset hash, | |
321 | i.e. a 12 hexadecimal digit string. |
|
321 | i.e. a 12 hexadecimal digit string. | |
322 | """ |
|
322 | """ | |
323 | return text[:12] |
|
323 | return text[:12] | |
324 |
|
324 | |||
325 | @templatefilter('shortbisect') |
|
325 | @templatefilter('shortbisect') | |
326 | def shortbisect(text): |
|
326 | def shortbisect(text): | |
327 | """Any text. Treats `text` as a bisection status, and |
|
327 | """Any text. Treats `text` as a bisection status, and | |
328 | returns a single-character representing the status (G: good, B: bad, |
|
328 | returns a single-character representing the status (G: good, B: bad, | |
329 | S: skipped, U: untested, I: ignored). Returns single space if `text` |
|
329 | S: skipped, U: untested, I: ignored). Returns single space if `text` | |
330 | is not a valid bisection status. |
|
330 | is not a valid bisection status. | |
331 | """ |
|
331 | """ | |
332 | return hbisect.shortlabel(text) or ' ' |
|
332 | return hbisect.shortlabel(text) or ' ' | |
333 |
|
333 | |||
334 | @templatefilter('shortdate') |
|
334 | @templatefilter('shortdate') | |
335 | def shortdate(text): |
|
335 | def shortdate(text): | |
336 | """Date. Returns a date like "2006-09-18".""" |
|
336 | """Date. Returns a date like "2006-09-18".""" | |
337 | return util.shortdate(text) |
|
337 | return util.shortdate(text) | |
338 |
|
338 | |||
339 | @templatefilter('splitlines') |
|
339 | @templatefilter('splitlines') | |
340 | def splitlines(text): |
|
340 | def splitlines(text): | |
341 | """Any text. Split text into a list of lines.""" |
|
341 | """Any text. Split text into a list of lines.""" | |
342 |
return templatekw. |
|
342 | return templatekw.hybridlist(text.splitlines(), name='line') | |
343 |
|
343 | |||
344 | @templatefilter('stringescape') |
|
344 | @templatefilter('stringescape') | |
345 | def stringescape(text): |
|
345 | def stringescape(text): | |
346 | return util.escapestr(text) |
|
346 | return util.escapestr(text) | |
347 |
|
347 | |||
348 | @templatefilter('stringify') |
|
348 | @templatefilter('stringify') | |
349 | def stringify(thing): |
|
349 | def stringify(thing): | |
350 | """Any type. Turns the value into text by converting values into |
|
350 | """Any type. Turns the value into text by converting values into | |
351 | text and concatenating them. |
|
351 | text and concatenating them. | |
352 | """ |
|
352 | """ | |
353 | thing = templatekw.unwraphybrid(thing) |
|
353 | thing = templatekw.unwraphybrid(thing) | |
354 | if util.safehasattr(thing, '__iter__') and not isinstance(thing, str): |
|
354 | if util.safehasattr(thing, '__iter__') and not isinstance(thing, str): | |
355 | return "".join([stringify(t) for t in thing if t is not None]) |
|
355 | return "".join([stringify(t) for t in thing if t is not None]) | |
356 | if thing is None: |
|
356 | if thing is None: | |
357 | return "" |
|
357 | return "" | |
358 | return str(thing) |
|
358 | return str(thing) | |
359 |
|
359 | |||
360 | @templatefilter('stripdir') |
|
360 | @templatefilter('stripdir') | |
361 | def stripdir(text): |
|
361 | def stripdir(text): | |
362 | """Treat the text as path and strip a directory level, if |
|
362 | """Treat the text as path and strip a directory level, if | |
363 | possible. For example, "foo" and "foo/bar" becomes "foo". |
|
363 | possible. For example, "foo" and "foo/bar" becomes "foo". | |
364 | """ |
|
364 | """ | |
365 | dir = os.path.dirname(text) |
|
365 | dir = os.path.dirname(text) | |
366 | if dir == "": |
|
366 | if dir == "": | |
367 | return os.path.basename(text) |
|
367 | return os.path.basename(text) | |
368 | else: |
|
368 | else: | |
369 | return dir |
|
369 | return dir | |
370 |
|
370 | |||
371 | @templatefilter('tabindent') |
|
371 | @templatefilter('tabindent') | |
372 | def tabindent(text): |
|
372 | def tabindent(text): | |
373 | """Any text. Returns the text, with every non-empty line |
|
373 | """Any text. Returns the text, with every non-empty line | |
374 | except the first starting with a tab character. |
|
374 | except the first starting with a tab character. | |
375 | """ |
|
375 | """ | |
376 | return indent(text, '\t') |
|
376 | return indent(text, '\t') | |
377 |
|
377 | |||
378 | @templatefilter('upper') |
|
378 | @templatefilter('upper') | |
379 | def upper(text): |
|
379 | def upper(text): | |
380 | """Any text. Converts the text to uppercase.""" |
|
380 | """Any text. Converts the text to uppercase.""" | |
381 | return encoding.upper(text) |
|
381 | return encoding.upper(text) | |
382 |
|
382 | |||
383 | @templatefilter('urlescape') |
|
383 | @templatefilter('urlescape') | |
384 | def urlescape(text): |
|
384 | def urlescape(text): | |
385 | """Any text. Escapes all "special" characters. For example, |
|
385 | """Any text. Escapes all "special" characters. For example, | |
386 | "foo bar" becomes "foo%20bar". |
|
386 | "foo bar" becomes "foo%20bar". | |
387 | """ |
|
387 | """ | |
388 | return urlreq.quote(text) |
|
388 | return urlreq.quote(text) | |
389 |
|
389 | |||
390 | @templatefilter('user') |
|
390 | @templatefilter('user') | |
391 | def userfilter(text): |
|
391 | def userfilter(text): | |
392 | """Any text. Returns a short representation of a user name or email |
|
392 | """Any text. Returns a short representation of a user name or email | |
393 | address.""" |
|
393 | address.""" | |
394 | return util.shortuser(text) |
|
394 | return util.shortuser(text) | |
395 |
|
395 | |||
396 | @templatefilter('emailuser') |
|
396 | @templatefilter('emailuser') | |
397 | def emailuser(text): |
|
397 | def emailuser(text): | |
398 | """Any text. Returns the user portion of an email address.""" |
|
398 | """Any text. Returns the user portion of an email address.""" | |
399 | return util.emailuser(text) |
|
399 | return util.emailuser(text) | |
400 |
|
400 | |||
401 | @templatefilter('utf8') |
|
401 | @templatefilter('utf8') | |
402 | def utf8(text): |
|
402 | def utf8(text): | |
403 | """Any text. Converts from the local character encoding to UTF-8.""" |
|
403 | """Any text. Converts from the local character encoding to UTF-8.""" | |
404 | return encoding.fromlocal(text) |
|
404 | return encoding.fromlocal(text) | |
405 |
|
405 | |||
406 | @templatefilter('xmlescape') |
|
406 | @templatefilter('xmlescape') | |
407 | def xmlescape(text): |
|
407 | def xmlescape(text): | |
408 | text = (text |
|
408 | text = (text | |
409 | .replace('&', '&') |
|
409 | .replace('&', '&') | |
410 | .replace('<', '<') |
|
410 | .replace('<', '<') | |
411 | .replace('>', '>') |
|
411 | .replace('>', '>') | |
412 | .replace('"', '"') |
|
412 | .replace('"', '"') | |
413 | .replace("'", ''')) # ' invalid in HTML |
|
413 | .replace("'", ''')) # ' invalid in HTML | |
414 | return re.sub('[\x00-\x08\x0B\x0C\x0E-\x1F]', ' ', text) |
|
414 | return re.sub('[\x00-\x08\x0B\x0C\x0E-\x1F]', ' ', text) | |
415 |
|
415 | |||
416 | def websub(text, websubtable): |
|
416 | def websub(text, websubtable): | |
417 | """:websub: Any text. Only applies to hgweb. Applies the regular |
|
417 | """:websub: Any text. Only applies to hgweb. Applies the regular | |
418 | expression replacements defined in the websub section. |
|
418 | expression replacements defined in the websub section. | |
419 | """ |
|
419 | """ | |
420 | if websubtable: |
|
420 | if websubtable: | |
421 | for regexp, format in websubtable: |
|
421 | for regexp, format in websubtable: | |
422 | text = regexp.sub(format, text) |
|
422 | text = regexp.sub(format, text) | |
423 | return text |
|
423 | return text | |
424 |
|
424 | |||
425 | def loadfilter(ui, extname, registrarobj): |
|
425 | def loadfilter(ui, extname, registrarobj): | |
426 | """Load template filter from specified registrarobj |
|
426 | """Load template filter from specified registrarobj | |
427 | """ |
|
427 | """ | |
428 | for name, func in registrarobj._table.iteritems(): |
|
428 | for name, func in registrarobj._table.iteritems(): | |
429 | filters[name] = func |
|
429 | filters[name] = func | |
430 |
|
430 | |||
431 | # tell hggettext to extract docstrings from these functions: |
|
431 | # tell hggettext to extract docstrings from these functions: | |
432 | i18nfunctions = filters.values() |
|
432 | i18nfunctions = filters.values() |
@@ -1,4230 +1,4235 | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg add a |
|
4 | $ hg add a | |
5 | $ echo line 1 > b |
|
5 | $ echo line 1 > b | |
6 | $ echo line 2 >> b |
|
6 | $ echo line 2 >> b | |
7 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' |
|
7 | $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>' | |
8 |
|
8 | |||
9 | $ hg add b |
|
9 | $ hg add b | |
10 | $ echo other 1 > c |
|
10 | $ echo other 1 > c | |
11 | $ echo other 2 >> c |
|
11 | $ echo other 2 >> c | |
12 | $ echo >> c |
|
12 | $ echo >> c | |
13 | $ echo other 3 >> c |
|
13 | $ echo other 3 >> c | |
14 | $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>' |
|
14 | $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>' | |
15 |
|
15 | |||
16 | $ hg add c |
|
16 | $ hg add c | |
17 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' |
|
17 | $ hg commit -m 'no person' -d '1200000 0' -u 'other@place' | |
18 | $ echo c >> c |
|
18 | $ echo c >> c | |
19 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' |
|
19 | $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person' | |
20 |
|
20 | |||
21 | $ echo foo > .hg/branch |
|
21 | $ echo foo > .hg/branch | |
22 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' |
|
22 | $ hg commit -m 'new branch' -d '1400000 0' -u 'person' | |
23 |
|
23 | |||
24 | $ hg co -q 3 |
|
24 | $ hg co -q 3 | |
25 | $ echo other 4 >> d |
|
25 | $ echo other 4 >> d | |
26 | $ hg add d |
|
26 | $ hg add d | |
27 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' |
|
27 | $ hg commit -m 'new head' -d '1500000 0' -u 'person' | |
28 |
|
28 | |||
29 | $ hg merge -q foo |
|
29 | $ hg merge -q foo | |
30 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' |
|
30 | $ hg commit -m 'merge' -d '1500001 0' -u 'person' | |
31 |
|
31 | |||
32 | Test arithmetic operators have the right precedence: |
|
32 | Test arithmetic operators have the right precedence: | |
33 |
|
33 | |||
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' |
|
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' | |
35 | 2020 1964 |
|
35 | 2020 1964 | |
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' |
|
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' | |
37 | 9860 5908 |
|
37 | 9860 5908 | |
38 |
|
38 | |||
39 | Test division: |
|
39 | Test division: | |
40 |
|
40 | |||
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' |
|
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' | |
42 | (template |
|
42 | (template | |
43 | (/ |
|
43 | (/ | |
44 | ('integer', '5') |
|
44 | ('integer', '5') | |
45 | ('integer', '2')) |
|
45 | ('integer', '2')) | |
46 | ('string', ' ') |
|
46 | ('string', ' ') | |
47 | (func |
|
47 | (func | |
48 | ('symbol', 'mod') |
|
48 | ('symbol', 'mod') | |
49 | (list |
|
49 | (list | |
50 | ('integer', '5') |
|
50 | ('integer', '5') | |
51 | ('integer', '2'))) |
|
51 | ('integer', '2'))) | |
52 | ('string', '\n')) |
|
52 | ('string', '\n')) | |
53 | 2 1 |
|
53 | 2 1 | |
54 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' |
|
54 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' | |
55 | (template |
|
55 | (template | |
56 | (/ |
|
56 | (/ | |
57 | ('integer', '5') |
|
57 | ('integer', '5') | |
58 | (negate |
|
58 | (negate | |
59 | ('integer', '2'))) |
|
59 | ('integer', '2'))) | |
60 | ('string', ' ') |
|
60 | ('string', ' ') | |
61 | (func |
|
61 | (func | |
62 | ('symbol', 'mod') |
|
62 | ('symbol', 'mod') | |
63 | (list |
|
63 | (list | |
64 | ('integer', '5') |
|
64 | ('integer', '5') | |
65 | (negate |
|
65 | (negate | |
66 | ('integer', '2')))) |
|
66 | ('integer', '2')))) | |
67 | ('string', '\n')) |
|
67 | ('string', '\n')) | |
68 | -3 -1 |
|
68 | -3 -1 | |
69 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' |
|
69 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' | |
70 | (template |
|
70 | (template | |
71 | (/ |
|
71 | (/ | |
72 | (negate |
|
72 | (negate | |
73 | ('integer', '5')) |
|
73 | ('integer', '5')) | |
74 | ('integer', '2')) |
|
74 | ('integer', '2')) | |
75 | ('string', ' ') |
|
75 | ('string', ' ') | |
76 | (func |
|
76 | (func | |
77 | ('symbol', 'mod') |
|
77 | ('symbol', 'mod') | |
78 | (list |
|
78 | (list | |
79 | (negate |
|
79 | (negate | |
80 | ('integer', '5')) |
|
80 | ('integer', '5')) | |
81 | ('integer', '2'))) |
|
81 | ('integer', '2'))) | |
82 | ('string', '\n')) |
|
82 | ('string', '\n')) | |
83 | -3 1 |
|
83 | -3 1 | |
84 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' |
|
84 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' | |
85 | (template |
|
85 | (template | |
86 | (/ |
|
86 | (/ | |
87 | (negate |
|
87 | (negate | |
88 | ('integer', '5')) |
|
88 | ('integer', '5')) | |
89 | (negate |
|
89 | (negate | |
90 | ('integer', '2'))) |
|
90 | ('integer', '2'))) | |
91 | ('string', ' ') |
|
91 | ('string', ' ') | |
92 | (func |
|
92 | (func | |
93 | ('symbol', 'mod') |
|
93 | ('symbol', 'mod') | |
94 | (list |
|
94 | (list | |
95 | (negate |
|
95 | (negate | |
96 | ('integer', '5')) |
|
96 | ('integer', '5')) | |
97 | (negate |
|
97 | (negate | |
98 | ('integer', '2')))) |
|
98 | ('integer', '2')))) | |
99 | ('string', '\n')) |
|
99 | ('string', '\n')) | |
100 | 2 -1 |
|
100 | 2 -1 | |
101 |
|
101 | |||
102 | Filters bind closer than arithmetic: |
|
102 | Filters bind closer than arithmetic: | |
103 |
|
103 | |||
104 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' |
|
104 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' | |
105 | (template |
|
105 | (template | |
106 | (- |
|
106 | (- | |
107 | (| |
|
107 | (| | |
108 | (func |
|
108 | (func | |
109 | ('symbol', 'revset') |
|
109 | ('symbol', 'revset') | |
110 | ('string', '.')) |
|
110 | ('string', '.')) | |
111 | ('symbol', 'count')) |
|
111 | ('symbol', 'count')) | |
112 | ('integer', '1')) |
|
112 | ('integer', '1')) | |
113 | ('string', '\n')) |
|
113 | ('string', '\n')) | |
114 | 0 |
|
114 | 0 | |
115 |
|
115 | |||
116 | But negate binds closer still: |
|
116 | But negate binds closer still: | |
117 |
|
117 | |||
118 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' |
|
118 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' | |
119 | (template |
|
119 | (template | |
120 | (- |
|
120 | (- | |
121 | ('integer', '1') |
|
121 | ('integer', '1') | |
122 | (| |
|
122 | (| | |
123 | ('integer', '3') |
|
123 | ('integer', '3') | |
124 | ('symbol', 'stringify'))) |
|
124 | ('symbol', 'stringify'))) | |
125 | ('string', '\n')) |
|
125 | ('string', '\n')) | |
126 | hg: parse error: arithmetic only defined on integers |
|
126 | hg: parse error: arithmetic only defined on integers | |
127 | [255] |
|
127 | [255] | |
128 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' |
|
128 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' | |
129 | (template |
|
129 | (template | |
130 | (| |
|
130 | (| | |
131 | (negate |
|
131 | (negate | |
132 | ('integer', '3')) |
|
132 | ('integer', '3')) | |
133 | ('symbol', 'stringify')) |
|
133 | ('symbol', 'stringify')) | |
134 | ('string', '\n')) |
|
134 | ('string', '\n')) | |
135 | -3 |
|
135 | -3 | |
136 |
|
136 | |||
137 | Keyword arguments: |
|
137 | Keyword arguments: | |
138 |
|
138 | |||
139 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' |
|
139 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' | |
140 | (template |
|
140 | (template | |
141 | (keyvalue |
|
141 | (keyvalue | |
142 | ('symbol', 'foo') |
|
142 | ('symbol', 'foo') | |
143 | (| |
|
143 | (| | |
144 | ('symbol', 'bar') |
|
144 | ('symbol', 'bar') | |
145 | ('symbol', 'baz')))) |
|
145 | ('symbol', 'baz')))) | |
146 | hg: parse error: can't use a key-value pair in this context |
|
146 | hg: parse error: can't use a key-value pair in this context | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' |
|
149 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' | |
150 | foo |
|
150 | foo | |
151 |
|
151 | |||
152 | Call function which takes named arguments by filter syntax: |
|
152 | Call function which takes named arguments by filter syntax: | |
153 |
|
153 | |||
154 | $ hg debugtemplate '{" "|separate}' |
|
154 | $ hg debugtemplate '{" "|separate}' | |
155 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' |
|
155 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' | |
156 | hg: parse error: unknown method 'list' |
|
156 | hg: parse error: unknown method 'list' | |
157 | [255] |
|
157 | [255] | |
158 |
|
158 | |||
159 | Second branch starting at nullrev: |
|
159 | Second branch starting at nullrev: | |
160 |
|
160 | |||
161 | $ hg update null |
|
161 | $ hg update null | |
162 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
162 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
163 | $ echo second > second |
|
163 | $ echo second > second | |
164 | $ hg add second |
|
164 | $ hg add second | |
165 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' |
|
165 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' | |
166 | created new head |
|
166 | created new head | |
167 |
|
167 | |||
168 | $ echo third > third |
|
168 | $ echo third > third | |
169 | $ hg add third |
|
169 | $ hg add third | |
170 | $ hg mv second fourth |
|
170 | $ hg mv second fourth | |
171 | $ hg commit -m third -d "2020-01-01 10:01" |
|
171 | $ hg commit -m third -d "2020-01-01 10:01" | |
172 |
|
172 | |||
173 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . |
|
173 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . | |
174 | fourth (second) |
|
174 | fourth (second) | |
175 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . |
|
175 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . | |
176 | second -> fourth |
|
176 | second -> fourth | |
177 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 |
|
177 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 | |
178 | 8 t |
|
178 | 8 t | |
179 | 7 f |
|
179 | 7 f | |
180 |
|
180 | |||
181 | Working-directory revision has special identifiers, though they are still |
|
181 | Working-directory revision has special identifiers, though they are still | |
182 | experimental: |
|
182 | experimental: | |
183 |
|
183 | |||
184 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' |
|
184 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' | |
185 | 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
185 | 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
186 |
|
186 | |||
187 | Some keywords are invalid for working-directory revision, but they should |
|
187 | Some keywords are invalid for working-directory revision, but they should | |
188 | never cause crash: |
|
188 | never cause crash: | |
189 |
|
189 | |||
190 | $ hg log -r 'wdir()' -T '{manifest}\n' |
|
190 | $ hg log -r 'wdir()' -T '{manifest}\n' | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | Quoting for ui.logtemplate |
|
193 | Quoting for ui.logtemplate | |
194 |
|
194 | |||
195 | $ hg tip --config "ui.logtemplate={rev}\n" |
|
195 | $ hg tip --config "ui.logtemplate={rev}\n" | |
196 | 8 |
|
196 | 8 | |
197 | $ hg tip --config "ui.logtemplate='{rev}\n'" |
|
197 | $ hg tip --config "ui.logtemplate='{rev}\n'" | |
198 | 8 |
|
198 | 8 | |
199 | $ hg tip --config 'ui.logtemplate="{rev}\n"' |
|
199 | $ hg tip --config 'ui.logtemplate="{rev}\n"' | |
200 | 8 |
|
200 | 8 | |
201 | $ hg tip --config 'ui.logtemplate=n{rev}\n' |
|
201 | $ hg tip --config 'ui.logtemplate=n{rev}\n' | |
202 | n8 |
|
202 | n8 | |
203 |
|
203 | |||
204 | Make sure user/global hgrc does not affect tests |
|
204 | Make sure user/global hgrc does not affect tests | |
205 |
|
205 | |||
206 | $ echo '[ui]' > .hg/hgrc |
|
206 | $ echo '[ui]' > .hg/hgrc | |
207 | $ echo 'logtemplate =' >> .hg/hgrc |
|
207 | $ echo 'logtemplate =' >> .hg/hgrc | |
208 | $ echo 'style =' >> .hg/hgrc |
|
208 | $ echo 'style =' >> .hg/hgrc | |
209 |
|
209 | |||
210 | Add some simple styles to settings |
|
210 | Add some simple styles to settings | |
211 |
|
211 | |||
212 | $ echo '[templates]' >> .hg/hgrc |
|
212 | $ echo '[templates]' >> .hg/hgrc | |
213 | $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc |
|
213 | $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc | |
214 | $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc |
|
214 | $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc | |
215 |
|
215 | |||
216 | $ hg log -l1 -Tsimple |
|
216 | $ hg log -l1 -Tsimple | |
217 | 8 |
|
217 | 8 | |
218 | $ hg log -l1 -Tsimple2 |
|
218 | $ hg log -l1 -Tsimple2 | |
219 | 8 |
|
219 | 8 | |
220 |
|
220 | |||
221 | Test templates and style maps in files: |
|
221 | Test templates and style maps in files: | |
222 |
|
222 | |||
223 | $ echo "{rev}" > tmpl |
|
223 | $ echo "{rev}" > tmpl | |
224 | $ hg log -l1 -T./tmpl |
|
224 | $ hg log -l1 -T./tmpl | |
225 | 8 |
|
225 | 8 | |
226 | $ hg log -l1 -Tblah/blah |
|
226 | $ hg log -l1 -Tblah/blah | |
227 | blah/blah (no-eol) |
|
227 | blah/blah (no-eol) | |
228 |
|
228 | |||
229 | $ printf 'changeset = "{rev}\\n"\n' > map-simple |
|
229 | $ printf 'changeset = "{rev}\\n"\n' > map-simple | |
230 | $ hg log -l1 -T./map-simple |
|
230 | $ hg log -l1 -T./map-simple | |
231 | 8 |
|
231 | 8 | |
232 |
|
232 | |||
233 | Test template map inheritance |
|
233 | Test template map inheritance | |
234 |
|
234 | |||
235 | $ echo "__base__ = map-cmdline.default" > map-simple |
|
235 | $ echo "__base__ = map-cmdline.default" > map-simple | |
236 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple |
|
236 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple | |
237 | $ hg log -l1 -T./map-simple |
|
237 | $ hg log -l1 -T./map-simple | |
238 | changeset: ***8*** |
|
238 | changeset: ***8*** | |
239 | tag: tip |
|
239 | tag: tip | |
240 | user: test |
|
240 | user: test | |
241 | date: Wed Jan 01 10:01:00 2020 +0000 |
|
241 | date: Wed Jan 01 10:01:00 2020 +0000 | |
242 | summary: third |
|
242 | summary: third | |
243 |
|
243 | |||
244 |
|
244 | |||
245 | Template should precede style option |
|
245 | Template should precede style option | |
246 |
|
246 | |||
247 | $ hg log -l1 --style default -T '{rev}\n' |
|
247 | $ hg log -l1 --style default -T '{rev}\n' | |
248 | 8 |
|
248 | 8 | |
249 |
|
249 | |||
250 | Add a commit with empty description, to ensure that the templates |
|
250 | Add a commit with empty description, to ensure that the templates | |
251 | below will omit the description line. |
|
251 | below will omit the description line. | |
252 |
|
252 | |||
253 | $ echo c >> c |
|
253 | $ echo c >> c | |
254 | $ hg add c |
|
254 | $ hg add c | |
255 | $ hg commit -qm ' ' |
|
255 | $ hg commit -qm ' ' | |
256 |
|
256 | |||
257 | Default style is like normal output. Phases style should be the same |
|
257 | Default style is like normal output. Phases style should be the same | |
258 | as default style, except for extra phase lines. |
|
258 | as default style, except for extra phase lines. | |
259 |
|
259 | |||
260 | $ hg log > log.out |
|
260 | $ hg log > log.out | |
261 | $ hg log --style default > style.out |
|
261 | $ hg log --style default > style.out | |
262 | $ cmp log.out style.out || diff -u log.out style.out |
|
262 | $ cmp log.out style.out || diff -u log.out style.out | |
263 | $ hg log -T phases > phases.out |
|
263 | $ hg log -T phases > phases.out | |
264 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
264 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
265 | +phase: draft |
|
265 | +phase: draft | |
266 | +phase: draft |
|
266 | +phase: draft | |
267 | +phase: draft |
|
267 | +phase: draft | |
268 | +phase: draft |
|
268 | +phase: draft | |
269 | +phase: draft |
|
269 | +phase: draft | |
270 | +phase: draft |
|
270 | +phase: draft | |
271 | +phase: draft |
|
271 | +phase: draft | |
272 | +phase: draft |
|
272 | +phase: draft | |
273 | +phase: draft |
|
273 | +phase: draft | |
274 | +phase: draft |
|
274 | +phase: draft | |
275 |
|
275 | |||
276 | $ hg log -v > log.out |
|
276 | $ hg log -v > log.out | |
277 | $ hg log -v --style default > style.out |
|
277 | $ hg log -v --style default > style.out | |
278 | $ cmp log.out style.out || diff -u log.out style.out |
|
278 | $ cmp log.out style.out || diff -u log.out style.out | |
279 | $ hg log -v -T phases > phases.out |
|
279 | $ hg log -v -T phases > phases.out | |
280 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
280 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
281 | +phase: draft |
|
281 | +phase: draft | |
282 | +phase: draft |
|
282 | +phase: draft | |
283 | +phase: draft |
|
283 | +phase: draft | |
284 | +phase: draft |
|
284 | +phase: draft | |
285 | +phase: draft |
|
285 | +phase: draft | |
286 | +phase: draft |
|
286 | +phase: draft | |
287 | +phase: draft |
|
287 | +phase: draft | |
288 | +phase: draft |
|
288 | +phase: draft | |
289 | +phase: draft |
|
289 | +phase: draft | |
290 | +phase: draft |
|
290 | +phase: draft | |
291 |
|
291 | |||
292 | $ hg log -q > log.out |
|
292 | $ hg log -q > log.out | |
293 | $ hg log -q --style default > style.out |
|
293 | $ hg log -q --style default > style.out | |
294 | $ cmp log.out style.out || diff -u log.out style.out |
|
294 | $ cmp log.out style.out || diff -u log.out style.out | |
295 | $ hg log -q -T phases > phases.out |
|
295 | $ hg log -q -T phases > phases.out | |
296 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
296 | $ cmp log.out phases.out || diff -u log.out phases.out | |
297 |
|
297 | |||
298 | $ hg log --debug > log.out |
|
298 | $ hg log --debug > log.out | |
299 | $ hg log --debug --style default > style.out |
|
299 | $ hg log --debug --style default > style.out | |
300 | $ cmp log.out style.out || diff -u log.out style.out |
|
300 | $ cmp log.out style.out || diff -u log.out style.out | |
301 | $ hg log --debug -T phases > phases.out |
|
301 | $ hg log --debug -T phases > phases.out | |
302 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
302 | $ cmp log.out phases.out || diff -u log.out phases.out | |
303 |
|
303 | |||
304 | Default style of working-directory revision should also be the same (but |
|
304 | Default style of working-directory revision should also be the same (but | |
305 | date may change while running tests): |
|
305 | date may change while running tests): | |
306 |
|
306 | |||
307 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out |
|
307 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out | |
308 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out |
|
308 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out | |
309 | $ cmp log.out style.out || diff -u log.out style.out |
|
309 | $ cmp log.out style.out || diff -u log.out style.out | |
310 |
|
310 | |||
311 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out |
|
311 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out | |
312 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out |
|
312 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out | |
313 | $ cmp log.out style.out || diff -u log.out style.out |
|
313 | $ cmp log.out style.out || diff -u log.out style.out | |
314 |
|
314 | |||
315 | $ hg log -r 'wdir()' -q > log.out |
|
315 | $ hg log -r 'wdir()' -q > log.out | |
316 | $ hg log -r 'wdir()' -q --style default > style.out |
|
316 | $ hg log -r 'wdir()' -q --style default > style.out | |
317 | $ cmp log.out style.out || diff -u log.out style.out |
|
317 | $ cmp log.out style.out || diff -u log.out style.out | |
318 |
|
318 | |||
319 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out |
|
319 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out | |
320 | $ hg log -r 'wdir()' --debug --style default \ |
|
320 | $ hg log -r 'wdir()' --debug --style default \ | |
321 | > | sed 's|^date:.*|date:|' > style.out |
|
321 | > | sed 's|^date:.*|date:|' > style.out | |
322 | $ cmp log.out style.out || diff -u log.out style.out |
|
322 | $ cmp log.out style.out || diff -u log.out style.out | |
323 |
|
323 | |||
324 | Default style should also preserve color information (issue2866): |
|
324 | Default style should also preserve color information (issue2866): | |
325 |
|
325 | |||
326 | $ cp $HGRCPATH $HGRCPATH-bak |
|
326 | $ cp $HGRCPATH $HGRCPATH-bak | |
327 | $ cat <<EOF >> $HGRCPATH |
|
327 | $ cat <<EOF >> $HGRCPATH | |
328 | > [extensions] |
|
328 | > [extensions] | |
329 | > color= |
|
329 | > color= | |
330 | > EOF |
|
330 | > EOF | |
331 |
|
331 | |||
332 | $ hg --color=debug log > log.out |
|
332 | $ hg --color=debug log > log.out | |
333 | $ hg --color=debug log --style default > style.out |
|
333 | $ hg --color=debug log --style default > style.out | |
334 | $ cmp log.out style.out || diff -u log.out style.out |
|
334 | $ cmp log.out style.out || diff -u log.out style.out | |
335 | $ hg --color=debug log -T phases > phases.out |
|
335 | $ hg --color=debug log -T phases > phases.out | |
336 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
336 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
337 | +[log.phase|phase: draft] |
|
337 | +[log.phase|phase: draft] | |
338 | +[log.phase|phase: draft] |
|
338 | +[log.phase|phase: draft] | |
339 | +[log.phase|phase: draft] |
|
339 | +[log.phase|phase: draft] | |
340 | +[log.phase|phase: draft] |
|
340 | +[log.phase|phase: draft] | |
341 | +[log.phase|phase: draft] |
|
341 | +[log.phase|phase: draft] | |
342 | +[log.phase|phase: draft] |
|
342 | +[log.phase|phase: draft] | |
343 | +[log.phase|phase: draft] |
|
343 | +[log.phase|phase: draft] | |
344 | +[log.phase|phase: draft] |
|
344 | +[log.phase|phase: draft] | |
345 | +[log.phase|phase: draft] |
|
345 | +[log.phase|phase: draft] | |
346 | +[log.phase|phase: draft] |
|
346 | +[log.phase|phase: draft] | |
347 |
|
347 | |||
348 | $ hg --color=debug -v log > log.out |
|
348 | $ hg --color=debug -v log > log.out | |
349 | $ hg --color=debug -v log --style default > style.out |
|
349 | $ hg --color=debug -v log --style default > style.out | |
350 | $ cmp log.out style.out || diff -u log.out style.out |
|
350 | $ cmp log.out style.out || diff -u log.out style.out | |
351 | $ hg --color=debug -v log -T phases > phases.out |
|
351 | $ hg --color=debug -v log -T phases > phases.out | |
352 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
352 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
353 | +[log.phase|phase: draft] |
|
353 | +[log.phase|phase: draft] | |
354 | +[log.phase|phase: draft] |
|
354 | +[log.phase|phase: draft] | |
355 | +[log.phase|phase: draft] |
|
355 | +[log.phase|phase: draft] | |
356 | +[log.phase|phase: draft] |
|
356 | +[log.phase|phase: draft] | |
357 | +[log.phase|phase: draft] |
|
357 | +[log.phase|phase: draft] | |
358 | +[log.phase|phase: draft] |
|
358 | +[log.phase|phase: draft] | |
359 | +[log.phase|phase: draft] |
|
359 | +[log.phase|phase: draft] | |
360 | +[log.phase|phase: draft] |
|
360 | +[log.phase|phase: draft] | |
361 | +[log.phase|phase: draft] |
|
361 | +[log.phase|phase: draft] | |
362 | +[log.phase|phase: draft] |
|
362 | +[log.phase|phase: draft] | |
363 |
|
363 | |||
364 | $ hg --color=debug -q log > log.out |
|
364 | $ hg --color=debug -q log > log.out | |
365 | $ hg --color=debug -q log --style default > style.out |
|
365 | $ hg --color=debug -q log --style default > style.out | |
366 | $ cmp log.out style.out || diff -u log.out style.out |
|
366 | $ cmp log.out style.out || diff -u log.out style.out | |
367 | $ hg --color=debug -q log -T phases > phases.out |
|
367 | $ hg --color=debug -q log -T phases > phases.out | |
368 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
368 | $ cmp log.out phases.out || diff -u log.out phases.out | |
369 |
|
369 | |||
370 | $ hg --color=debug --debug log > log.out |
|
370 | $ hg --color=debug --debug log > log.out | |
371 | $ hg --color=debug --debug log --style default > style.out |
|
371 | $ hg --color=debug --debug log --style default > style.out | |
372 | $ cmp log.out style.out || diff -u log.out style.out |
|
372 | $ cmp log.out style.out || diff -u log.out style.out | |
373 | $ hg --color=debug --debug log -T phases > phases.out |
|
373 | $ hg --color=debug --debug log -T phases > phases.out | |
374 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
374 | $ cmp log.out phases.out || diff -u log.out phases.out | |
375 |
|
375 | |||
376 | $ mv $HGRCPATH-bak $HGRCPATH |
|
376 | $ mv $HGRCPATH-bak $HGRCPATH | |
377 |
|
377 | |||
378 | Remove commit with empty commit message, so as to not pollute further |
|
378 | Remove commit with empty commit message, so as to not pollute further | |
379 | tests. |
|
379 | tests. | |
380 |
|
380 | |||
381 | $ hg --config extensions.strip= strip -q . |
|
381 | $ hg --config extensions.strip= strip -q . | |
382 |
|
382 | |||
383 | Revision with no copies (used to print a traceback): |
|
383 | Revision with no copies (used to print a traceback): | |
384 |
|
384 | |||
385 | $ hg tip -v --template '\n' |
|
385 | $ hg tip -v --template '\n' | |
386 |
|
386 | |||
387 |
|
387 | |||
388 | Compact style works: |
|
388 | Compact style works: | |
389 |
|
389 | |||
390 | $ hg log -Tcompact |
|
390 | $ hg log -Tcompact | |
391 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
391 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
392 | third |
|
392 | third | |
393 |
|
393 | |||
394 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user |
|
394 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user | |
395 | second |
|
395 | second | |
396 |
|
396 | |||
397 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
397 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
398 | merge |
|
398 | merge | |
399 |
|
399 | |||
400 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
400 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
401 | new head |
|
401 | new head | |
402 |
|
402 | |||
403 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
403 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
404 | new branch |
|
404 | new branch | |
405 |
|
405 | |||
406 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
406 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
407 | no user, no domain |
|
407 | no user, no domain | |
408 |
|
408 | |||
409 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other |
|
409 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other | |
410 | no person |
|
410 | no person | |
411 |
|
411 | |||
412 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other |
|
412 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other | |
413 | other 1 |
|
413 | other 1 | |
414 |
|
414 | |||
415 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user |
|
415 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user | |
416 | line 1 |
|
416 | line 1 | |
417 |
|
417 | |||
418 |
|
418 | |||
419 | $ hg log -v --style compact |
|
419 | $ hg log -v --style compact | |
420 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
420 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
421 | third |
|
421 | third | |
422 |
|
422 | |||
423 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
423 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
424 | second |
|
424 | second | |
425 |
|
425 | |||
426 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
426 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
427 | merge |
|
427 | merge | |
428 |
|
428 | |||
429 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
429 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
430 | new head |
|
430 | new head | |
431 |
|
431 | |||
432 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
432 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
433 | new branch |
|
433 | new branch | |
434 |
|
434 | |||
435 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
435 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
436 | no user, no domain |
|
436 | no user, no domain | |
437 |
|
437 | |||
438 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
438 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
439 | no person |
|
439 | no person | |
440 |
|
440 | |||
441 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
441 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
442 | other 1 |
|
442 | other 1 | |
443 | other 2 |
|
443 | other 2 | |
444 |
|
444 | |||
445 | other 3 |
|
445 | other 3 | |
446 |
|
446 | |||
447 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
447 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
448 | line 1 |
|
448 | line 1 | |
449 | line 2 |
|
449 | line 2 | |
450 |
|
450 | |||
451 |
|
451 | |||
452 | $ hg log --debug --style compact |
|
452 | $ hg log --debug --style compact | |
453 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test |
|
453 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test | |
454 | third |
|
454 | third | |
455 |
|
455 | |||
456 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
456 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
457 | second |
|
457 | second | |
458 |
|
458 | |||
459 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
459 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
460 | merge |
|
460 | merge | |
461 |
|
461 | |||
462 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
462 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person | |
463 | new head |
|
463 | new head | |
464 |
|
464 | |||
465 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
465 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person | |
466 | new branch |
|
466 | new branch | |
467 |
|
467 | |||
468 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
468 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
469 | no user, no domain |
|
469 | no user, no domain | |
470 |
|
470 | |||
471 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
471 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
472 | no person |
|
472 | no person | |
473 |
|
473 | |||
474 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
474 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
475 | other 1 |
|
475 | other 1 | |
476 | other 2 |
|
476 | other 2 | |
477 |
|
477 | |||
478 | other 3 |
|
478 | other 3 | |
479 |
|
479 | |||
480 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
480 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
481 | line 1 |
|
481 | line 1 | |
482 | line 2 |
|
482 | line 2 | |
483 |
|
483 | |||
484 |
|
484 | |||
485 | Test xml styles: |
|
485 | Test xml styles: | |
486 |
|
486 | |||
487 | $ hg log --style xml -r 'not all()' |
|
487 | $ hg log --style xml -r 'not all()' | |
488 | <?xml version="1.0"?> |
|
488 | <?xml version="1.0"?> | |
489 | <log> |
|
489 | <log> | |
490 | </log> |
|
490 | </log> | |
491 |
|
491 | |||
492 | $ hg log --style xml |
|
492 | $ hg log --style xml | |
493 | <?xml version="1.0"?> |
|
493 | <?xml version="1.0"?> | |
494 | <log> |
|
494 | <log> | |
495 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
495 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
496 | <tag>tip</tag> |
|
496 | <tag>tip</tag> | |
497 | <author email="test">test</author> |
|
497 | <author email="test">test</author> | |
498 | <date>2020-01-01T10:01:00+00:00</date> |
|
498 | <date>2020-01-01T10:01:00+00:00</date> | |
499 | <msg xml:space="preserve">third</msg> |
|
499 | <msg xml:space="preserve">third</msg> | |
500 | </logentry> |
|
500 | </logentry> | |
501 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
501 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
502 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
502 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
503 | <author email="user@hostname">User Name</author> |
|
503 | <author email="user@hostname">User Name</author> | |
504 | <date>1970-01-12T13:46:40+00:00</date> |
|
504 | <date>1970-01-12T13:46:40+00:00</date> | |
505 | <msg xml:space="preserve">second</msg> |
|
505 | <msg xml:space="preserve">second</msg> | |
506 | </logentry> |
|
506 | </logentry> | |
507 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
507 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
508 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
508 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
509 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
509 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
510 | <author email="person">person</author> |
|
510 | <author email="person">person</author> | |
511 | <date>1970-01-18T08:40:01+00:00</date> |
|
511 | <date>1970-01-18T08:40:01+00:00</date> | |
512 | <msg xml:space="preserve">merge</msg> |
|
512 | <msg xml:space="preserve">merge</msg> | |
513 | </logentry> |
|
513 | </logentry> | |
514 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
514 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
515 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
515 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
516 | <author email="person">person</author> |
|
516 | <author email="person">person</author> | |
517 | <date>1970-01-18T08:40:00+00:00</date> |
|
517 | <date>1970-01-18T08:40:00+00:00</date> | |
518 | <msg xml:space="preserve">new head</msg> |
|
518 | <msg xml:space="preserve">new head</msg> | |
519 | </logentry> |
|
519 | </logentry> | |
520 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
520 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
521 | <branch>foo</branch> |
|
521 | <branch>foo</branch> | |
522 | <author email="person">person</author> |
|
522 | <author email="person">person</author> | |
523 | <date>1970-01-17T04:53:20+00:00</date> |
|
523 | <date>1970-01-17T04:53:20+00:00</date> | |
524 | <msg xml:space="preserve">new branch</msg> |
|
524 | <msg xml:space="preserve">new branch</msg> | |
525 | </logentry> |
|
525 | </logentry> | |
526 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
526 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
527 | <author email="person">person</author> |
|
527 | <author email="person">person</author> | |
528 | <date>1970-01-16T01:06:40+00:00</date> |
|
528 | <date>1970-01-16T01:06:40+00:00</date> | |
529 | <msg xml:space="preserve">no user, no domain</msg> |
|
529 | <msg xml:space="preserve">no user, no domain</msg> | |
530 | </logentry> |
|
530 | </logentry> | |
531 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
531 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
532 | <author email="other@place">other</author> |
|
532 | <author email="other@place">other</author> | |
533 | <date>1970-01-14T21:20:00+00:00</date> |
|
533 | <date>1970-01-14T21:20:00+00:00</date> | |
534 | <msg xml:space="preserve">no person</msg> |
|
534 | <msg xml:space="preserve">no person</msg> | |
535 | </logentry> |
|
535 | </logentry> | |
536 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
536 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
537 | <author email="other@place">A. N. Other</author> |
|
537 | <author email="other@place">A. N. Other</author> | |
538 | <date>1970-01-13T17:33:20+00:00</date> |
|
538 | <date>1970-01-13T17:33:20+00:00</date> | |
539 | <msg xml:space="preserve">other 1 |
|
539 | <msg xml:space="preserve">other 1 | |
540 | other 2 |
|
540 | other 2 | |
541 |
|
541 | |||
542 | other 3</msg> |
|
542 | other 3</msg> | |
543 | </logentry> |
|
543 | </logentry> | |
544 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
544 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
545 | <author email="user@hostname">User Name</author> |
|
545 | <author email="user@hostname">User Name</author> | |
546 | <date>1970-01-12T13:46:40+00:00</date> |
|
546 | <date>1970-01-12T13:46:40+00:00</date> | |
547 | <msg xml:space="preserve">line 1 |
|
547 | <msg xml:space="preserve">line 1 | |
548 | line 2</msg> |
|
548 | line 2</msg> | |
549 | </logentry> |
|
549 | </logentry> | |
550 | </log> |
|
550 | </log> | |
551 |
|
551 | |||
552 | $ hg log -v --style xml |
|
552 | $ hg log -v --style xml | |
553 | <?xml version="1.0"?> |
|
553 | <?xml version="1.0"?> | |
554 | <log> |
|
554 | <log> | |
555 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
555 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
556 | <tag>tip</tag> |
|
556 | <tag>tip</tag> | |
557 | <author email="test">test</author> |
|
557 | <author email="test">test</author> | |
558 | <date>2020-01-01T10:01:00+00:00</date> |
|
558 | <date>2020-01-01T10:01:00+00:00</date> | |
559 | <msg xml:space="preserve">third</msg> |
|
559 | <msg xml:space="preserve">third</msg> | |
560 | <paths> |
|
560 | <paths> | |
561 | <path action="A">fourth</path> |
|
561 | <path action="A">fourth</path> | |
562 | <path action="A">third</path> |
|
562 | <path action="A">third</path> | |
563 | <path action="R">second</path> |
|
563 | <path action="R">second</path> | |
564 | </paths> |
|
564 | </paths> | |
565 | <copies> |
|
565 | <copies> | |
566 | <copy source="second">fourth</copy> |
|
566 | <copy source="second">fourth</copy> | |
567 | </copies> |
|
567 | </copies> | |
568 | </logentry> |
|
568 | </logentry> | |
569 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
569 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
570 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
570 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
571 | <author email="user@hostname">User Name</author> |
|
571 | <author email="user@hostname">User Name</author> | |
572 | <date>1970-01-12T13:46:40+00:00</date> |
|
572 | <date>1970-01-12T13:46:40+00:00</date> | |
573 | <msg xml:space="preserve">second</msg> |
|
573 | <msg xml:space="preserve">second</msg> | |
574 | <paths> |
|
574 | <paths> | |
575 | <path action="A">second</path> |
|
575 | <path action="A">second</path> | |
576 | </paths> |
|
576 | </paths> | |
577 | </logentry> |
|
577 | </logentry> | |
578 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
578 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
579 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
579 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
580 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
580 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
581 | <author email="person">person</author> |
|
581 | <author email="person">person</author> | |
582 | <date>1970-01-18T08:40:01+00:00</date> |
|
582 | <date>1970-01-18T08:40:01+00:00</date> | |
583 | <msg xml:space="preserve">merge</msg> |
|
583 | <msg xml:space="preserve">merge</msg> | |
584 | <paths> |
|
584 | <paths> | |
585 | </paths> |
|
585 | </paths> | |
586 | </logentry> |
|
586 | </logentry> | |
587 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
587 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
588 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
588 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
589 | <author email="person">person</author> |
|
589 | <author email="person">person</author> | |
590 | <date>1970-01-18T08:40:00+00:00</date> |
|
590 | <date>1970-01-18T08:40:00+00:00</date> | |
591 | <msg xml:space="preserve">new head</msg> |
|
591 | <msg xml:space="preserve">new head</msg> | |
592 | <paths> |
|
592 | <paths> | |
593 | <path action="A">d</path> |
|
593 | <path action="A">d</path> | |
594 | </paths> |
|
594 | </paths> | |
595 | </logentry> |
|
595 | </logentry> | |
596 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
596 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
597 | <branch>foo</branch> |
|
597 | <branch>foo</branch> | |
598 | <author email="person">person</author> |
|
598 | <author email="person">person</author> | |
599 | <date>1970-01-17T04:53:20+00:00</date> |
|
599 | <date>1970-01-17T04:53:20+00:00</date> | |
600 | <msg xml:space="preserve">new branch</msg> |
|
600 | <msg xml:space="preserve">new branch</msg> | |
601 | <paths> |
|
601 | <paths> | |
602 | </paths> |
|
602 | </paths> | |
603 | </logentry> |
|
603 | </logentry> | |
604 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
604 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
605 | <author email="person">person</author> |
|
605 | <author email="person">person</author> | |
606 | <date>1970-01-16T01:06:40+00:00</date> |
|
606 | <date>1970-01-16T01:06:40+00:00</date> | |
607 | <msg xml:space="preserve">no user, no domain</msg> |
|
607 | <msg xml:space="preserve">no user, no domain</msg> | |
608 | <paths> |
|
608 | <paths> | |
609 | <path action="M">c</path> |
|
609 | <path action="M">c</path> | |
610 | </paths> |
|
610 | </paths> | |
611 | </logentry> |
|
611 | </logentry> | |
612 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
612 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
613 | <author email="other@place">other</author> |
|
613 | <author email="other@place">other</author> | |
614 | <date>1970-01-14T21:20:00+00:00</date> |
|
614 | <date>1970-01-14T21:20:00+00:00</date> | |
615 | <msg xml:space="preserve">no person</msg> |
|
615 | <msg xml:space="preserve">no person</msg> | |
616 | <paths> |
|
616 | <paths> | |
617 | <path action="A">c</path> |
|
617 | <path action="A">c</path> | |
618 | </paths> |
|
618 | </paths> | |
619 | </logentry> |
|
619 | </logentry> | |
620 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
620 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
621 | <author email="other@place">A. N. Other</author> |
|
621 | <author email="other@place">A. N. Other</author> | |
622 | <date>1970-01-13T17:33:20+00:00</date> |
|
622 | <date>1970-01-13T17:33:20+00:00</date> | |
623 | <msg xml:space="preserve">other 1 |
|
623 | <msg xml:space="preserve">other 1 | |
624 | other 2 |
|
624 | other 2 | |
625 |
|
625 | |||
626 | other 3</msg> |
|
626 | other 3</msg> | |
627 | <paths> |
|
627 | <paths> | |
628 | <path action="A">b</path> |
|
628 | <path action="A">b</path> | |
629 | </paths> |
|
629 | </paths> | |
630 | </logentry> |
|
630 | </logentry> | |
631 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
631 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
632 | <author email="user@hostname">User Name</author> |
|
632 | <author email="user@hostname">User Name</author> | |
633 | <date>1970-01-12T13:46:40+00:00</date> |
|
633 | <date>1970-01-12T13:46:40+00:00</date> | |
634 | <msg xml:space="preserve">line 1 |
|
634 | <msg xml:space="preserve">line 1 | |
635 | line 2</msg> |
|
635 | line 2</msg> | |
636 | <paths> |
|
636 | <paths> | |
637 | <path action="A">a</path> |
|
637 | <path action="A">a</path> | |
638 | </paths> |
|
638 | </paths> | |
639 | </logentry> |
|
639 | </logentry> | |
640 | </log> |
|
640 | </log> | |
641 |
|
641 | |||
642 | $ hg log --debug --style xml |
|
642 | $ hg log --debug --style xml | |
643 | <?xml version="1.0"?> |
|
643 | <?xml version="1.0"?> | |
644 | <log> |
|
644 | <log> | |
645 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
645 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
646 | <tag>tip</tag> |
|
646 | <tag>tip</tag> | |
647 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> |
|
647 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> | |
648 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
648 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
649 | <author email="test">test</author> |
|
649 | <author email="test">test</author> | |
650 | <date>2020-01-01T10:01:00+00:00</date> |
|
650 | <date>2020-01-01T10:01:00+00:00</date> | |
651 | <msg xml:space="preserve">third</msg> |
|
651 | <msg xml:space="preserve">third</msg> | |
652 | <paths> |
|
652 | <paths> | |
653 | <path action="A">fourth</path> |
|
653 | <path action="A">fourth</path> | |
654 | <path action="A">third</path> |
|
654 | <path action="A">third</path> | |
655 | <path action="R">second</path> |
|
655 | <path action="R">second</path> | |
656 | </paths> |
|
656 | </paths> | |
657 | <copies> |
|
657 | <copies> | |
658 | <copy source="second">fourth</copy> |
|
658 | <copy source="second">fourth</copy> | |
659 | </copies> |
|
659 | </copies> | |
660 | <extra key="branch">default</extra> |
|
660 | <extra key="branch">default</extra> | |
661 | </logentry> |
|
661 | </logentry> | |
662 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
662 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
663 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
663 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
664 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
664 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
665 | <author email="user@hostname">User Name</author> |
|
665 | <author email="user@hostname">User Name</author> | |
666 | <date>1970-01-12T13:46:40+00:00</date> |
|
666 | <date>1970-01-12T13:46:40+00:00</date> | |
667 | <msg xml:space="preserve">second</msg> |
|
667 | <msg xml:space="preserve">second</msg> | |
668 | <paths> |
|
668 | <paths> | |
669 | <path action="A">second</path> |
|
669 | <path action="A">second</path> | |
670 | </paths> |
|
670 | </paths> | |
671 | <extra key="branch">default</extra> |
|
671 | <extra key="branch">default</extra> | |
672 | </logentry> |
|
672 | </logentry> | |
673 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
673 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
674 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
674 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
675 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
675 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
676 | <author email="person">person</author> |
|
676 | <author email="person">person</author> | |
677 | <date>1970-01-18T08:40:01+00:00</date> |
|
677 | <date>1970-01-18T08:40:01+00:00</date> | |
678 | <msg xml:space="preserve">merge</msg> |
|
678 | <msg xml:space="preserve">merge</msg> | |
679 | <paths> |
|
679 | <paths> | |
680 | </paths> |
|
680 | </paths> | |
681 | <extra key="branch">default</extra> |
|
681 | <extra key="branch">default</extra> | |
682 | </logentry> |
|
682 | </logentry> | |
683 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
683 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
684 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
684 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
685 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
685 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
686 | <author email="person">person</author> |
|
686 | <author email="person">person</author> | |
687 | <date>1970-01-18T08:40:00+00:00</date> |
|
687 | <date>1970-01-18T08:40:00+00:00</date> | |
688 | <msg xml:space="preserve">new head</msg> |
|
688 | <msg xml:space="preserve">new head</msg> | |
689 | <paths> |
|
689 | <paths> | |
690 | <path action="A">d</path> |
|
690 | <path action="A">d</path> | |
691 | </paths> |
|
691 | </paths> | |
692 | <extra key="branch">default</extra> |
|
692 | <extra key="branch">default</extra> | |
693 | </logentry> |
|
693 | </logentry> | |
694 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
694 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
695 | <branch>foo</branch> |
|
695 | <branch>foo</branch> | |
696 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
696 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
697 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
697 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
698 | <author email="person">person</author> |
|
698 | <author email="person">person</author> | |
699 | <date>1970-01-17T04:53:20+00:00</date> |
|
699 | <date>1970-01-17T04:53:20+00:00</date> | |
700 | <msg xml:space="preserve">new branch</msg> |
|
700 | <msg xml:space="preserve">new branch</msg> | |
701 | <paths> |
|
701 | <paths> | |
702 | </paths> |
|
702 | </paths> | |
703 | <extra key="branch">foo</extra> |
|
703 | <extra key="branch">foo</extra> | |
704 | </logentry> |
|
704 | </logentry> | |
705 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
705 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
706 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> |
|
706 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> | |
707 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
707 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
708 | <author email="person">person</author> |
|
708 | <author email="person">person</author> | |
709 | <date>1970-01-16T01:06:40+00:00</date> |
|
709 | <date>1970-01-16T01:06:40+00:00</date> | |
710 | <msg xml:space="preserve">no user, no domain</msg> |
|
710 | <msg xml:space="preserve">no user, no domain</msg> | |
711 | <paths> |
|
711 | <paths> | |
712 | <path action="M">c</path> |
|
712 | <path action="M">c</path> | |
713 | </paths> |
|
713 | </paths> | |
714 | <extra key="branch">default</extra> |
|
714 | <extra key="branch">default</extra> | |
715 | </logentry> |
|
715 | </logentry> | |
716 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
716 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
717 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> |
|
717 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> | |
718 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
718 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
719 | <author email="other@place">other</author> |
|
719 | <author email="other@place">other</author> | |
720 | <date>1970-01-14T21:20:00+00:00</date> |
|
720 | <date>1970-01-14T21:20:00+00:00</date> | |
721 | <msg xml:space="preserve">no person</msg> |
|
721 | <msg xml:space="preserve">no person</msg> | |
722 | <paths> |
|
722 | <paths> | |
723 | <path action="A">c</path> |
|
723 | <path action="A">c</path> | |
724 | </paths> |
|
724 | </paths> | |
725 | <extra key="branch">default</extra> |
|
725 | <extra key="branch">default</extra> | |
726 | </logentry> |
|
726 | </logentry> | |
727 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
727 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
728 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> |
|
728 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> | |
729 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
729 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
730 | <author email="other@place">A. N. Other</author> |
|
730 | <author email="other@place">A. N. Other</author> | |
731 | <date>1970-01-13T17:33:20+00:00</date> |
|
731 | <date>1970-01-13T17:33:20+00:00</date> | |
732 | <msg xml:space="preserve">other 1 |
|
732 | <msg xml:space="preserve">other 1 | |
733 | other 2 |
|
733 | other 2 | |
734 |
|
734 | |||
735 | other 3</msg> |
|
735 | other 3</msg> | |
736 | <paths> |
|
736 | <paths> | |
737 | <path action="A">b</path> |
|
737 | <path action="A">b</path> | |
738 | </paths> |
|
738 | </paths> | |
739 | <extra key="branch">default</extra> |
|
739 | <extra key="branch">default</extra> | |
740 | </logentry> |
|
740 | </logentry> | |
741 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
741 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
742 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
742 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
743 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
743 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
744 | <author email="user@hostname">User Name</author> |
|
744 | <author email="user@hostname">User Name</author> | |
745 | <date>1970-01-12T13:46:40+00:00</date> |
|
745 | <date>1970-01-12T13:46:40+00:00</date> | |
746 | <msg xml:space="preserve">line 1 |
|
746 | <msg xml:space="preserve">line 1 | |
747 | line 2</msg> |
|
747 | line 2</msg> | |
748 | <paths> |
|
748 | <paths> | |
749 | <path action="A">a</path> |
|
749 | <path action="A">a</path> | |
750 | </paths> |
|
750 | </paths> | |
751 | <extra key="branch">default</extra> |
|
751 | <extra key="branch">default</extra> | |
752 | </logentry> |
|
752 | </logentry> | |
753 | </log> |
|
753 | </log> | |
754 |
|
754 | |||
755 |
|
755 | |||
756 | Test JSON style: |
|
756 | Test JSON style: | |
757 |
|
757 | |||
758 | $ hg log -k nosuch -Tjson |
|
758 | $ hg log -k nosuch -Tjson | |
759 | [] |
|
759 | [] | |
760 |
|
760 | |||
761 | $ hg log -qr . -Tjson |
|
761 | $ hg log -qr . -Tjson | |
762 | [ |
|
762 | [ | |
763 | { |
|
763 | { | |
764 | "rev": 8, |
|
764 | "rev": 8, | |
765 | "node": "95c24699272ef57d062b8bccc32c878bf841784a" |
|
765 | "node": "95c24699272ef57d062b8bccc32c878bf841784a" | |
766 | } |
|
766 | } | |
767 | ] |
|
767 | ] | |
768 |
|
768 | |||
769 | $ hg log -vpr . -Tjson --stat |
|
769 | $ hg log -vpr . -Tjson --stat | |
770 | [ |
|
770 | [ | |
771 | { |
|
771 | { | |
772 | "rev": 8, |
|
772 | "rev": 8, | |
773 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
773 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
774 | "branch": "default", |
|
774 | "branch": "default", | |
775 | "phase": "draft", |
|
775 | "phase": "draft", | |
776 | "user": "test", |
|
776 | "user": "test", | |
777 | "date": [1577872860, 0], |
|
777 | "date": [1577872860, 0], | |
778 | "desc": "third", |
|
778 | "desc": "third", | |
779 | "bookmarks": [], |
|
779 | "bookmarks": [], | |
780 | "tags": ["tip"], |
|
780 | "tags": ["tip"], | |
781 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
781 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
782 | "files": ["fourth", "second", "third"], |
|
782 | "files": ["fourth", "second", "third"], | |
783 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", |
|
783 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", | |
784 | "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n" |
|
784 | "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n" | |
785 | } |
|
785 | } | |
786 | ] |
|
786 | ] | |
787 |
|
787 | |||
788 | honor --git but not format-breaking diffopts |
|
788 | honor --git but not format-breaking diffopts | |
789 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson |
|
789 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson | |
790 | [ |
|
790 | [ | |
791 | { |
|
791 | { | |
792 | "rev": 8, |
|
792 | "rev": 8, | |
793 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
793 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
794 | "branch": "default", |
|
794 | "branch": "default", | |
795 | "phase": "draft", |
|
795 | "phase": "draft", | |
796 | "user": "test", |
|
796 | "user": "test", | |
797 | "date": [1577872860, 0], |
|
797 | "date": [1577872860, 0], | |
798 | "desc": "third", |
|
798 | "desc": "third", | |
799 | "bookmarks": [], |
|
799 | "bookmarks": [], | |
800 | "tags": ["tip"], |
|
800 | "tags": ["tip"], | |
801 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
801 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
802 | "files": ["fourth", "second", "third"], |
|
802 | "files": ["fourth", "second", "third"], | |
803 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n" |
|
803 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n" | |
804 | } |
|
804 | } | |
805 | ] |
|
805 | ] | |
806 |
|
806 | |||
807 | $ hg log -T json |
|
807 | $ hg log -T json | |
808 | [ |
|
808 | [ | |
809 | { |
|
809 | { | |
810 | "rev": 8, |
|
810 | "rev": 8, | |
811 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
811 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
812 | "branch": "default", |
|
812 | "branch": "default", | |
813 | "phase": "draft", |
|
813 | "phase": "draft", | |
814 | "user": "test", |
|
814 | "user": "test", | |
815 | "date": [1577872860, 0], |
|
815 | "date": [1577872860, 0], | |
816 | "desc": "third", |
|
816 | "desc": "third", | |
817 | "bookmarks": [], |
|
817 | "bookmarks": [], | |
818 | "tags": ["tip"], |
|
818 | "tags": ["tip"], | |
819 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"] |
|
819 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"] | |
820 | }, |
|
820 | }, | |
821 | { |
|
821 | { | |
822 | "rev": 7, |
|
822 | "rev": 7, | |
823 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
823 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
824 | "branch": "default", |
|
824 | "branch": "default", | |
825 | "phase": "draft", |
|
825 | "phase": "draft", | |
826 | "user": "User Name <user@hostname>", |
|
826 | "user": "User Name <user@hostname>", | |
827 | "date": [1000000, 0], |
|
827 | "date": [1000000, 0], | |
828 | "desc": "second", |
|
828 | "desc": "second", | |
829 | "bookmarks": [], |
|
829 | "bookmarks": [], | |
830 | "tags": [], |
|
830 | "tags": [], | |
831 | "parents": ["0000000000000000000000000000000000000000"] |
|
831 | "parents": ["0000000000000000000000000000000000000000"] | |
832 | }, |
|
832 | }, | |
833 | { |
|
833 | { | |
834 | "rev": 6, |
|
834 | "rev": 6, | |
835 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
835 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
836 | "branch": "default", |
|
836 | "branch": "default", | |
837 | "phase": "draft", |
|
837 | "phase": "draft", | |
838 | "user": "person", |
|
838 | "user": "person", | |
839 | "date": [1500001, 0], |
|
839 | "date": [1500001, 0], | |
840 | "desc": "merge", |
|
840 | "desc": "merge", | |
841 | "bookmarks": [], |
|
841 | "bookmarks": [], | |
842 | "tags": [], |
|
842 | "tags": [], | |
843 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"] |
|
843 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"] | |
844 | }, |
|
844 | }, | |
845 | { |
|
845 | { | |
846 | "rev": 5, |
|
846 | "rev": 5, | |
847 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
847 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
848 | "branch": "default", |
|
848 | "branch": "default", | |
849 | "phase": "draft", |
|
849 | "phase": "draft", | |
850 | "user": "person", |
|
850 | "user": "person", | |
851 | "date": [1500000, 0], |
|
851 | "date": [1500000, 0], | |
852 | "desc": "new head", |
|
852 | "desc": "new head", | |
853 | "bookmarks": [], |
|
853 | "bookmarks": [], | |
854 | "tags": [], |
|
854 | "tags": [], | |
855 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] |
|
855 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] | |
856 | }, |
|
856 | }, | |
857 | { |
|
857 | { | |
858 | "rev": 4, |
|
858 | "rev": 4, | |
859 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
859 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
860 | "branch": "foo", |
|
860 | "branch": "foo", | |
861 | "phase": "draft", |
|
861 | "phase": "draft", | |
862 | "user": "person", |
|
862 | "user": "person", | |
863 | "date": [1400000, 0], |
|
863 | "date": [1400000, 0], | |
864 | "desc": "new branch", |
|
864 | "desc": "new branch", | |
865 | "bookmarks": [], |
|
865 | "bookmarks": [], | |
866 | "tags": [], |
|
866 | "tags": [], | |
867 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] |
|
867 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] | |
868 | }, |
|
868 | }, | |
869 | { |
|
869 | { | |
870 | "rev": 3, |
|
870 | "rev": 3, | |
871 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
871 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
872 | "branch": "default", |
|
872 | "branch": "default", | |
873 | "phase": "draft", |
|
873 | "phase": "draft", | |
874 | "user": "person", |
|
874 | "user": "person", | |
875 | "date": [1300000, 0], |
|
875 | "date": [1300000, 0], | |
876 | "desc": "no user, no domain", |
|
876 | "desc": "no user, no domain", | |
877 | "bookmarks": [], |
|
877 | "bookmarks": [], | |
878 | "tags": [], |
|
878 | "tags": [], | |
879 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"] |
|
879 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"] | |
880 | }, |
|
880 | }, | |
881 | { |
|
881 | { | |
882 | "rev": 2, |
|
882 | "rev": 2, | |
883 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
883 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
884 | "branch": "default", |
|
884 | "branch": "default", | |
885 | "phase": "draft", |
|
885 | "phase": "draft", | |
886 | "user": "other@place", |
|
886 | "user": "other@place", | |
887 | "date": [1200000, 0], |
|
887 | "date": [1200000, 0], | |
888 | "desc": "no person", |
|
888 | "desc": "no person", | |
889 | "bookmarks": [], |
|
889 | "bookmarks": [], | |
890 | "tags": [], |
|
890 | "tags": [], | |
891 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"] |
|
891 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"] | |
892 | }, |
|
892 | }, | |
893 | { |
|
893 | { | |
894 | "rev": 1, |
|
894 | "rev": 1, | |
895 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
895 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
896 | "branch": "default", |
|
896 | "branch": "default", | |
897 | "phase": "draft", |
|
897 | "phase": "draft", | |
898 | "user": "A. N. Other <other@place>", |
|
898 | "user": "A. N. Other <other@place>", | |
899 | "date": [1100000, 0], |
|
899 | "date": [1100000, 0], | |
900 | "desc": "other 1\nother 2\n\nother 3", |
|
900 | "desc": "other 1\nother 2\n\nother 3", | |
901 | "bookmarks": [], |
|
901 | "bookmarks": [], | |
902 | "tags": [], |
|
902 | "tags": [], | |
903 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"] |
|
903 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"] | |
904 | }, |
|
904 | }, | |
905 | { |
|
905 | { | |
906 | "rev": 0, |
|
906 | "rev": 0, | |
907 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
907 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
908 | "branch": "default", |
|
908 | "branch": "default", | |
909 | "phase": "draft", |
|
909 | "phase": "draft", | |
910 | "user": "User Name <user@hostname>", |
|
910 | "user": "User Name <user@hostname>", | |
911 | "date": [1000000, 0], |
|
911 | "date": [1000000, 0], | |
912 | "desc": "line 1\nline 2", |
|
912 | "desc": "line 1\nline 2", | |
913 | "bookmarks": [], |
|
913 | "bookmarks": [], | |
914 | "tags": [], |
|
914 | "tags": [], | |
915 | "parents": ["0000000000000000000000000000000000000000"] |
|
915 | "parents": ["0000000000000000000000000000000000000000"] | |
916 | } |
|
916 | } | |
917 | ] |
|
917 | ] | |
918 |
|
918 | |||
919 | $ hg heads -v -Tjson |
|
919 | $ hg heads -v -Tjson | |
920 | [ |
|
920 | [ | |
921 | { |
|
921 | { | |
922 | "rev": 8, |
|
922 | "rev": 8, | |
923 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
923 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
924 | "branch": "default", |
|
924 | "branch": "default", | |
925 | "phase": "draft", |
|
925 | "phase": "draft", | |
926 | "user": "test", |
|
926 | "user": "test", | |
927 | "date": [1577872860, 0], |
|
927 | "date": [1577872860, 0], | |
928 | "desc": "third", |
|
928 | "desc": "third", | |
929 | "bookmarks": [], |
|
929 | "bookmarks": [], | |
930 | "tags": ["tip"], |
|
930 | "tags": ["tip"], | |
931 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
931 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
932 | "files": ["fourth", "second", "third"] |
|
932 | "files": ["fourth", "second", "third"] | |
933 | }, |
|
933 | }, | |
934 | { |
|
934 | { | |
935 | "rev": 6, |
|
935 | "rev": 6, | |
936 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
936 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
937 | "branch": "default", |
|
937 | "branch": "default", | |
938 | "phase": "draft", |
|
938 | "phase": "draft", | |
939 | "user": "person", |
|
939 | "user": "person", | |
940 | "date": [1500001, 0], |
|
940 | "date": [1500001, 0], | |
941 | "desc": "merge", |
|
941 | "desc": "merge", | |
942 | "bookmarks": [], |
|
942 | "bookmarks": [], | |
943 | "tags": [], |
|
943 | "tags": [], | |
944 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
944 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
945 | "files": [] |
|
945 | "files": [] | |
946 | }, |
|
946 | }, | |
947 | { |
|
947 | { | |
948 | "rev": 4, |
|
948 | "rev": 4, | |
949 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
949 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
950 | "branch": "foo", |
|
950 | "branch": "foo", | |
951 | "phase": "draft", |
|
951 | "phase": "draft", | |
952 | "user": "person", |
|
952 | "user": "person", | |
953 | "date": [1400000, 0], |
|
953 | "date": [1400000, 0], | |
954 | "desc": "new branch", |
|
954 | "desc": "new branch", | |
955 | "bookmarks": [], |
|
955 | "bookmarks": [], | |
956 | "tags": [], |
|
956 | "tags": [], | |
957 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
957 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
958 | "files": [] |
|
958 | "files": [] | |
959 | } |
|
959 | } | |
960 | ] |
|
960 | ] | |
961 |
|
961 | |||
962 | $ hg log --debug -Tjson |
|
962 | $ hg log --debug -Tjson | |
963 | [ |
|
963 | [ | |
964 | { |
|
964 | { | |
965 | "rev": 8, |
|
965 | "rev": 8, | |
966 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
966 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
967 | "branch": "default", |
|
967 | "branch": "default", | |
968 | "phase": "draft", |
|
968 | "phase": "draft", | |
969 | "user": "test", |
|
969 | "user": "test", | |
970 | "date": [1577872860, 0], |
|
970 | "date": [1577872860, 0], | |
971 | "desc": "third", |
|
971 | "desc": "third", | |
972 | "bookmarks": [], |
|
972 | "bookmarks": [], | |
973 | "tags": ["tip"], |
|
973 | "tags": ["tip"], | |
974 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
974 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
975 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", |
|
975 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", | |
976 | "extra": {"branch": "default"}, |
|
976 | "extra": {"branch": "default"}, | |
977 | "modified": [], |
|
977 | "modified": [], | |
978 | "added": ["fourth", "third"], |
|
978 | "added": ["fourth", "third"], | |
979 | "removed": ["second"] |
|
979 | "removed": ["second"] | |
980 | }, |
|
980 | }, | |
981 | { |
|
981 | { | |
982 | "rev": 7, |
|
982 | "rev": 7, | |
983 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
983 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
984 | "branch": "default", |
|
984 | "branch": "default", | |
985 | "phase": "draft", |
|
985 | "phase": "draft", | |
986 | "user": "User Name <user@hostname>", |
|
986 | "user": "User Name <user@hostname>", | |
987 | "date": [1000000, 0], |
|
987 | "date": [1000000, 0], | |
988 | "desc": "second", |
|
988 | "desc": "second", | |
989 | "bookmarks": [], |
|
989 | "bookmarks": [], | |
990 | "tags": [], |
|
990 | "tags": [], | |
991 | "parents": ["0000000000000000000000000000000000000000"], |
|
991 | "parents": ["0000000000000000000000000000000000000000"], | |
992 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", |
|
992 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", | |
993 | "extra": {"branch": "default"}, |
|
993 | "extra": {"branch": "default"}, | |
994 | "modified": [], |
|
994 | "modified": [], | |
995 | "added": ["second"], |
|
995 | "added": ["second"], | |
996 | "removed": [] |
|
996 | "removed": [] | |
997 | }, |
|
997 | }, | |
998 | { |
|
998 | { | |
999 | "rev": 6, |
|
999 | "rev": 6, | |
1000 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
1000 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
1001 | "branch": "default", |
|
1001 | "branch": "default", | |
1002 | "phase": "draft", |
|
1002 | "phase": "draft", | |
1003 | "user": "person", |
|
1003 | "user": "person", | |
1004 | "date": [1500001, 0], |
|
1004 | "date": [1500001, 0], | |
1005 | "desc": "merge", |
|
1005 | "desc": "merge", | |
1006 | "bookmarks": [], |
|
1006 | "bookmarks": [], | |
1007 | "tags": [], |
|
1007 | "tags": [], | |
1008 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
1008 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
1009 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1009 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1010 | "extra": {"branch": "default"}, |
|
1010 | "extra": {"branch": "default"}, | |
1011 | "modified": [], |
|
1011 | "modified": [], | |
1012 | "added": [], |
|
1012 | "added": [], | |
1013 | "removed": [] |
|
1013 | "removed": [] | |
1014 | }, |
|
1014 | }, | |
1015 | { |
|
1015 | { | |
1016 | "rev": 5, |
|
1016 | "rev": 5, | |
1017 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
1017 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
1018 | "branch": "default", |
|
1018 | "branch": "default", | |
1019 | "phase": "draft", |
|
1019 | "phase": "draft", | |
1020 | "user": "person", |
|
1020 | "user": "person", | |
1021 | "date": [1500000, 0], |
|
1021 | "date": [1500000, 0], | |
1022 | "desc": "new head", |
|
1022 | "desc": "new head", | |
1023 | "bookmarks": [], |
|
1023 | "bookmarks": [], | |
1024 | "tags": [], |
|
1024 | "tags": [], | |
1025 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1025 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1026 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1026 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1027 | "extra": {"branch": "default"}, |
|
1027 | "extra": {"branch": "default"}, | |
1028 | "modified": [], |
|
1028 | "modified": [], | |
1029 | "added": ["d"], |
|
1029 | "added": ["d"], | |
1030 | "removed": [] |
|
1030 | "removed": [] | |
1031 | }, |
|
1031 | }, | |
1032 | { |
|
1032 | { | |
1033 | "rev": 4, |
|
1033 | "rev": 4, | |
1034 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
1034 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
1035 | "branch": "foo", |
|
1035 | "branch": "foo", | |
1036 | "phase": "draft", |
|
1036 | "phase": "draft", | |
1037 | "user": "person", |
|
1037 | "user": "person", | |
1038 | "date": [1400000, 0], |
|
1038 | "date": [1400000, 0], | |
1039 | "desc": "new branch", |
|
1039 | "desc": "new branch", | |
1040 | "bookmarks": [], |
|
1040 | "bookmarks": [], | |
1041 | "tags": [], |
|
1041 | "tags": [], | |
1042 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1042 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1043 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1043 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1044 | "extra": {"branch": "foo"}, |
|
1044 | "extra": {"branch": "foo"}, | |
1045 | "modified": [], |
|
1045 | "modified": [], | |
1046 | "added": [], |
|
1046 | "added": [], | |
1047 | "removed": [] |
|
1047 | "removed": [] | |
1048 | }, |
|
1048 | }, | |
1049 | { |
|
1049 | { | |
1050 | "rev": 3, |
|
1050 | "rev": 3, | |
1051 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
1051 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
1052 | "branch": "default", |
|
1052 | "branch": "default", | |
1053 | "phase": "draft", |
|
1053 | "phase": "draft", | |
1054 | "user": "person", |
|
1054 | "user": "person", | |
1055 | "date": [1300000, 0], |
|
1055 | "date": [1300000, 0], | |
1056 | "desc": "no user, no domain", |
|
1056 | "desc": "no user, no domain", | |
1057 | "bookmarks": [], |
|
1057 | "bookmarks": [], | |
1058 | "tags": [], |
|
1058 | "tags": [], | |
1059 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
1059 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], | |
1060 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1060 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1061 | "extra": {"branch": "default"}, |
|
1061 | "extra": {"branch": "default"}, | |
1062 | "modified": ["c"], |
|
1062 | "modified": ["c"], | |
1063 | "added": [], |
|
1063 | "added": [], | |
1064 | "removed": [] |
|
1064 | "removed": [] | |
1065 | }, |
|
1065 | }, | |
1066 | { |
|
1066 | { | |
1067 | "rev": 2, |
|
1067 | "rev": 2, | |
1068 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
1068 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
1069 | "branch": "default", |
|
1069 | "branch": "default", | |
1070 | "phase": "draft", |
|
1070 | "phase": "draft", | |
1071 | "user": "other@place", |
|
1071 | "user": "other@place", | |
1072 | "date": [1200000, 0], |
|
1072 | "date": [1200000, 0], | |
1073 | "desc": "no person", |
|
1073 | "desc": "no person", | |
1074 | "bookmarks": [], |
|
1074 | "bookmarks": [], | |
1075 | "tags": [], |
|
1075 | "tags": [], | |
1076 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
1076 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], | |
1077 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", |
|
1077 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", | |
1078 | "extra": {"branch": "default"}, |
|
1078 | "extra": {"branch": "default"}, | |
1079 | "modified": [], |
|
1079 | "modified": [], | |
1080 | "added": ["c"], |
|
1080 | "added": ["c"], | |
1081 | "removed": [] |
|
1081 | "removed": [] | |
1082 | }, |
|
1082 | }, | |
1083 | { |
|
1083 | { | |
1084 | "rev": 1, |
|
1084 | "rev": 1, | |
1085 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
1085 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
1086 | "branch": "default", |
|
1086 | "branch": "default", | |
1087 | "phase": "draft", |
|
1087 | "phase": "draft", | |
1088 | "user": "A. N. Other <other@place>", |
|
1088 | "user": "A. N. Other <other@place>", | |
1089 | "date": [1100000, 0], |
|
1089 | "date": [1100000, 0], | |
1090 | "desc": "other 1\nother 2\n\nother 3", |
|
1090 | "desc": "other 1\nother 2\n\nother 3", | |
1091 | "bookmarks": [], |
|
1091 | "bookmarks": [], | |
1092 | "tags": [], |
|
1092 | "tags": [], | |
1093 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
1093 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], | |
1094 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", |
|
1094 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", | |
1095 | "extra": {"branch": "default"}, |
|
1095 | "extra": {"branch": "default"}, | |
1096 | "modified": [], |
|
1096 | "modified": [], | |
1097 | "added": ["b"], |
|
1097 | "added": ["b"], | |
1098 | "removed": [] |
|
1098 | "removed": [] | |
1099 | }, |
|
1099 | }, | |
1100 | { |
|
1100 | { | |
1101 | "rev": 0, |
|
1101 | "rev": 0, | |
1102 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
1102 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
1103 | "branch": "default", |
|
1103 | "branch": "default", | |
1104 | "phase": "draft", |
|
1104 | "phase": "draft", | |
1105 | "user": "User Name <user@hostname>", |
|
1105 | "user": "User Name <user@hostname>", | |
1106 | "date": [1000000, 0], |
|
1106 | "date": [1000000, 0], | |
1107 | "desc": "line 1\nline 2", |
|
1107 | "desc": "line 1\nline 2", | |
1108 | "bookmarks": [], |
|
1108 | "bookmarks": [], | |
1109 | "tags": [], |
|
1109 | "tags": [], | |
1110 | "parents": ["0000000000000000000000000000000000000000"], |
|
1110 | "parents": ["0000000000000000000000000000000000000000"], | |
1111 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", |
|
1111 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", | |
1112 | "extra": {"branch": "default"}, |
|
1112 | "extra": {"branch": "default"}, | |
1113 | "modified": [], |
|
1113 | "modified": [], | |
1114 | "added": ["a"], |
|
1114 | "added": ["a"], | |
1115 | "removed": [] |
|
1115 | "removed": [] | |
1116 | } |
|
1116 | } | |
1117 | ] |
|
1117 | ] | |
1118 |
|
1118 | |||
1119 | Error if style not readable: |
|
1119 | Error if style not readable: | |
1120 |
|
1120 | |||
1121 | #if unix-permissions no-root |
|
1121 | #if unix-permissions no-root | |
1122 | $ touch q |
|
1122 | $ touch q | |
1123 | $ chmod 0 q |
|
1123 | $ chmod 0 q | |
1124 | $ hg log --style ./q |
|
1124 | $ hg log --style ./q | |
1125 | abort: Permission denied: ./q |
|
1125 | abort: Permission denied: ./q | |
1126 | [255] |
|
1126 | [255] | |
1127 | #endif |
|
1127 | #endif | |
1128 |
|
1128 | |||
1129 | Error if no style: |
|
1129 | Error if no style: | |
1130 |
|
1130 | |||
1131 | $ hg log --style notexist |
|
1131 | $ hg log --style notexist | |
1132 | abort: style 'notexist' not found |
|
1132 | abort: style 'notexist' not found | |
1133 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
1133 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
1134 | [255] |
|
1134 | [255] | |
1135 |
|
1135 | |||
1136 | $ hg log -T list |
|
1136 | $ hg log -T list | |
1137 | available styles: bisect, changelog, compact, default, phases, show, status, xml |
|
1137 | available styles: bisect, changelog, compact, default, phases, show, status, xml | |
1138 | abort: specify a template |
|
1138 | abort: specify a template | |
1139 | [255] |
|
1139 | [255] | |
1140 |
|
1140 | |||
1141 | Error if style missing key: |
|
1141 | Error if style missing key: | |
1142 |
|
1142 | |||
1143 | $ echo 'q = q' > t |
|
1143 | $ echo 'q = q' > t | |
1144 | $ hg log --style ./t |
|
1144 | $ hg log --style ./t | |
1145 | abort: "changeset" not in template map |
|
1145 | abort: "changeset" not in template map | |
1146 | [255] |
|
1146 | [255] | |
1147 |
|
1147 | |||
1148 | Error if style missing value: |
|
1148 | Error if style missing value: | |
1149 |
|
1149 | |||
1150 | $ echo 'changeset =' > t |
|
1150 | $ echo 'changeset =' > t | |
1151 | $ hg log --style t |
|
1151 | $ hg log --style t | |
1152 | hg: parse error at t:1: missing value |
|
1152 | hg: parse error at t:1: missing value | |
1153 | [255] |
|
1153 | [255] | |
1154 |
|
1154 | |||
1155 | Error if include fails: |
|
1155 | Error if include fails: | |
1156 |
|
1156 | |||
1157 | $ echo 'changeset = q' >> t |
|
1157 | $ echo 'changeset = q' >> t | |
1158 | #if unix-permissions no-root |
|
1158 | #if unix-permissions no-root | |
1159 | $ hg log --style ./t |
|
1159 | $ hg log --style ./t | |
1160 | abort: template file ./q: Permission denied |
|
1160 | abort: template file ./q: Permission denied | |
1161 | [255] |
|
1161 | [255] | |
1162 | $ rm -f q |
|
1162 | $ rm -f q | |
1163 | #endif |
|
1163 | #endif | |
1164 |
|
1164 | |||
1165 | Include works: |
|
1165 | Include works: | |
1166 |
|
1166 | |||
1167 | $ echo '{rev}' > q |
|
1167 | $ echo '{rev}' > q | |
1168 | $ hg log --style ./t |
|
1168 | $ hg log --style ./t | |
1169 | 8 |
|
1169 | 8 | |
1170 | 7 |
|
1170 | 7 | |
1171 | 6 |
|
1171 | 6 | |
1172 | 5 |
|
1172 | 5 | |
1173 | 4 |
|
1173 | 4 | |
1174 | 3 |
|
1174 | 3 | |
1175 | 2 |
|
1175 | 2 | |
1176 | 1 |
|
1176 | 1 | |
1177 | 0 |
|
1177 | 0 | |
1178 |
|
1178 | |||
1179 | Check that recursive reference does not fall into RuntimeError (issue4758): |
|
1179 | Check that recursive reference does not fall into RuntimeError (issue4758): | |
1180 |
|
1180 | |||
1181 | common mistake: |
|
1181 | common mistake: | |
1182 |
|
1182 | |||
1183 | $ hg log -T '{changeset}\n' |
|
1183 | $ hg log -T '{changeset}\n' | |
1184 | abort: recursive reference 'changeset' in template |
|
1184 | abort: recursive reference 'changeset' in template | |
1185 | [255] |
|
1185 | [255] | |
1186 |
|
1186 | |||
1187 | circular reference: |
|
1187 | circular reference: | |
1188 |
|
1188 | |||
1189 | $ cat << EOF > issue4758 |
|
1189 | $ cat << EOF > issue4758 | |
1190 | > changeset = '{foo}' |
|
1190 | > changeset = '{foo}' | |
1191 | > foo = '{changeset}' |
|
1191 | > foo = '{changeset}' | |
1192 | > EOF |
|
1192 | > EOF | |
1193 | $ hg log --style ./issue4758 |
|
1193 | $ hg log --style ./issue4758 | |
1194 | abort: recursive reference 'foo' in template |
|
1194 | abort: recursive reference 'foo' in template | |
1195 | [255] |
|
1195 | [255] | |
1196 |
|
1196 | |||
1197 | buildmap() -> gettemplate(), where no thunk was made: |
|
1197 | buildmap() -> gettemplate(), where no thunk was made: | |
1198 |
|
1198 | |||
1199 | $ hg log -T '{files % changeset}\n' |
|
1199 | $ hg log -T '{files % changeset}\n' | |
1200 | abort: recursive reference 'changeset' in template |
|
1200 | abort: recursive reference 'changeset' in template | |
1201 | [255] |
|
1201 | [255] | |
1202 |
|
1202 | |||
1203 | not a recursion if a keyword of the same name exists: |
|
1203 | not a recursion if a keyword of the same name exists: | |
1204 |
|
1204 | |||
1205 | $ cat << EOF > issue4758 |
|
1205 | $ cat << EOF > issue4758 | |
1206 | > changeset = '{tags % rev}' |
|
1206 | > changeset = '{tags % rev}' | |
1207 | > rev = '{rev} {tag}\n' |
|
1207 | > rev = '{rev} {tag}\n' | |
1208 | > EOF |
|
1208 | > EOF | |
1209 | $ hg log --style ./issue4758 -r tip |
|
1209 | $ hg log --style ./issue4758 -r tip | |
1210 | 8 tip |
|
1210 | 8 tip | |
1211 |
|
1211 | |||
1212 | Check that {phase} works correctly on parents: |
|
1212 | Check that {phase} works correctly on parents: | |
1213 |
|
1213 | |||
1214 | $ cat << EOF > parentphase |
|
1214 | $ cat << EOF > parentphase | |
1215 | > changeset_debug = '{rev} ({phase}):{parents}\n' |
|
1215 | > changeset_debug = '{rev} ({phase}):{parents}\n' | |
1216 | > parent = ' {rev} ({phase})' |
|
1216 | > parent = ' {rev} ({phase})' | |
1217 | > EOF |
|
1217 | > EOF | |
1218 | $ hg phase -r 5 --public |
|
1218 | $ hg phase -r 5 --public | |
1219 | $ hg phase -r 7 --secret --force |
|
1219 | $ hg phase -r 7 --secret --force | |
1220 | $ hg log --debug -G --style ./parentphase |
|
1220 | $ hg log --debug -G --style ./parentphase | |
1221 | @ 8 (secret): 7 (secret) -1 (public) |
|
1221 | @ 8 (secret): 7 (secret) -1 (public) | |
1222 | | |
|
1222 | | | |
1223 | o 7 (secret): -1 (public) -1 (public) |
|
1223 | o 7 (secret): -1 (public) -1 (public) | |
1224 |
|
1224 | |||
1225 | o 6 (draft): 5 (public) 4 (draft) |
|
1225 | o 6 (draft): 5 (public) 4 (draft) | |
1226 | |\ |
|
1226 | |\ | |
1227 | | o 5 (public): 3 (public) -1 (public) |
|
1227 | | o 5 (public): 3 (public) -1 (public) | |
1228 | | | |
|
1228 | | | | |
1229 | o | 4 (draft): 3 (public) -1 (public) |
|
1229 | o | 4 (draft): 3 (public) -1 (public) | |
1230 | |/ |
|
1230 | |/ | |
1231 | o 3 (public): 2 (public) -1 (public) |
|
1231 | o 3 (public): 2 (public) -1 (public) | |
1232 | | |
|
1232 | | | |
1233 | o 2 (public): 1 (public) -1 (public) |
|
1233 | o 2 (public): 1 (public) -1 (public) | |
1234 | | |
|
1234 | | | |
1235 | o 1 (public): 0 (public) -1 (public) |
|
1235 | o 1 (public): 0 (public) -1 (public) | |
1236 | | |
|
1236 | | | |
1237 | o 0 (public): -1 (public) -1 (public) |
|
1237 | o 0 (public): -1 (public) -1 (public) | |
1238 |
|
1238 | |||
1239 |
|
1239 | |||
1240 | Missing non-standard names give no error (backward compatibility): |
|
1240 | Missing non-standard names give no error (backward compatibility): | |
1241 |
|
1241 | |||
1242 | $ echo "changeset = '{c}'" > t |
|
1242 | $ echo "changeset = '{c}'" > t | |
1243 | $ hg log --style ./t |
|
1243 | $ hg log --style ./t | |
1244 |
|
1244 | |||
1245 | Defining non-standard name works: |
|
1245 | Defining non-standard name works: | |
1246 |
|
1246 | |||
1247 | $ cat <<EOF > t |
|
1247 | $ cat <<EOF > t | |
1248 | > changeset = '{c}' |
|
1248 | > changeset = '{c}' | |
1249 | > c = q |
|
1249 | > c = q | |
1250 | > EOF |
|
1250 | > EOF | |
1251 | $ hg log --style ./t |
|
1251 | $ hg log --style ./t | |
1252 | 8 |
|
1252 | 8 | |
1253 | 7 |
|
1253 | 7 | |
1254 | 6 |
|
1254 | 6 | |
1255 | 5 |
|
1255 | 5 | |
1256 | 4 |
|
1256 | 4 | |
1257 | 3 |
|
1257 | 3 | |
1258 | 2 |
|
1258 | 2 | |
1259 | 1 |
|
1259 | 1 | |
1260 | 0 |
|
1260 | 0 | |
1261 |
|
1261 | |||
1262 | ui.style works: |
|
1262 | ui.style works: | |
1263 |
|
1263 | |||
1264 | $ echo '[ui]' > .hg/hgrc |
|
1264 | $ echo '[ui]' > .hg/hgrc | |
1265 | $ echo 'style = t' >> .hg/hgrc |
|
1265 | $ echo 'style = t' >> .hg/hgrc | |
1266 | $ hg log |
|
1266 | $ hg log | |
1267 | 8 |
|
1267 | 8 | |
1268 | 7 |
|
1268 | 7 | |
1269 | 6 |
|
1269 | 6 | |
1270 | 5 |
|
1270 | 5 | |
1271 | 4 |
|
1271 | 4 | |
1272 | 3 |
|
1272 | 3 | |
1273 | 2 |
|
1273 | 2 | |
1274 | 1 |
|
1274 | 1 | |
1275 | 0 |
|
1275 | 0 | |
1276 |
|
1276 | |||
1277 |
|
1277 | |||
1278 | Issue338: |
|
1278 | Issue338: | |
1279 |
|
1279 | |||
1280 | $ hg log --style=changelog > changelog |
|
1280 | $ hg log --style=changelog > changelog | |
1281 |
|
1281 | |||
1282 | $ cat changelog |
|
1282 | $ cat changelog | |
1283 | 2020-01-01 test <test> |
|
1283 | 2020-01-01 test <test> | |
1284 |
|
1284 | |||
1285 | * fourth, second, third: |
|
1285 | * fourth, second, third: | |
1286 | third |
|
1286 | third | |
1287 | [95c24699272e] [tip] |
|
1287 | [95c24699272e] [tip] | |
1288 |
|
1288 | |||
1289 | 1970-01-12 User Name <user@hostname> |
|
1289 | 1970-01-12 User Name <user@hostname> | |
1290 |
|
1290 | |||
1291 | * second: |
|
1291 | * second: | |
1292 | second |
|
1292 | second | |
1293 | [29114dbae42b] |
|
1293 | [29114dbae42b] | |
1294 |
|
1294 | |||
1295 | 1970-01-18 person <person> |
|
1295 | 1970-01-18 person <person> | |
1296 |
|
1296 | |||
1297 | * merge |
|
1297 | * merge | |
1298 | [d41e714fe50d] |
|
1298 | [d41e714fe50d] | |
1299 |
|
1299 | |||
1300 | * d: |
|
1300 | * d: | |
1301 | new head |
|
1301 | new head | |
1302 | [13207e5a10d9] |
|
1302 | [13207e5a10d9] | |
1303 |
|
1303 | |||
1304 | 1970-01-17 person <person> |
|
1304 | 1970-01-17 person <person> | |
1305 |
|
1305 | |||
1306 | * new branch |
|
1306 | * new branch | |
1307 | [bbe44766e73d] <foo> |
|
1307 | [bbe44766e73d] <foo> | |
1308 |
|
1308 | |||
1309 | 1970-01-16 person <person> |
|
1309 | 1970-01-16 person <person> | |
1310 |
|
1310 | |||
1311 | * c: |
|
1311 | * c: | |
1312 | no user, no domain |
|
1312 | no user, no domain | |
1313 | [10e46f2dcbf4] |
|
1313 | [10e46f2dcbf4] | |
1314 |
|
1314 | |||
1315 | 1970-01-14 other <other@place> |
|
1315 | 1970-01-14 other <other@place> | |
1316 |
|
1316 | |||
1317 | * c: |
|
1317 | * c: | |
1318 | no person |
|
1318 | no person | |
1319 | [97054abb4ab8] |
|
1319 | [97054abb4ab8] | |
1320 |
|
1320 | |||
1321 | 1970-01-13 A. N. Other <other@place> |
|
1321 | 1970-01-13 A. N. Other <other@place> | |
1322 |
|
1322 | |||
1323 | * b: |
|
1323 | * b: | |
1324 | other 1 other 2 |
|
1324 | other 1 other 2 | |
1325 |
|
1325 | |||
1326 | other 3 |
|
1326 | other 3 | |
1327 | [b608e9d1a3f0] |
|
1327 | [b608e9d1a3f0] | |
1328 |
|
1328 | |||
1329 | 1970-01-12 User Name <user@hostname> |
|
1329 | 1970-01-12 User Name <user@hostname> | |
1330 |
|
1330 | |||
1331 | * a: |
|
1331 | * a: | |
1332 | line 1 line 2 |
|
1332 | line 1 line 2 | |
1333 | [1e4e1b8f71e0] |
|
1333 | [1e4e1b8f71e0] | |
1334 |
|
1334 | |||
1335 |
|
1335 | |||
1336 | Issue2130: xml output for 'hg heads' is malformed |
|
1336 | Issue2130: xml output for 'hg heads' is malformed | |
1337 |
|
1337 | |||
1338 | $ hg heads --style changelog |
|
1338 | $ hg heads --style changelog | |
1339 | 2020-01-01 test <test> |
|
1339 | 2020-01-01 test <test> | |
1340 |
|
1340 | |||
1341 | * fourth, second, third: |
|
1341 | * fourth, second, third: | |
1342 | third |
|
1342 | third | |
1343 | [95c24699272e] [tip] |
|
1343 | [95c24699272e] [tip] | |
1344 |
|
1344 | |||
1345 | 1970-01-18 person <person> |
|
1345 | 1970-01-18 person <person> | |
1346 |
|
1346 | |||
1347 | * merge |
|
1347 | * merge | |
1348 | [d41e714fe50d] |
|
1348 | [d41e714fe50d] | |
1349 |
|
1349 | |||
1350 | 1970-01-17 person <person> |
|
1350 | 1970-01-17 person <person> | |
1351 |
|
1351 | |||
1352 | * new branch |
|
1352 | * new branch | |
1353 | [bbe44766e73d] <foo> |
|
1353 | [bbe44766e73d] <foo> | |
1354 |
|
1354 | |||
1355 |
|
1355 | |||
1356 | Keys work: |
|
1356 | Keys work: | |
1357 |
|
1357 | |||
1358 | $ for key in author branch branches date desc file_adds file_dels file_mods \ |
|
1358 | $ for key in author branch branches date desc file_adds file_dels file_mods \ | |
1359 | > file_copies file_copies_switch files \ |
|
1359 | > file_copies file_copies_switch files \ | |
1360 | > manifest node parents rev tags diffstat extras \ |
|
1360 | > manifest node parents rev tags diffstat extras \ | |
1361 | > p1rev p2rev p1node p2node; do |
|
1361 | > p1rev p2rev p1node p2node; do | |
1362 | > for mode in '' --verbose --debug; do |
|
1362 | > for mode in '' --verbose --debug; do | |
1363 | > hg log $mode --template "$key$mode: {$key}\n" |
|
1363 | > hg log $mode --template "$key$mode: {$key}\n" | |
1364 | > done |
|
1364 | > done | |
1365 | > done |
|
1365 | > done | |
1366 | author: test |
|
1366 | author: test | |
1367 | author: User Name <user@hostname> |
|
1367 | author: User Name <user@hostname> | |
1368 | author: person |
|
1368 | author: person | |
1369 | author: person |
|
1369 | author: person | |
1370 | author: person |
|
1370 | author: person | |
1371 | author: person |
|
1371 | author: person | |
1372 | author: other@place |
|
1372 | author: other@place | |
1373 | author: A. N. Other <other@place> |
|
1373 | author: A. N. Other <other@place> | |
1374 | author: User Name <user@hostname> |
|
1374 | author: User Name <user@hostname> | |
1375 | author--verbose: test |
|
1375 | author--verbose: test | |
1376 | author--verbose: User Name <user@hostname> |
|
1376 | author--verbose: User Name <user@hostname> | |
1377 | author--verbose: person |
|
1377 | author--verbose: person | |
1378 | author--verbose: person |
|
1378 | author--verbose: person | |
1379 | author--verbose: person |
|
1379 | author--verbose: person | |
1380 | author--verbose: person |
|
1380 | author--verbose: person | |
1381 | author--verbose: other@place |
|
1381 | author--verbose: other@place | |
1382 | author--verbose: A. N. Other <other@place> |
|
1382 | author--verbose: A. N. Other <other@place> | |
1383 | author--verbose: User Name <user@hostname> |
|
1383 | author--verbose: User Name <user@hostname> | |
1384 | author--debug: test |
|
1384 | author--debug: test | |
1385 | author--debug: User Name <user@hostname> |
|
1385 | author--debug: User Name <user@hostname> | |
1386 | author--debug: person |
|
1386 | author--debug: person | |
1387 | author--debug: person |
|
1387 | author--debug: person | |
1388 | author--debug: person |
|
1388 | author--debug: person | |
1389 | author--debug: person |
|
1389 | author--debug: person | |
1390 | author--debug: other@place |
|
1390 | author--debug: other@place | |
1391 | author--debug: A. N. Other <other@place> |
|
1391 | author--debug: A. N. Other <other@place> | |
1392 | author--debug: User Name <user@hostname> |
|
1392 | author--debug: User Name <user@hostname> | |
1393 | branch: default |
|
1393 | branch: default | |
1394 | branch: default |
|
1394 | branch: default | |
1395 | branch: default |
|
1395 | branch: default | |
1396 | branch: default |
|
1396 | branch: default | |
1397 | branch: foo |
|
1397 | branch: foo | |
1398 | branch: default |
|
1398 | branch: default | |
1399 | branch: default |
|
1399 | branch: default | |
1400 | branch: default |
|
1400 | branch: default | |
1401 | branch: default |
|
1401 | branch: default | |
1402 | branch--verbose: default |
|
1402 | branch--verbose: default | |
1403 | branch--verbose: default |
|
1403 | branch--verbose: default | |
1404 | branch--verbose: default |
|
1404 | branch--verbose: default | |
1405 | branch--verbose: default |
|
1405 | branch--verbose: default | |
1406 | branch--verbose: foo |
|
1406 | branch--verbose: foo | |
1407 | branch--verbose: default |
|
1407 | branch--verbose: default | |
1408 | branch--verbose: default |
|
1408 | branch--verbose: default | |
1409 | branch--verbose: default |
|
1409 | branch--verbose: default | |
1410 | branch--verbose: default |
|
1410 | branch--verbose: default | |
1411 | branch--debug: default |
|
1411 | branch--debug: default | |
1412 | branch--debug: default |
|
1412 | branch--debug: default | |
1413 | branch--debug: default |
|
1413 | branch--debug: default | |
1414 | branch--debug: default |
|
1414 | branch--debug: default | |
1415 | branch--debug: foo |
|
1415 | branch--debug: foo | |
1416 | branch--debug: default |
|
1416 | branch--debug: default | |
1417 | branch--debug: default |
|
1417 | branch--debug: default | |
1418 | branch--debug: default |
|
1418 | branch--debug: default | |
1419 | branch--debug: default |
|
1419 | branch--debug: default | |
1420 | branches: |
|
1420 | branches: | |
1421 | branches: |
|
1421 | branches: | |
1422 | branches: |
|
1422 | branches: | |
1423 | branches: |
|
1423 | branches: | |
1424 | branches: foo |
|
1424 | branches: foo | |
1425 | branches: |
|
1425 | branches: | |
1426 | branches: |
|
1426 | branches: | |
1427 | branches: |
|
1427 | branches: | |
1428 | branches: |
|
1428 | branches: | |
1429 | branches--verbose: |
|
1429 | branches--verbose: | |
1430 | branches--verbose: |
|
1430 | branches--verbose: | |
1431 | branches--verbose: |
|
1431 | branches--verbose: | |
1432 | branches--verbose: |
|
1432 | branches--verbose: | |
1433 | branches--verbose: foo |
|
1433 | branches--verbose: foo | |
1434 | branches--verbose: |
|
1434 | branches--verbose: | |
1435 | branches--verbose: |
|
1435 | branches--verbose: | |
1436 | branches--verbose: |
|
1436 | branches--verbose: | |
1437 | branches--verbose: |
|
1437 | branches--verbose: | |
1438 | branches--debug: |
|
1438 | branches--debug: | |
1439 | branches--debug: |
|
1439 | branches--debug: | |
1440 | branches--debug: |
|
1440 | branches--debug: | |
1441 | branches--debug: |
|
1441 | branches--debug: | |
1442 | branches--debug: foo |
|
1442 | branches--debug: foo | |
1443 | branches--debug: |
|
1443 | branches--debug: | |
1444 | branches--debug: |
|
1444 | branches--debug: | |
1445 | branches--debug: |
|
1445 | branches--debug: | |
1446 | branches--debug: |
|
1446 | branches--debug: | |
1447 | date: 1577872860.00 |
|
1447 | date: 1577872860.00 | |
1448 | date: 1000000.00 |
|
1448 | date: 1000000.00 | |
1449 | date: 1500001.00 |
|
1449 | date: 1500001.00 | |
1450 | date: 1500000.00 |
|
1450 | date: 1500000.00 | |
1451 | date: 1400000.00 |
|
1451 | date: 1400000.00 | |
1452 | date: 1300000.00 |
|
1452 | date: 1300000.00 | |
1453 | date: 1200000.00 |
|
1453 | date: 1200000.00 | |
1454 | date: 1100000.00 |
|
1454 | date: 1100000.00 | |
1455 | date: 1000000.00 |
|
1455 | date: 1000000.00 | |
1456 | date--verbose: 1577872860.00 |
|
1456 | date--verbose: 1577872860.00 | |
1457 | date--verbose: 1000000.00 |
|
1457 | date--verbose: 1000000.00 | |
1458 | date--verbose: 1500001.00 |
|
1458 | date--verbose: 1500001.00 | |
1459 | date--verbose: 1500000.00 |
|
1459 | date--verbose: 1500000.00 | |
1460 | date--verbose: 1400000.00 |
|
1460 | date--verbose: 1400000.00 | |
1461 | date--verbose: 1300000.00 |
|
1461 | date--verbose: 1300000.00 | |
1462 | date--verbose: 1200000.00 |
|
1462 | date--verbose: 1200000.00 | |
1463 | date--verbose: 1100000.00 |
|
1463 | date--verbose: 1100000.00 | |
1464 | date--verbose: 1000000.00 |
|
1464 | date--verbose: 1000000.00 | |
1465 | date--debug: 1577872860.00 |
|
1465 | date--debug: 1577872860.00 | |
1466 | date--debug: 1000000.00 |
|
1466 | date--debug: 1000000.00 | |
1467 | date--debug: 1500001.00 |
|
1467 | date--debug: 1500001.00 | |
1468 | date--debug: 1500000.00 |
|
1468 | date--debug: 1500000.00 | |
1469 | date--debug: 1400000.00 |
|
1469 | date--debug: 1400000.00 | |
1470 | date--debug: 1300000.00 |
|
1470 | date--debug: 1300000.00 | |
1471 | date--debug: 1200000.00 |
|
1471 | date--debug: 1200000.00 | |
1472 | date--debug: 1100000.00 |
|
1472 | date--debug: 1100000.00 | |
1473 | date--debug: 1000000.00 |
|
1473 | date--debug: 1000000.00 | |
1474 | desc: third |
|
1474 | desc: third | |
1475 | desc: second |
|
1475 | desc: second | |
1476 | desc: merge |
|
1476 | desc: merge | |
1477 | desc: new head |
|
1477 | desc: new head | |
1478 | desc: new branch |
|
1478 | desc: new branch | |
1479 | desc: no user, no domain |
|
1479 | desc: no user, no domain | |
1480 | desc: no person |
|
1480 | desc: no person | |
1481 | desc: other 1 |
|
1481 | desc: other 1 | |
1482 | other 2 |
|
1482 | other 2 | |
1483 |
|
1483 | |||
1484 | other 3 |
|
1484 | other 3 | |
1485 | desc: line 1 |
|
1485 | desc: line 1 | |
1486 | line 2 |
|
1486 | line 2 | |
1487 | desc--verbose: third |
|
1487 | desc--verbose: third | |
1488 | desc--verbose: second |
|
1488 | desc--verbose: second | |
1489 | desc--verbose: merge |
|
1489 | desc--verbose: merge | |
1490 | desc--verbose: new head |
|
1490 | desc--verbose: new head | |
1491 | desc--verbose: new branch |
|
1491 | desc--verbose: new branch | |
1492 | desc--verbose: no user, no domain |
|
1492 | desc--verbose: no user, no domain | |
1493 | desc--verbose: no person |
|
1493 | desc--verbose: no person | |
1494 | desc--verbose: other 1 |
|
1494 | desc--verbose: other 1 | |
1495 | other 2 |
|
1495 | other 2 | |
1496 |
|
1496 | |||
1497 | other 3 |
|
1497 | other 3 | |
1498 | desc--verbose: line 1 |
|
1498 | desc--verbose: line 1 | |
1499 | line 2 |
|
1499 | line 2 | |
1500 | desc--debug: third |
|
1500 | desc--debug: third | |
1501 | desc--debug: second |
|
1501 | desc--debug: second | |
1502 | desc--debug: merge |
|
1502 | desc--debug: merge | |
1503 | desc--debug: new head |
|
1503 | desc--debug: new head | |
1504 | desc--debug: new branch |
|
1504 | desc--debug: new branch | |
1505 | desc--debug: no user, no domain |
|
1505 | desc--debug: no user, no domain | |
1506 | desc--debug: no person |
|
1506 | desc--debug: no person | |
1507 | desc--debug: other 1 |
|
1507 | desc--debug: other 1 | |
1508 | other 2 |
|
1508 | other 2 | |
1509 |
|
1509 | |||
1510 | other 3 |
|
1510 | other 3 | |
1511 | desc--debug: line 1 |
|
1511 | desc--debug: line 1 | |
1512 | line 2 |
|
1512 | line 2 | |
1513 | file_adds: fourth third |
|
1513 | file_adds: fourth third | |
1514 | file_adds: second |
|
1514 | file_adds: second | |
1515 | file_adds: |
|
1515 | file_adds: | |
1516 | file_adds: d |
|
1516 | file_adds: d | |
1517 | file_adds: |
|
1517 | file_adds: | |
1518 | file_adds: |
|
1518 | file_adds: | |
1519 | file_adds: c |
|
1519 | file_adds: c | |
1520 | file_adds: b |
|
1520 | file_adds: b | |
1521 | file_adds: a |
|
1521 | file_adds: a | |
1522 | file_adds--verbose: fourth third |
|
1522 | file_adds--verbose: fourth third | |
1523 | file_adds--verbose: second |
|
1523 | file_adds--verbose: second | |
1524 | file_adds--verbose: |
|
1524 | file_adds--verbose: | |
1525 | file_adds--verbose: d |
|
1525 | file_adds--verbose: d | |
1526 | file_adds--verbose: |
|
1526 | file_adds--verbose: | |
1527 | file_adds--verbose: |
|
1527 | file_adds--verbose: | |
1528 | file_adds--verbose: c |
|
1528 | file_adds--verbose: c | |
1529 | file_adds--verbose: b |
|
1529 | file_adds--verbose: b | |
1530 | file_adds--verbose: a |
|
1530 | file_adds--verbose: a | |
1531 | file_adds--debug: fourth third |
|
1531 | file_adds--debug: fourth third | |
1532 | file_adds--debug: second |
|
1532 | file_adds--debug: second | |
1533 | file_adds--debug: |
|
1533 | file_adds--debug: | |
1534 | file_adds--debug: d |
|
1534 | file_adds--debug: d | |
1535 | file_adds--debug: |
|
1535 | file_adds--debug: | |
1536 | file_adds--debug: |
|
1536 | file_adds--debug: | |
1537 | file_adds--debug: c |
|
1537 | file_adds--debug: c | |
1538 | file_adds--debug: b |
|
1538 | file_adds--debug: b | |
1539 | file_adds--debug: a |
|
1539 | file_adds--debug: a | |
1540 | file_dels: second |
|
1540 | file_dels: second | |
1541 | file_dels: |
|
1541 | file_dels: | |
1542 | file_dels: |
|
1542 | file_dels: | |
1543 | file_dels: |
|
1543 | file_dels: | |
1544 | file_dels: |
|
1544 | file_dels: | |
1545 | file_dels: |
|
1545 | file_dels: | |
1546 | file_dels: |
|
1546 | file_dels: | |
1547 | file_dels: |
|
1547 | file_dels: | |
1548 | file_dels: |
|
1548 | file_dels: | |
1549 | file_dels--verbose: second |
|
1549 | file_dels--verbose: second | |
1550 | file_dels--verbose: |
|
1550 | file_dels--verbose: | |
1551 | file_dels--verbose: |
|
1551 | file_dels--verbose: | |
1552 | file_dels--verbose: |
|
1552 | file_dels--verbose: | |
1553 | file_dels--verbose: |
|
1553 | file_dels--verbose: | |
1554 | file_dels--verbose: |
|
1554 | file_dels--verbose: | |
1555 | file_dels--verbose: |
|
1555 | file_dels--verbose: | |
1556 | file_dels--verbose: |
|
1556 | file_dels--verbose: | |
1557 | file_dels--verbose: |
|
1557 | file_dels--verbose: | |
1558 | file_dels--debug: second |
|
1558 | file_dels--debug: second | |
1559 | file_dels--debug: |
|
1559 | file_dels--debug: | |
1560 | file_dels--debug: |
|
1560 | file_dels--debug: | |
1561 | file_dels--debug: |
|
1561 | file_dels--debug: | |
1562 | file_dels--debug: |
|
1562 | file_dels--debug: | |
1563 | file_dels--debug: |
|
1563 | file_dels--debug: | |
1564 | file_dels--debug: |
|
1564 | file_dels--debug: | |
1565 | file_dels--debug: |
|
1565 | file_dels--debug: | |
1566 | file_dels--debug: |
|
1566 | file_dels--debug: | |
1567 | file_mods: |
|
1567 | file_mods: | |
1568 | file_mods: |
|
1568 | file_mods: | |
1569 | file_mods: |
|
1569 | file_mods: | |
1570 | file_mods: |
|
1570 | file_mods: | |
1571 | file_mods: |
|
1571 | file_mods: | |
1572 | file_mods: c |
|
1572 | file_mods: c | |
1573 | file_mods: |
|
1573 | file_mods: | |
1574 | file_mods: |
|
1574 | file_mods: | |
1575 | file_mods: |
|
1575 | file_mods: | |
1576 | file_mods--verbose: |
|
1576 | file_mods--verbose: | |
1577 | file_mods--verbose: |
|
1577 | file_mods--verbose: | |
1578 | file_mods--verbose: |
|
1578 | file_mods--verbose: | |
1579 | file_mods--verbose: |
|
1579 | file_mods--verbose: | |
1580 | file_mods--verbose: |
|
1580 | file_mods--verbose: | |
1581 | file_mods--verbose: c |
|
1581 | file_mods--verbose: c | |
1582 | file_mods--verbose: |
|
1582 | file_mods--verbose: | |
1583 | file_mods--verbose: |
|
1583 | file_mods--verbose: | |
1584 | file_mods--verbose: |
|
1584 | file_mods--verbose: | |
1585 | file_mods--debug: |
|
1585 | file_mods--debug: | |
1586 | file_mods--debug: |
|
1586 | file_mods--debug: | |
1587 | file_mods--debug: |
|
1587 | file_mods--debug: | |
1588 | file_mods--debug: |
|
1588 | file_mods--debug: | |
1589 | file_mods--debug: |
|
1589 | file_mods--debug: | |
1590 | file_mods--debug: c |
|
1590 | file_mods--debug: c | |
1591 | file_mods--debug: |
|
1591 | file_mods--debug: | |
1592 | file_mods--debug: |
|
1592 | file_mods--debug: | |
1593 | file_mods--debug: |
|
1593 | file_mods--debug: | |
1594 | file_copies: fourth (second) |
|
1594 | file_copies: fourth (second) | |
1595 | file_copies: |
|
1595 | file_copies: | |
1596 | file_copies: |
|
1596 | file_copies: | |
1597 | file_copies: |
|
1597 | file_copies: | |
1598 | file_copies: |
|
1598 | file_copies: | |
1599 | file_copies: |
|
1599 | file_copies: | |
1600 | file_copies: |
|
1600 | file_copies: | |
1601 | file_copies: |
|
1601 | file_copies: | |
1602 | file_copies: |
|
1602 | file_copies: | |
1603 | file_copies--verbose: fourth (second) |
|
1603 | file_copies--verbose: fourth (second) | |
1604 | file_copies--verbose: |
|
1604 | file_copies--verbose: | |
1605 | file_copies--verbose: |
|
1605 | file_copies--verbose: | |
1606 | file_copies--verbose: |
|
1606 | file_copies--verbose: | |
1607 | file_copies--verbose: |
|
1607 | file_copies--verbose: | |
1608 | file_copies--verbose: |
|
1608 | file_copies--verbose: | |
1609 | file_copies--verbose: |
|
1609 | file_copies--verbose: | |
1610 | file_copies--verbose: |
|
1610 | file_copies--verbose: | |
1611 | file_copies--verbose: |
|
1611 | file_copies--verbose: | |
1612 | file_copies--debug: fourth (second) |
|
1612 | file_copies--debug: fourth (second) | |
1613 | file_copies--debug: |
|
1613 | file_copies--debug: | |
1614 | file_copies--debug: |
|
1614 | file_copies--debug: | |
1615 | file_copies--debug: |
|
1615 | file_copies--debug: | |
1616 | file_copies--debug: |
|
1616 | file_copies--debug: | |
1617 | file_copies--debug: |
|
1617 | file_copies--debug: | |
1618 | file_copies--debug: |
|
1618 | file_copies--debug: | |
1619 | file_copies--debug: |
|
1619 | file_copies--debug: | |
1620 | file_copies--debug: |
|
1620 | file_copies--debug: | |
1621 | file_copies_switch: |
|
1621 | file_copies_switch: | |
1622 | file_copies_switch: |
|
1622 | file_copies_switch: | |
1623 | file_copies_switch: |
|
1623 | file_copies_switch: | |
1624 | file_copies_switch: |
|
1624 | file_copies_switch: | |
1625 | file_copies_switch: |
|
1625 | file_copies_switch: | |
1626 | file_copies_switch: |
|
1626 | file_copies_switch: | |
1627 | file_copies_switch: |
|
1627 | file_copies_switch: | |
1628 | file_copies_switch: |
|
1628 | file_copies_switch: | |
1629 | file_copies_switch: |
|
1629 | file_copies_switch: | |
1630 | file_copies_switch--verbose: |
|
1630 | file_copies_switch--verbose: | |
1631 | file_copies_switch--verbose: |
|
1631 | file_copies_switch--verbose: | |
1632 | file_copies_switch--verbose: |
|
1632 | file_copies_switch--verbose: | |
1633 | file_copies_switch--verbose: |
|
1633 | file_copies_switch--verbose: | |
1634 | file_copies_switch--verbose: |
|
1634 | file_copies_switch--verbose: | |
1635 | file_copies_switch--verbose: |
|
1635 | file_copies_switch--verbose: | |
1636 | file_copies_switch--verbose: |
|
1636 | file_copies_switch--verbose: | |
1637 | file_copies_switch--verbose: |
|
1637 | file_copies_switch--verbose: | |
1638 | file_copies_switch--verbose: |
|
1638 | file_copies_switch--verbose: | |
1639 | file_copies_switch--debug: |
|
1639 | file_copies_switch--debug: | |
1640 | file_copies_switch--debug: |
|
1640 | file_copies_switch--debug: | |
1641 | file_copies_switch--debug: |
|
1641 | file_copies_switch--debug: | |
1642 | file_copies_switch--debug: |
|
1642 | file_copies_switch--debug: | |
1643 | file_copies_switch--debug: |
|
1643 | file_copies_switch--debug: | |
1644 | file_copies_switch--debug: |
|
1644 | file_copies_switch--debug: | |
1645 | file_copies_switch--debug: |
|
1645 | file_copies_switch--debug: | |
1646 | file_copies_switch--debug: |
|
1646 | file_copies_switch--debug: | |
1647 | file_copies_switch--debug: |
|
1647 | file_copies_switch--debug: | |
1648 | files: fourth second third |
|
1648 | files: fourth second third | |
1649 | files: second |
|
1649 | files: second | |
1650 | files: |
|
1650 | files: | |
1651 | files: d |
|
1651 | files: d | |
1652 | files: |
|
1652 | files: | |
1653 | files: c |
|
1653 | files: c | |
1654 | files: c |
|
1654 | files: c | |
1655 | files: b |
|
1655 | files: b | |
1656 | files: a |
|
1656 | files: a | |
1657 | files--verbose: fourth second third |
|
1657 | files--verbose: fourth second third | |
1658 | files--verbose: second |
|
1658 | files--verbose: second | |
1659 | files--verbose: |
|
1659 | files--verbose: | |
1660 | files--verbose: d |
|
1660 | files--verbose: d | |
1661 | files--verbose: |
|
1661 | files--verbose: | |
1662 | files--verbose: c |
|
1662 | files--verbose: c | |
1663 | files--verbose: c |
|
1663 | files--verbose: c | |
1664 | files--verbose: b |
|
1664 | files--verbose: b | |
1665 | files--verbose: a |
|
1665 | files--verbose: a | |
1666 | files--debug: fourth second third |
|
1666 | files--debug: fourth second third | |
1667 | files--debug: second |
|
1667 | files--debug: second | |
1668 | files--debug: |
|
1668 | files--debug: | |
1669 | files--debug: d |
|
1669 | files--debug: d | |
1670 | files--debug: |
|
1670 | files--debug: | |
1671 | files--debug: c |
|
1671 | files--debug: c | |
1672 | files--debug: c |
|
1672 | files--debug: c | |
1673 | files--debug: b |
|
1673 | files--debug: b | |
1674 | files--debug: a |
|
1674 | files--debug: a | |
1675 | manifest: 6:94961b75a2da |
|
1675 | manifest: 6:94961b75a2da | |
1676 | manifest: 5:f2dbc354b94e |
|
1676 | manifest: 5:f2dbc354b94e | |
1677 | manifest: 4:4dc3def4f9b4 |
|
1677 | manifest: 4:4dc3def4f9b4 | |
1678 | manifest: 4:4dc3def4f9b4 |
|
1678 | manifest: 4:4dc3def4f9b4 | |
1679 | manifest: 3:cb5a1327723b |
|
1679 | manifest: 3:cb5a1327723b | |
1680 | manifest: 3:cb5a1327723b |
|
1680 | manifest: 3:cb5a1327723b | |
1681 | manifest: 2:6e0e82995c35 |
|
1681 | manifest: 2:6e0e82995c35 | |
1682 | manifest: 1:4e8d705b1e53 |
|
1682 | manifest: 1:4e8d705b1e53 | |
1683 | manifest: 0:a0c8bcbbb45c |
|
1683 | manifest: 0:a0c8bcbbb45c | |
1684 | manifest--verbose: 6:94961b75a2da |
|
1684 | manifest--verbose: 6:94961b75a2da | |
1685 | manifest--verbose: 5:f2dbc354b94e |
|
1685 | manifest--verbose: 5:f2dbc354b94e | |
1686 | manifest--verbose: 4:4dc3def4f9b4 |
|
1686 | manifest--verbose: 4:4dc3def4f9b4 | |
1687 | manifest--verbose: 4:4dc3def4f9b4 |
|
1687 | manifest--verbose: 4:4dc3def4f9b4 | |
1688 | manifest--verbose: 3:cb5a1327723b |
|
1688 | manifest--verbose: 3:cb5a1327723b | |
1689 | manifest--verbose: 3:cb5a1327723b |
|
1689 | manifest--verbose: 3:cb5a1327723b | |
1690 | manifest--verbose: 2:6e0e82995c35 |
|
1690 | manifest--verbose: 2:6e0e82995c35 | |
1691 | manifest--verbose: 1:4e8d705b1e53 |
|
1691 | manifest--verbose: 1:4e8d705b1e53 | |
1692 | manifest--verbose: 0:a0c8bcbbb45c |
|
1692 | manifest--verbose: 0:a0c8bcbbb45c | |
1693 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 |
|
1693 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 | |
1694 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf |
|
1694 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf | |
1695 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
1695 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1696 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
1696 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1697 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1697 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1698 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1698 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1699 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
1699 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
1700 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
1700 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
1701 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
1701 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
1702 | node: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1702 | node: 95c24699272ef57d062b8bccc32c878bf841784a | |
1703 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1703 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1704 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1704 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1705 | node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1705 | node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1706 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1706 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1707 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1707 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1708 | node: 97054abb4ab824450e9164180baf491ae0078465 |
|
1708 | node: 97054abb4ab824450e9164180baf491ae0078465 | |
1709 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1709 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1710 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1710 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1711 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1711 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a | |
1712 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1712 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1713 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1713 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1714 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1714 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1715 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1715 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1716 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1716 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1717 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
1717 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
1718 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1718 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1719 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1719 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1720 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1720 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a | |
1721 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1721 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1722 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1722 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1723 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1723 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1724 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1724 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1725 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1725 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1726 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
1726 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
1727 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1727 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1728 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1728 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1729 | parents: |
|
1729 | parents: | |
1730 | parents: -1:000000000000 |
|
1730 | parents: -1:000000000000 | |
1731 | parents: 5:13207e5a10d9 4:bbe44766e73d |
|
1731 | parents: 5:13207e5a10d9 4:bbe44766e73d | |
1732 | parents: 3:10e46f2dcbf4 |
|
1732 | parents: 3:10e46f2dcbf4 | |
1733 | parents: |
|
1733 | parents: | |
1734 | parents: |
|
1734 | parents: | |
1735 | parents: |
|
1735 | parents: | |
1736 | parents: |
|
1736 | parents: | |
1737 | parents: |
|
1737 | parents: | |
1738 | parents--verbose: |
|
1738 | parents--verbose: | |
1739 | parents--verbose: -1:000000000000 |
|
1739 | parents--verbose: -1:000000000000 | |
1740 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d |
|
1740 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d | |
1741 | parents--verbose: 3:10e46f2dcbf4 |
|
1741 | parents--verbose: 3:10e46f2dcbf4 | |
1742 | parents--verbose: |
|
1742 | parents--verbose: | |
1743 | parents--verbose: |
|
1743 | parents--verbose: | |
1744 | parents--verbose: |
|
1744 | parents--verbose: | |
1745 | parents--verbose: |
|
1745 | parents--verbose: | |
1746 | parents--verbose: |
|
1746 | parents--verbose: | |
1747 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 |
|
1747 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 | |
1748 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
1748 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1749 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1749 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1750 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
1750 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1751 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
1751 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1752 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 |
|
1752 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 | |
1753 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 |
|
1753 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 | |
1754 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 |
|
1754 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 | |
1755 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
1755 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1756 | rev: 8 |
|
1756 | rev: 8 | |
1757 | rev: 7 |
|
1757 | rev: 7 | |
1758 | rev: 6 |
|
1758 | rev: 6 | |
1759 | rev: 5 |
|
1759 | rev: 5 | |
1760 | rev: 4 |
|
1760 | rev: 4 | |
1761 | rev: 3 |
|
1761 | rev: 3 | |
1762 | rev: 2 |
|
1762 | rev: 2 | |
1763 | rev: 1 |
|
1763 | rev: 1 | |
1764 | rev: 0 |
|
1764 | rev: 0 | |
1765 | rev--verbose: 8 |
|
1765 | rev--verbose: 8 | |
1766 | rev--verbose: 7 |
|
1766 | rev--verbose: 7 | |
1767 | rev--verbose: 6 |
|
1767 | rev--verbose: 6 | |
1768 | rev--verbose: 5 |
|
1768 | rev--verbose: 5 | |
1769 | rev--verbose: 4 |
|
1769 | rev--verbose: 4 | |
1770 | rev--verbose: 3 |
|
1770 | rev--verbose: 3 | |
1771 | rev--verbose: 2 |
|
1771 | rev--verbose: 2 | |
1772 | rev--verbose: 1 |
|
1772 | rev--verbose: 1 | |
1773 | rev--verbose: 0 |
|
1773 | rev--verbose: 0 | |
1774 | rev--debug: 8 |
|
1774 | rev--debug: 8 | |
1775 | rev--debug: 7 |
|
1775 | rev--debug: 7 | |
1776 | rev--debug: 6 |
|
1776 | rev--debug: 6 | |
1777 | rev--debug: 5 |
|
1777 | rev--debug: 5 | |
1778 | rev--debug: 4 |
|
1778 | rev--debug: 4 | |
1779 | rev--debug: 3 |
|
1779 | rev--debug: 3 | |
1780 | rev--debug: 2 |
|
1780 | rev--debug: 2 | |
1781 | rev--debug: 1 |
|
1781 | rev--debug: 1 | |
1782 | rev--debug: 0 |
|
1782 | rev--debug: 0 | |
1783 | tags: tip |
|
1783 | tags: tip | |
1784 | tags: |
|
1784 | tags: | |
1785 | tags: |
|
1785 | tags: | |
1786 | tags: |
|
1786 | tags: | |
1787 | tags: |
|
1787 | tags: | |
1788 | tags: |
|
1788 | tags: | |
1789 | tags: |
|
1789 | tags: | |
1790 | tags: |
|
1790 | tags: | |
1791 | tags: |
|
1791 | tags: | |
1792 | tags--verbose: tip |
|
1792 | tags--verbose: tip | |
1793 | tags--verbose: |
|
1793 | tags--verbose: | |
1794 | tags--verbose: |
|
1794 | tags--verbose: | |
1795 | tags--verbose: |
|
1795 | tags--verbose: | |
1796 | tags--verbose: |
|
1796 | tags--verbose: | |
1797 | tags--verbose: |
|
1797 | tags--verbose: | |
1798 | tags--verbose: |
|
1798 | tags--verbose: | |
1799 | tags--verbose: |
|
1799 | tags--verbose: | |
1800 | tags--verbose: |
|
1800 | tags--verbose: | |
1801 | tags--debug: tip |
|
1801 | tags--debug: tip | |
1802 | tags--debug: |
|
1802 | tags--debug: | |
1803 | tags--debug: |
|
1803 | tags--debug: | |
1804 | tags--debug: |
|
1804 | tags--debug: | |
1805 | tags--debug: |
|
1805 | tags--debug: | |
1806 | tags--debug: |
|
1806 | tags--debug: | |
1807 | tags--debug: |
|
1807 | tags--debug: | |
1808 | tags--debug: |
|
1808 | tags--debug: | |
1809 | tags--debug: |
|
1809 | tags--debug: | |
1810 | diffstat: 3: +2/-1 |
|
1810 | diffstat: 3: +2/-1 | |
1811 | diffstat: 1: +1/-0 |
|
1811 | diffstat: 1: +1/-0 | |
1812 | diffstat: 0: +0/-0 |
|
1812 | diffstat: 0: +0/-0 | |
1813 | diffstat: 1: +1/-0 |
|
1813 | diffstat: 1: +1/-0 | |
1814 | diffstat: 0: +0/-0 |
|
1814 | diffstat: 0: +0/-0 | |
1815 | diffstat: 1: +1/-0 |
|
1815 | diffstat: 1: +1/-0 | |
1816 | diffstat: 1: +4/-0 |
|
1816 | diffstat: 1: +4/-0 | |
1817 | diffstat: 1: +2/-0 |
|
1817 | diffstat: 1: +2/-0 | |
1818 | diffstat: 1: +1/-0 |
|
1818 | diffstat: 1: +1/-0 | |
1819 | diffstat--verbose: 3: +2/-1 |
|
1819 | diffstat--verbose: 3: +2/-1 | |
1820 | diffstat--verbose: 1: +1/-0 |
|
1820 | diffstat--verbose: 1: +1/-0 | |
1821 | diffstat--verbose: 0: +0/-0 |
|
1821 | diffstat--verbose: 0: +0/-0 | |
1822 | diffstat--verbose: 1: +1/-0 |
|
1822 | diffstat--verbose: 1: +1/-0 | |
1823 | diffstat--verbose: 0: +0/-0 |
|
1823 | diffstat--verbose: 0: +0/-0 | |
1824 | diffstat--verbose: 1: +1/-0 |
|
1824 | diffstat--verbose: 1: +1/-0 | |
1825 | diffstat--verbose: 1: +4/-0 |
|
1825 | diffstat--verbose: 1: +4/-0 | |
1826 | diffstat--verbose: 1: +2/-0 |
|
1826 | diffstat--verbose: 1: +2/-0 | |
1827 | diffstat--verbose: 1: +1/-0 |
|
1827 | diffstat--verbose: 1: +1/-0 | |
1828 | diffstat--debug: 3: +2/-1 |
|
1828 | diffstat--debug: 3: +2/-1 | |
1829 | diffstat--debug: 1: +1/-0 |
|
1829 | diffstat--debug: 1: +1/-0 | |
1830 | diffstat--debug: 0: +0/-0 |
|
1830 | diffstat--debug: 0: +0/-0 | |
1831 | diffstat--debug: 1: +1/-0 |
|
1831 | diffstat--debug: 1: +1/-0 | |
1832 | diffstat--debug: 0: +0/-0 |
|
1832 | diffstat--debug: 0: +0/-0 | |
1833 | diffstat--debug: 1: +1/-0 |
|
1833 | diffstat--debug: 1: +1/-0 | |
1834 | diffstat--debug: 1: +4/-0 |
|
1834 | diffstat--debug: 1: +4/-0 | |
1835 | diffstat--debug: 1: +2/-0 |
|
1835 | diffstat--debug: 1: +2/-0 | |
1836 | diffstat--debug: 1: +1/-0 |
|
1836 | diffstat--debug: 1: +1/-0 | |
1837 | extras: branch=default |
|
1837 | extras: branch=default | |
1838 | extras: branch=default |
|
1838 | extras: branch=default | |
1839 | extras: branch=default |
|
1839 | extras: branch=default | |
1840 | extras: branch=default |
|
1840 | extras: branch=default | |
1841 | extras: branch=foo |
|
1841 | extras: branch=foo | |
1842 | extras: branch=default |
|
1842 | extras: branch=default | |
1843 | extras: branch=default |
|
1843 | extras: branch=default | |
1844 | extras: branch=default |
|
1844 | extras: branch=default | |
1845 | extras: branch=default |
|
1845 | extras: branch=default | |
1846 | extras--verbose: branch=default |
|
1846 | extras--verbose: branch=default | |
1847 | extras--verbose: branch=default |
|
1847 | extras--verbose: branch=default | |
1848 | extras--verbose: branch=default |
|
1848 | extras--verbose: branch=default | |
1849 | extras--verbose: branch=default |
|
1849 | extras--verbose: branch=default | |
1850 | extras--verbose: branch=foo |
|
1850 | extras--verbose: branch=foo | |
1851 | extras--verbose: branch=default |
|
1851 | extras--verbose: branch=default | |
1852 | extras--verbose: branch=default |
|
1852 | extras--verbose: branch=default | |
1853 | extras--verbose: branch=default |
|
1853 | extras--verbose: branch=default | |
1854 | extras--verbose: branch=default |
|
1854 | extras--verbose: branch=default | |
1855 | extras--debug: branch=default |
|
1855 | extras--debug: branch=default | |
1856 | extras--debug: branch=default |
|
1856 | extras--debug: branch=default | |
1857 | extras--debug: branch=default |
|
1857 | extras--debug: branch=default | |
1858 | extras--debug: branch=default |
|
1858 | extras--debug: branch=default | |
1859 | extras--debug: branch=foo |
|
1859 | extras--debug: branch=foo | |
1860 | extras--debug: branch=default |
|
1860 | extras--debug: branch=default | |
1861 | extras--debug: branch=default |
|
1861 | extras--debug: branch=default | |
1862 | extras--debug: branch=default |
|
1862 | extras--debug: branch=default | |
1863 | extras--debug: branch=default |
|
1863 | extras--debug: branch=default | |
1864 | p1rev: 7 |
|
1864 | p1rev: 7 | |
1865 | p1rev: -1 |
|
1865 | p1rev: -1 | |
1866 | p1rev: 5 |
|
1866 | p1rev: 5 | |
1867 | p1rev: 3 |
|
1867 | p1rev: 3 | |
1868 | p1rev: 3 |
|
1868 | p1rev: 3 | |
1869 | p1rev: 2 |
|
1869 | p1rev: 2 | |
1870 | p1rev: 1 |
|
1870 | p1rev: 1 | |
1871 | p1rev: 0 |
|
1871 | p1rev: 0 | |
1872 | p1rev: -1 |
|
1872 | p1rev: -1 | |
1873 | p1rev--verbose: 7 |
|
1873 | p1rev--verbose: 7 | |
1874 | p1rev--verbose: -1 |
|
1874 | p1rev--verbose: -1 | |
1875 | p1rev--verbose: 5 |
|
1875 | p1rev--verbose: 5 | |
1876 | p1rev--verbose: 3 |
|
1876 | p1rev--verbose: 3 | |
1877 | p1rev--verbose: 3 |
|
1877 | p1rev--verbose: 3 | |
1878 | p1rev--verbose: 2 |
|
1878 | p1rev--verbose: 2 | |
1879 | p1rev--verbose: 1 |
|
1879 | p1rev--verbose: 1 | |
1880 | p1rev--verbose: 0 |
|
1880 | p1rev--verbose: 0 | |
1881 | p1rev--verbose: -1 |
|
1881 | p1rev--verbose: -1 | |
1882 | p1rev--debug: 7 |
|
1882 | p1rev--debug: 7 | |
1883 | p1rev--debug: -1 |
|
1883 | p1rev--debug: -1 | |
1884 | p1rev--debug: 5 |
|
1884 | p1rev--debug: 5 | |
1885 | p1rev--debug: 3 |
|
1885 | p1rev--debug: 3 | |
1886 | p1rev--debug: 3 |
|
1886 | p1rev--debug: 3 | |
1887 | p1rev--debug: 2 |
|
1887 | p1rev--debug: 2 | |
1888 | p1rev--debug: 1 |
|
1888 | p1rev--debug: 1 | |
1889 | p1rev--debug: 0 |
|
1889 | p1rev--debug: 0 | |
1890 | p1rev--debug: -1 |
|
1890 | p1rev--debug: -1 | |
1891 | p2rev: -1 |
|
1891 | p2rev: -1 | |
1892 | p2rev: -1 |
|
1892 | p2rev: -1 | |
1893 | p2rev: 4 |
|
1893 | p2rev: 4 | |
1894 | p2rev: -1 |
|
1894 | p2rev: -1 | |
1895 | p2rev: -1 |
|
1895 | p2rev: -1 | |
1896 | p2rev: -1 |
|
1896 | p2rev: -1 | |
1897 | p2rev: -1 |
|
1897 | p2rev: -1 | |
1898 | p2rev: -1 |
|
1898 | p2rev: -1 | |
1899 | p2rev: -1 |
|
1899 | p2rev: -1 | |
1900 | p2rev--verbose: -1 |
|
1900 | p2rev--verbose: -1 | |
1901 | p2rev--verbose: -1 |
|
1901 | p2rev--verbose: -1 | |
1902 | p2rev--verbose: 4 |
|
1902 | p2rev--verbose: 4 | |
1903 | p2rev--verbose: -1 |
|
1903 | p2rev--verbose: -1 | |
1904 | p2rev--verbose: -1 |
|
1904 | p2rev--verbose: -1 | |
1905 | p2rev--verbose: -1 |
|
1905 | p2rev--verbose: -1 | |
1906 | p2rev--verbose: -1 |
|
1906 | p2rev--verbose: -1 | |
1907 | p2rev--verbose: -1 |
|
1907 | p2rev--verbose: -1 | |
1908 | p2rev--verbose: -1 |
|
1908 | p2rev--verbose: -1 | |
1909 | p2rev--debug: -1 |
|
1909 | p2rev--debug: -1 | |
1910 | p2rev--debug: -1 |
|
1910 | p2rev--debug: -1 | |
1911 | p2rev--debug: 4 |
|
1911 | p2rev--debug: 4 | |
1912 | p2rev--debug: -1 |
|
1912 | p2rev--debug: -1 | |
1913 | p2rev--debug: -1 |
|
1913 | p2rev--debug: -1 | |
1914 | p2rev--debug: -1 |
|
1914 | p2rev--debug: -1 | |
1915 | p2rev--debug: -1 |
|
1915 | p2rev--debug: -1 | |
1916 | p2rev--debug: -1 |
|
1916 | p2rev--debug: -1 | |
1917 | p2rev--debug: -1 |
|
1917 | p2rev--debug: -1 | |
1918 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1918 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1919 | p1node: 0000000000000000000000000000000000000000 |
|
1919 | p1node: 0000000000000000000000000000000000000000 | |
1920 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1920 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1921 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1921 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1922 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1922 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1923 | p1node: 97054abb4ab824450e9164180baf491ae0078465 |
|
1923 | p1node: 97054abb4ab824450e9164180baf491ae0078465 | |
1924 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1924 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1925 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1925 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1926 | p1node: 0000000000000000000000000000000000000000 |
|
1926 | p1node: 0000000000000000000000000000000000000000 | |
1927 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1927 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1928 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
1928 | p1node--verbose: 0000000000000000000000000000000000000000 | |
1929 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1929 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1930 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1930 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1931 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1931 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1932 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
1932 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
1933 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1933 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1934 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1934 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1935 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
1935 | p1node--verbose: 0000000000000000000000000000000000000000 | |
1936 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1936 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1937 | p1node--debug: 0000000000000000000000000000000000000000 |
|
1937 | p1node--debug: 0000000000000000000000000000000000000000 | |
1938 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1938 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1939 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1939 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1940 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1940 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1941 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
1941 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
1942 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1942 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1943 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1943 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1944 | p1node--debug: 0000000000000000000000000000000000000000 |
|
1944 | p1node--debug: 0000000000000000000000000000000000000000 | |
1945 | p2node: 0000000000000000000000000000000000000000 |
|
1945 | p2node: 0000000000000000000000000000000000000000 | |
1946 | p2node: 0000000000000000000000000000000000000000 |
|
1946 | p2node: 0000000000000000000000000000000000000000 | |
1947 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1947 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1948 | p2node: 0000000000000000000000000000000000000000 |
|
1948 | p2node: 0000000000000000000000000000000000000000 | |
1949 | p2node: 0000000000000000000000000000000000000000 |
|
1949 | p2node: 0000000000000000000000000000000000000000 | |
1950 | p2node: 0000000000000000000000000000000000000000 |
|
1950 | p2node: 0000000000000000000000000000000000000000 | |
1951 | p2node: 0000000000000000000000000000000000000000 |
|
1951 | p2node: 0000000000000000000000000000000000000000 | |
1952 | p2node: 0000000000000000000000000000000000000000 |
|
1952 | p2node: 0000000000000000000000000000000000000000 | |
1953 | p2node: 0000000000000000000000000000000000000000 |
|
1953 | p2node: 0000000000000000000000000000000000000000 | |
1954 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1954 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1955 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1955 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1956 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1956 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1957 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1957 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1958 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1958 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1959 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1959 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1960 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1960 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1961 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1961 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1962 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
1962 | p2node--verbose: 0000000000000000000000000000000000000000 | |
1963 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1963 | p2node--debug: 0000000000000000000000000000000000000000 | |
1964 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1964 | p2node--debug: 0000000000000000000000000000000000000000 | |
1965 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1965 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1966 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1966 | p2node--debug: 0000000000000000000000000000000000000000 | |
1967 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1967 | p2node--debug: 0000000000000000000000000000000000000000 | |
1968 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1968 | p2node--debug: 0000000000000000000000000000000000000000 | |
1969 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1969 | p2node--debug: 0000000000000000000000000000000000000000 | |
1970 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1970 | p2node--debug: 0000000000000000000000000000000000000000 | |
1971 | p2node--debug: 0000000000000000000000000000000000000000 |
|
1971 | p2node--debug: 0000000000000000000000000000000000000000 | |
1972 |
|
1972 | |||
1973 | Filters work: |
|
1973 | Filters work: | |
1974 |
|
1974 | |||
1975 | $ hg log --template '{author|domain}\n' |
|
1975 | $ hg log --template '{author|domain}\n' | |
1976 |
|
1976 | |||
1977 | hostname |
|
1977 | hostname | |
1978 |
|
1978 | |||
1979 |
|
1979 | |||
1980 |
|
1980 | |||
1981 |
|
1981 | |||
1982 | place |
|
1982 | place | |
1983 | place |
|
1983 | place | |
1984 | hostname |
|
1984 | hostname | |
1985 |
|
1985 | |||
1986 | $ hg log --template '{author|person}\n' |
|
1986 | $ hg log --template '{author|person}\n' | |
1987 | test |
|
1987 | test | |
1988 | User Name |
|
1988 | User Name | |
1989 | person |
|
1989 | person | |
1990 | person |
|
1990 | person | |
1991 | person |
|
1991 | person | |
1992 | person |
|
1992 | person | |
1993 | other |
|
1993 | other | |
1994 | A. N. Other |
|
1994 | A. N. Other | |
1995 | User Name |
|
1995 | User Name | |
1996 |
|
1996 | |||
1997 | $ hg log --template '{author|user}\n' |
|
1997 | $ hg log --template '{author|user}\n' | |
1998 | test |
|
1998 | test | |
1999 | user |
|
1999 | user | |
2000 | person |
|
2000 | person | |
2001 | person |
|
2001 | person | |
2002 | person |
|
2002 | person | |
2003 | person |
|
2003 | person | |
2004 | other |
|
2004 | other | |
2005 | other |
|
2005 | other | |
2006 | user |
|
2006 | user | |
2007 |
|
2007 | |||
2008 | $ hg log --template '{date|date}\n' |
|
2008 | $ hg log --template '{date|date}\n' | |
2009 | Wed Jan 01 10:01:00 2020 +0000 |
|
2009 | Wed Jan 01 10:01:00 2020 +0000 | |
2010 | Mon Jan 12 13:46:40 1970 +0000 |
|
2010 | Mon Jan 12 13:46:40 1970 +0000 | |
2011 | Sun Jan 18 08:40:01 1970 +0000 |
|
2011 | Sun Jan 18 08:40:01 1970 +0000 | |
2012 | Sun Jan 18 08:40:00 1970 +0000 |
|
2012 | Sun Jan 18 08:40:00 1970 +0000 | |
2013 | Sat Jan 17 04:53:20 1970 +0000 |
|
2013 | Sat Jan 17 04:53:20 1970 +0000 | |
2014 | Fri Jan 16 01:06:40 1970 +0000 |
|
2014 | Fri Jan 16 01:06:40 1970 +0000 | |
2015 | Wed Jan 14 21:20:00 1970 +0000 |
|
2015 | Wed Jan 14 21:20:00 1970 +0000 | |
2016 | Tue Jan 13 17:33:20 1970 +0000 |
|
2016 | Tue Jan 13 17:33:20 1970 +0000 | |
2017 | Mon Jan 12 13:46:40 1970 +0000 |
|
2017 | Mon Jan 12 13:46:40 1970 +0000 | |
2018 |
|
2018 | |||
2019 | $ hg log --template '{date|isodate}\n' |
|
2019 | $ hg log --template '{date|isodate}\n' | |
2020 | 2020-01-01 10:01 +0000 |
|
2020 | 2020-01-01 10:01 +0000 | |
2021 | 1970-01-12 13:46 +0000 |
|
2021 | 1970-01-12 13:46 +0000 | |
2022 | 1970-01-18 08:40 +0000 |
|
2022 | 1970-01-18 08:40 +0000 | |
2023 | 1970-01-18 08:40 +0000 |
|
2023 | 1970-01-18 08:40 +0000 | |
2024 | 1970-01-17 04:53 +0000 |
|
2024 | 1970-01-17 04:53 +0000 | |
2025 | 1970-01-16 01:06 +0000 |
|
2025 | 1970-01-16 01:06 +0000 | |
2026 | 1970-01-14 21:20 +0000 |
|
2026 | 1970-01-14 21:20 +0000 | |
2027 | 1970-01-13 17:33 +0000 |
|
2027 | 1970-01-13 17:33 +0000 | |
2028 | 1970-01-12 13:46 +0000 |
|
2028 | 1970-01-12 13:46 +0000 | |
2029 |
|
2029 | |||
2030 | $ hg log --template '{date|isodatesec}\n' |
|
2030 | $ hg log --template '{date|isodatesec}\n' | |
2031 | 2020-01-01 10:01:00 +0000 |
|
2031 | 2020-01-01 10:01:00 +0000 | |
2032 | 1970-01-12 13:46:40 +0000 |
|
2032 | 1970-01-12 13:46:40 +0000 | |
2033 | 1970-01-18 08:40:01 +0000 |
|
2033 | 1970-01-18 08:40:01 +0000 | |
2034 | 1970-01-18 08:40:00 +0000 |
|
2034 | 1970-01-18 08:40:00 +0000 | |
2035 | 1970-01-17 04:53:20 +0000 |
|
2035 | 1970-01-17 04:53:20 +0000 | |
2036 | 1970-01-16 01:06:40 +0000 |
|
2036 | 1970-01-16 01:06:40 +0000 | |
2037 | 1970-01-14 21:20:00 +0000 |
|
2037 | 1970-01-14 21:20:00 +0000 | |
2038 | 1970-01-13 17:33:20 +0000 |
|
2038 | 1970-01-13 17:33:20 +0000 | |
2039 | 1970-01-12 13:46:40 +0000 |
|
2039 | 1970-01-12 13:46:40 +0000 | |
2040 |
|
2040 | |||
2041 | $ hg log --template '{date|rfc822date}\n' |
|
2041 | $ hg log --template '{date|rfc822date}\n' | |
2042 | Wed, 01 Jan 2020 10:01:00 +0000 |
|
2042 | Wed, 01 Jan 2020 10:01:00 +0000 | |
2043 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
2043 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2044 | Sun, 18 Jan 1970 08:40:01 +0000 |
|
2044 | Sun, 18 Jan 1970 08:40:01 +0000 | |
2045 | Sun, 18 Jan 1970 08:40:00 +0000 |
|
2045 | Sun, 18 Jan 1970 08:40:00 +0000 | |
2046 | Sat, 17 Jan 1970 04:53:20 +0000 |
|
2046 | Sat, 17 Jan 1970 04:53:20 +0000 | |
2047 | Fri, 16 Jan 1970 01:06:40 +0000 |
|
2047 | Fri, 16 Jan 1970 01:06:40 +0000 | |
2048 | Wed, 14 Jan 1970 21:20:00 +0000 |
|
2048 | Wed, 14 Jan 1970 21:20:00 +0000 | |
2049 | Tue, 13 Jan 1970 17:33:20 +0000 |
|
2049 | Tue, 13 Jan 1970 17:33:20 +0000 | |
2050 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
2050 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2051 |
|
2051 | |||
2052 | $ hg log --template '{desc|firstline}\n' |
|
2052 | $ hg log --template '{desc|firstline}\n' | |
2053 | third |
|
2053 | third | |
2054 | second |
|
2054 | second | |
2055 | merge |
|
2055 | merge | |
2056 | new head |
|
2056 | new head | |
2057 | new branch |
|
2057 | new branch | |
2058 | no user, no domain |
|
2058 | no user, no domain | |
2059 | no person |
|
2059 | no person | |
2060 | other 1 |
|
2060 | other 1 | |
2061 | line 1 |
|
2061 | line 1 | |
2062 |
|
2062 | |||
2063 | $ hg log --template '{node|short}\n' |
|
2063 | $ hg log --template '{node|short}\n' | |
2064 | 95c24699272e |
|
2064 | 95c24699272e | |
2065 | 29114dbae42b |
|
2065 | 29114dbae42b | |
2066 | d41e714fe50d |
|
2066 | d41e714fe50d | |
2067 | 13207e5a10d9 |
|
2067 | 13207e5a10d9 | |
2068 | bbe44766e73d |
|
2068 | bbe44766e73d | |
2069 | 10e46f2dcbf4 |
|
2069 | 10e46f2dcbf4 | |
2070 | 97054abb4ab8 |
|
2070 | 97054abb4ab8 | |
2071 | b608e9d1a3f0 |
|
2071 | b608e9d1a3f0 | |
2072 | 1e4e1b8f71e0 |
|
2072 | 1e4e1b8f71e0 | |
2073 |
|
2073 | |||
2074 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' |
|
2074 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' | |
2075 | <changeset author="test"/> |
|
2075 | <changeset author="test"/> | |
2076 | <changeset author="User Name <user@hostname>"/> |
|
2076 | <changeset author="User Name <user@hostname>"/> | |
2077 | <changeset author="person"/> |
|
2077 | <changeset author="person"/> | |
2078 | <changeset author="person"/> |
|
2078 | <changeset author="person"/> | |
2079 | <changeset author="person"/> |
|
2079 | <changeset author="person"/> | |
2080 | <changeset author="person"/> |
|
2080 | <changeset author="person"/> | |
2081 | <changeset author="other@place"/> |
|
2081 | <changeset author="other@place"/> | |
2082 | <changeset author="A. N. Other <other@place>"/> |
|
2082 | <changeset author="A. N. Other <other@place>"/> | |
2083 | <changeset author="User Name <user@hostname>"/> |
|
2083 | <changeset author="User Name <user@hostname>"/> | |
2084 |
|
2084 | |||
2085 | $ hg log --template '{rev}: {children}\n' |
|
2085 | $ hg log --template '{rev}: {children}\n' | |
2086 | 8: |
|
2086 | 8: | |
2087 | 7: 8:95c24699272e |
|
2087 | 7: 8:95c24699272e | |
2088 | 6: |
|
2088 | 6: | |
2089 | 5: 6:d41e714fe50d |
|
2089 | 5: 6:d41e714fe50d | |
2090 | 4: 6:d41e714fe50d |
|
2090 | 4: 6:d41e714fe50d | |
2091 | 3: 4:bbe44766e73d 5:13207e5a10d9 |
|
2091 | 3: 4:bbe44766e73d 5:13207e5a10d9 | |
2092 | 2: 3:10e46f2dcbf4 |
|
2092 | 2: 3:10e46f2dcbf4 | |
2093 | 1: 2:97054abb4ab8 |
|
2093 | 1: 2:97054abb4ab8 | |
2094 | 0: 1:b608e9d1a3f0 |
|
2094 | 0: 1:b608e9d1a3f0 | |
2095 |
|
2095 | |||
2096 | Formatnode filter works: |
|
2096 | Formatnode filter works: | |
2097 |
|
2097 | |||
2098 | $ hg -q log -r 0 --template '{node|formatnode}\n' |
|
2098 | $ hg -q log -r 0 --template '{node|formatnode}\n' | |
2099 | 1e4e1b8f71e0 |
|
2099 | 1e4e1b8f71e0 | |
2100 |
|
2100 | |||
2101 | $ hg log -r 0 --template '{node|formatnode}\n' |
|
2101 | $ hg log -r 0 --template '{node|formatnode}\n' | |
2102 | 1e4e1b8f71e0 |
|
2102 | 1e4e1b8f71e0 | |
2103 |
|
2103 | |||
2104 | $ hg -v log -r 0 --template '{node|formatnode}\n' |
|
2104 | $ hg -v log -r 0 --template '{node|formatnode}\n' | |
2105 | 1e4e1b8f71e0 |
|
2105 | 1e4e1b8f71e0 | |
2106 |
|
2106 | |||
2107 | $ hg --debug log -r 0 --template '{node|formatnode}\n' |
|
2107 | $ hg --debug log -r 0 --template '{node|formatnode}\n' | |
2108 | 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2108 | 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2109 |
|
2109 | |||
2110 | Age filter: |
|
2110 | Age filter: | |
2111 |
|
2111 | |||
2112 | $ hg init unstable-hash |
|
2112 | $ hg init unstable-hash | |
2113 | $ cd unstable-hash |
|
2113 | $ cd unstable-hash | |
2114 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 |
|
2114 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 | |
2115 |
|
2115 | |||
2116 | >>> from datetime import datetime, timedelta |
|
2116 | >>> from datetime import datetime, timedelta | |
2117 | >>> fp = open('a', 'w') |
|
2117 | >>> fp = open('a', 'w') | |
2118 | >>> n = datetime.now() + timedelta(366 * 7) |
|
2118 | >>> n = datetime.now() + timedelta(366 * 7) | |
2119 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) |
|
2119 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) | |
2120 | >>> fp.close() |
|
2120 | >>> fp.close() | |
2121 | $ hg add a |
|
2121 | $ hg add a | |
2122 | $ hg commit -m future -d "`cat a`" |
|
2122 | $ hg commit -m future -d "`cat a`" | |
2123 |
|
2123 | |||
2124 | $ hg log -l1 --template '{date|age}\n' |
|
2124 | $ hg log -l1 --template '{date|age}\n' | |
2125 | 7 years from now |
|
2125 | 7 years from now | |
2126 |
|
2126 | |||
2127 | $ cd .. |
|
2127 | $ cd .. | |
2128 | $ rm -rf unstable-hash |
|
2128 | $ rm -rf unstable-hash | |
2129 |
|
2129 | |||
2130 | Add a dummy commit to make up for the instability of the above: |
|
2130 | Add a dummy commit to make up for the instability of the above: | |
2131 |
|
2131 | |||
2132 | $ echo a > a |
|
2132 | $ echo a > a | |
2133 | $ hg add a |
|
2133 | $ hg add a | |
2134 | $ hg ci -m future |
|
2134 | $ hg ci -m future | |
2135 |
|
2135 | |||
2136 | Count filter: |
|
2136 | Count filter: | |
2137 |
|
2137 | |||
2138 | $ hg log -l1 --template '{node|count} {node|short|count}\n' |
|
2138 | $ hg log -l1 --template '{node|count} {node|short|count}\n' | |
2139 | 40 12 |
|
2139 | 40 12 | |
2140 |
|
2140 | |||
2141 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' |
|
2141 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' | |
2142 | 0 1 4 |
|
2142 | 0 1 4 | |
2143 |
|
2143 | |||
2144 | $ hg log -G --template '{rev}: children: {children|count}, \ |
|
2144 | $ hg log -G --template '{rev}: children: {children|count}, \ | |
2145 | > tags: {tags|count}, file_adds: {file_adds|count}, \ |
|
2145 | > tags: {tags|count}, file_adds: {file_adds|count}, \ | |
2146 | > ancestors: {revset("ancestors(%s)", rev)|count}' |
|
2146 | > ancestors: {revset("ancestors(%s)", rev)|count}' | |
2147 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 |
|
2147 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 | |
2148 | | |
|
2148 | | | |
2149 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 |
|
2149 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 | |
2150 | | |
|
2150 | | | |
2151 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
2151 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2152 |
|
2152 | |||
2153 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 |
|
2153 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 | |
2154 | |\ |
|
2154 | |\ | |
2155 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 |
|
2155 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 | |
2156 | | | |
|
2156 | | | | |
2157 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 |
|
2157 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 | |
2158 | |/ |
|
2158 | |/ | |
2159 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 |
|
2159 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 | |
2160 | | |
|
2160 | | | |
2161 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 |
|
2161 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 | |
2162 | | |
|
2162 | | | |
2163 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 |
|
2163 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 | |
2164 | | |
|
2164 | | | |
2165 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
2165 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2166 |
|
2166 | |||
2167 |
|
2167 | |||
2168 | Upper/lower filters: |
|
2168 | Upper/lower filters: | |
2169 |
|
2169 | |||
2170 | $ hg log -r0 --template '{branch|upper}\n' |
|
2170 | $ hg log -r0 --template '{branch|upper}\n' | |
2171 | DEFAULT |
|
2171 | DEFAULT | |
2172 | $ hg log -r0 --template '{author|lower}\n' |
|
2172 | $ hg log -r0 --template '{author|lower}\n' | |
2173 | user name <user@hostname> |
|
2173 | user name <user@hostname> | |
2174 | $ hg log -r0 --template '{date|upper}\n' |
|
2174 | $ hg log -r0 --template '{date|upper}\n' | |
2175 | abort: template filter 'upper' is not compatible with keyword 'date' |
|
2175 | abort: template filter 'upper' is not compatible with keyword 'date' | |
2176 | [255] |
|
2176 | [255] | |
2177 |
|
2177 | |||
2178 | Add a commit that does all possible modifications at once |
|
2178 | Add a commit that does all possible modifications at once | |
2179 |
|
2179 | |||
2180 | $ echo modify >> third |
|
2180 | $ echo modify >> third | |
2181 | $ touch b |
|
2181 | $ touch b | |
2182 | $ hg add b |
|
2182 | $ hg add b | |
2183 | $ hg mv fourth fifth |
|
2183 | $ hg mv fourth fifth | |
2184 | $ hg rm a |
|
2184 | $ hg rm a | |
2185 | $ hg ci -m "Modify, add, remove, rename" |
|
2185 | $ hg ci -m "Modify, add, remove, rename" | |
2186 |
|
2186 | |||
2187 | Check the status template |
|
2187 | Check the status template | |
2188 |
|
2188 | |||
2189 | $ cat <<EOF >> $HGRCPATH |
|
2189 | $ cat <<EOF >> $HGRCPATH | |
2190 | > [extensions] |
|
2190 | > [extensions] | |
2191 | > color= |
|
2191 | > color= | |
2192 | > EOF |
|
2192 | > EOF | |
2193 |
|
2193 | |||
2194 | $ hg log -T status -r 10 |
|
2194 | $ hg log -T status -r 10 | |
2195 | changeset: 10:0f9759ec227a |
|
2195 | changeset: 10:0f9759ec227a | |
2196 | tag: tip |
|
2196 | tag: tip | |
2197 | user: test |
|
2197 | user: test | |
2198 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2198 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2199 | summary: Modify, add, remove, rename |
|
2199 | summary: Modify, add, remove, rename | |
2200 | files: |
|
2200 | files: | |
2201 | M third |
|
2201 | M third | |
2202 | A b |
|
2202 | A b | |
2203 | A fifth |
|
2203 | A fifth | |
2204 | R a |
|
2204 | R a | |
2205 | R fourth |
|
2205 | R fourth | |
2206 |
|
2206 | |||
2207 | $ hg log -T status -C -r 10 |
|
2207 | $ hg log -T status -C -r 10 | |
2208 | changeset: 10:0f9759ec227a |
|
2208 | changeset: 10:0f9759ec227a | |
2209 | tag: tip |
|
2209 | tag: tip | |
2210 | user: test |
|
2210 | user: test | |
2211 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2211 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2212 | summary: Modify, add, remove, rename |
|
2212 | summary: Modify, add, remove, rename | |
2213 | files: |
|
2213 | files: | |
2214 | M third |
|
2214 | M third | |
2215 | A b |
|
2215 | A b | |
2216 | A fifth |
|
2216 | A fifth | |
2217 | fourth |
|
2217 | fourth | |
2218 | R a |
|
2218 | R a | |
2219 | R fourth |
|
2219 | R fourth | |
2220 |
|
2220 | |||
2221 | $ hg log -T status -C -r 10 -v |
|
2221 | $ hg log -T status -C -r 10 -v | |
2222 | changeset: 10:0f9759ec227a |
|
2222 | changeset: 10:0f9759ec227a | |
2223 | tag: tip |
|
2223 | tag: tip | |
2224 | user: test |
|
2224 | user: test | |
2225 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2225 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2226 | description: |
|
2226 | description: | |
2227 | Modify, add, remove, rename |
|
2227 | Modify, add, remove, rename | |
2228 |
|
2228 | |||
2229 | files: |
|
2229 | files: | |
2230 | M third |
|
2230 | M third | |
2231 | A b |
|
2231 | A b | |
2232 | A fifth |
|
2232 | A fifth | |
2233 | fourth |
|
2233 | fourth | |
2234 | R a |
|
2234 | R a | |
2235 | R fourth |
|
2235 | R fourth | |
2236 |
|
2236 | |||
2237 | $ hg log -T status -C -r 10 --debug |
|
2237 | $ hg log -T status -C -r 10 --debug | |
2238 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c |
|
2238 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c | |
2239 | tag: tip |
|
2239 | tag: tip | |
2240 | phase: secret |
|
2240 | phase: secret | |
2241 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 |
|
2241 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 | |
2242 | parent: -1:0000000000000000000000000000000000000000 |
|
2242 | parent: -1:0000000000000000000000000000000000000000 | |
2243 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 |
|
2243 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 | |
2244 | user: test |
|
2244 | user: test | |
2245 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2245 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2246 | extra: branch=default |
|
2246 | extra: branch=default | |
2247 | description: |
|
2247 | description: | |
2248 | Modify, add, remove, rename |
|
2248 | Modify, add, remove, rename | |
2249 |
|
2249 | |||
2250 | files: |
|
2250 | files: | |
2251 | M third |
|
2251 | M third | |
2252 | A b |
|
2252 | A b | |
2253 | A fifth |
|
2253 | A fifth | |
2254 | fourth |
|
2254 | fourth | |
2255 | R a |
|
2255 | R a | |
2256 | R fourth |
|
2256 | R fourth | |
2257 |
|
2257 | |||
2258 | $ hg log -T status -C -r 10 --quiet |
|
2258 | $ hg log -T status -C -r 10 --quiet | |
2259 | 10:0f9759ec227a |
|
2259 | 10:0f9759ec227a | |
2260 | $ hg --color=debug log -T status -r 10 |
|
2260 | $ hg --color=debug log -T status -r 10 | |
2261 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2261 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2262 | [log.tag|tag: tip] |
|
2262 | [log.tag|tag: tip] | |
2263 | [log.user|user: test] |
|
2263 | [log.user|user: test] | |
2264 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2264 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2265 | [log.summary|summary: Modify, add, remove, rename] |
|
2265 | [log.summary|summary: Modify, add, remove, rename] | |
2266 | [ui.note log.files|files:] |
|
2266 | [ui.note log.files|files:] | |
2267 | [status.modified|M third] |
|
2267 | [status.modified|M third] | |
2268 | [status.added|A b] |
|
2268 | [status.added|A b] | |
2269 | [status.added|A fifth] |
|
2269 | [status.added|A fifth] | |
2270 | [status.removed|R a] |
|
2270 | [status.removed|R a] | |
2271 | [status.removed|R fourth] |
|
2271 | [status.removed|R fourth] | |
2272 |
|
2272 | |||
2273 | $ hg --color=debug log -T status -C -r 10 |
|
2273 | $ hg --color=debug log -T status -C -r 10 | |
2274 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2274 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2275 | [log.tag|tag: tip] |
|
2275 | [log.tag|tag: tip] | |
2276 | [log.user|user: test] |
|
2276 | [log.user|user: test] | |
2277 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2277 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2278 | [log.summary|summary: Modify, add, remove, rename] |
|
2278 | [log.summary|summary: Modify, add, remove, rename] | |
2279 | [ui.note log.files|files:] |
|
2279 | [ui.note log.files|files:] | |
2280 | [status.modified|M third] |
|
2280 | [status.modified|M third] | |
2281 | [status.added|A b] |
|
2281 | [status.added|A b] | |
2282 | [status.added|A fifth] |
|
2282 | [status.added|A fifth] | |
2283 | [status.copied| fourth] |
|
2283 | [status.copied| fourth] | |
2284 | [status.removed|R a] |
|
2284 | [status.removed|R a] | |
2285 | [status.removed|R fourth] |
|
2285 | [status.removed|R fourth] | |
2286 |
|
2286 | |||
2287 | $ hg --color=debug log -T status -C -r 10 -v |
|
2287 | $ hg --color=debug log -T status -C -r 10 -v | |
2288 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2288 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2289 | [log.tag|tag: tip] |
|
2289 | [log.tag|tag: tip] | |
2290 | [log.user|user: test] |
|
2290 | [log.user|user: test] | |
2291 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2291 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2292 | [ui.note log.description|description:] |
|
2292 | [ui.note log.description|description:] | |
2293 | [ui.note log.description|Modify, add, remove, rename] |
|
2293 | [ui.note log.description|Modify, add, remove, rename] | |
2294 |
|
2294 | |||
2295 | [ui.note log.files|files:] |
|
2295 | [ui.note log.files|files:] | |
2296 | [status.modified|M third] |
|
2296 | [status.modified|M third] | |
2297 | [status.added|A b] |
|
2297 | [status.added|A b] | |
2298 | [status.added|A fifth] |
|
2298 | [status.added|A fifth] | |
2299 | [status.copied| fourth] |
|
2299 | [status.copied| fourth] | |
2300 | [status.removed|R a] |
|
2300 | [status.removed|R a] | |
2301 | [status.removed|R fourth] |
|
2301 | [status.removed|R fourth] | |
2302 |
|
2302 | |||
2303 | $ hg --color=debug log -T status -C -r 10 --debug |
|
2303 | $ hg --color=debug log -T status -C -r 10 --debug | |
2304 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] |
|
2304 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] | |
2305 | [log.tag|tag: tip] |
|
2305 | [log.tag|tag: tip] | |
2306 | [log.phase|phase: secret] |
|
2306 | [log.phase|phase: secret] | |
2307 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] |
|
2307 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] | |
2308 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2308 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2309 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] |
|
2309 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] | |
2310 | [log.user|user: test] |
|
2310 | [log.user|user: test] | |
2311 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2311 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2312 | [ui.debug log.extra|extra: branch=default] |
|
2312 | [ui.debug log.extra|extra: branch=default] | |
2313 | [ui.note log.description|description:] |
|
2313 | [ui.note log.description|description:] | |
2314 | [ui.note log.description|Modify, add, remove, rename] |
|
2314 | [ui.note log.description|Modify, add, remove, rename] | |
2315 |
|
2315 | |||
2316 | [ui.note log.files|files:] |
|
2316 | [ui.note log.files|files:] | |
2317 | [status.modified|M third] |
|
2317 | [status.modified|M third] | |
2318 | [status.added|A b] |
|
2318 | [status.added|A b] | |
2319 | [status.added|A fifth] |
|
2319 | [status.added|A fifth] | |
2320 | [status.copied| fourth] |
|
2320 | [status.copied| fourth] | |
2321 | [status.removed|R a] |
|
2321 | [status.removed|R a] | |
2322 | [status.removed|R fourth] |
|
2322 | [status.removed|R fourth] | |
2323 |
|
2323 | |||
2324 | $ hg --color=debug log -T status -C -r 10 --quiet |
|
2324 | $ hg --color=debug log -T status -C -r 10 --quiet | |
2325 | [log.node|10:0f9759ec227a] |
|
2325 | [log.node|10:0f9759ec227a] | |
2326 |
|
2326 | |||
2327 | Check the bisect template |
|
2327 | Check the bisect template | |
2328 |
|
2328 | |||
2329 | $ hg bisect -g 1 |
|
2329 | $ hg bisect -g 1 | |
2330 | $ hg bisect -b 3 --noupdate |
|
2330 | $ hg bisect -b 3 --noupdate | |
2331 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) |
|
2331 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) | |
2332 | $ hg log -T bisect -r 0:4 |
|
2332 | $ hg log -T bisect -r 0:4 | |
2333 | changeset: 0:1e4e1b8f71e0 |
|
2333 | changeset: 0:1e4e1b8f71e0 | |
2334 | bisect: good (implicit) |
|
2334 | bisect: good (implicit) | |
2335 | user: User Name <user@hostname> |
|
2335 | user: User Name <user@hostname> | |
2336 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2336 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2337 | summary: line 1 |
|
2337 | summary: line 1 | |
2338 |
|
2338 | |||
2339 | changeset: 1:b608e9d1a3f0 |
|
2339 | changeset: 1:b608e9d1a3f0 | |
2340 | bisect: good |
|
2340 | bisect: good | |
2341 | user: A. N. Other <other@place> |
|
2341 | user: A. N. Other <other@place> | |
2342 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2342 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2343 | summary: other 1 |
|
2343 | summary: other 1 | |
2344 |
|
2344 | |||
2345 | changeset: 2:97054abb4ab8 |
|
2345 | changeset: 2:97054abb4ab8 | |
2346 | bisect: untested |
|
2346 | bisect: untested | |
2347 | user: other@place |
|
2347 | user: other@place | |
2348 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2348 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2349 | summary: no person |
|
2349 | summary: no person | |
2350 |
|
2350 | |||
2351 | changeset: 3:10e46f2dcbf4 |
|
2351 | changeset: 3:10e46f2dcbf4 | |
2352 | bisect: bad |
|
2352 | bisect: bad | |
2353 | user: person |
|
2353 | user: person | |
2354 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2354 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2355 | summary: no user, no domain |
|
2355 | summary: no user, no domain | |
2356 |
|
2356 | |||
2357 | changeset: 4:bbe44766e73d |
|
2357 | changeset: 4:bbe44766e73d | |
2358 | bisect: bad (implicit) |
|
2358 | bisect: bad (implicit) | |
2359 | branch: foo |
|
2359 | branch: foo | |
2360 | user: person |
|
2360 | user: person | |
2361 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2361 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2362 | summary: new branch |
|
2362 | summary: new branch | |
2363 |
|
2363 | |||
2364 | $ hg log --debug -T bisect -r 0:4 |
|
2364 | $ hg log --debug -T bisect -r 0:4 | |
2365 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2365 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2366 | bisect: good (implicit) |
|
2366 | bisect: good (implicit) | |
2367 | phase: public |
|
2367 | phase: public | |
2368 | parent: -1:0000000000000000000000000000000000000000 |
|
2368 | parent: -1:0000000000000000000000000000000000000000 | |
2369 | parent: -1:0000000000000000000000000000000000000000 |
|
2369 | parent: -1:0000000000000000000000000000000000000000 | |
2370 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
2370 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
2371 | user: User Name <user@hostname> |
|
2371 | user: User Name <user@hostname> | |
2372 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2372 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2373 | files+: a |
|
2373 | files+: a | |
2374 | extra: branch=default |
|
2374 | extra: branch=default | |
2375 | description: |
|
2375 | description: | |
2376 | line 1 |
|
2376 | line 1 | |
2377 | line 2 |
|
2377 | line 2 | |
2378 |
|
2378 | |||
2379 |
|
2379 | |||
2380 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2380 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2381 | bisect: good |
|
2381 | bisect: good | |
2382 | phase: public |
|
2382 | phase: public | |
2383 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2383 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2384 | parent: -1:0000000000000000000000000000000000000000 |
|
2384 | parent: -1:0000000000000000000000000000000000000000 | |
2385 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
2385 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
2386 | user: A. N. Other <other@place> |
|
2386 | user: A. N. Other <other@place> | |
2387 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2387 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2388 | files+: b |
|
2388 | files+: b | |
2389 | extra: branch=default |
|
2389 | extra: branch=default | |
2390 | description: |
|
2390 | description: | |
2391 | other 1 |
|
2391 | other 1 | |
2392 | other 2 |
|
2392 | other 2 | |
2393 |
|
2393 | |||
2394 | other 3 |
|
2394 | other 3 | |
2395 |
|
2395 | |||
2396 |
|
2396 | |||
2397 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
2397 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2398 | bisect: untested |
|
2398 | bisect: untested | |
2399 | phase: public |
|
2399 | phase: public | |
2400 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2400 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2401 | parent: -1:0000000000000000000000000000000000000000 |
|
2401 | parent: -1:0000000000000000000000000000000000000000 | |
2402 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
2402 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
2403 | user: other@place |
|
2403 | user: other@place | |
2404 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2404 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2405 | files+: c |
|
2405 | files+: c | |
2406 | extra: branch=default |
|
2406 | extra: branch=default | |
2407 | description: |
|
2407 | description: | |
2408 | no person |
|
2408 | no person | |
2409 |
|
2409 | |||
2410 |
|
2410 | |||
2411 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2411 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2412 | bisect: bad |
|
2412 | bisect: bad | |
2413 | phase: public |
|
2413 | phase: public | |
2414 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
2414 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2415 | parent: -1:0000000000000000000000000000000000000000 |
|
2415 | parent: -1:0000000000000000000000000000000000000000 | |
2416 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
2416 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2417 | user: person |
|
2417 | user: person | |
2418 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2418 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2419 | files: c |
|
2419 | files: c | |
2420 | extra: branch=default |
|
2420 | extra: branch=default | |
2421 | description: |
|
2421 | description: | |
2422 | no user, no domain |
|
2422 | no user, no domain | |
2423 |
|
2423 | |||
2424 |
|
2424 | |||
2425 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2425 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2426 | bisect: bad (implicit) |
|
2426 | bisect: bad (implicit) | |
2427 | branch: foo |
|
2427 | branch: foo | |
2428 | phase: draft |
|
2428 | phase: draft | |
2429 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2429 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2430 | parent: -1:0000000000000000000000000000000000000000 |
|
2430 | parent: -1:0000000000000000000000000000000000000000 | |
2431 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
2431 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2432 | user: person |
|
2432 | user: person | |
2433 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2433 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2434 | extra: branch=foo |
|
2434 | extra: branch=foo | |
2435 | description: |
|
2435 | description: | |
2436 | new branch |
|
2436 | new branch | |
2437 |
|
2437 | |||
2438 |
|
2438 | |||
2439 | $ hg log -v -T bisect -r 0:4 |
|
2439 | $ hg log -v -T bisect -r 0:4 | |
2440 | changeset: 0:1e4e1b8f71e0 |
|
2440 | changeset: 0:1e4e1b8f71e0 | |
2441 | bisect: good (implicit) |
|
2441 | bisect: good (implicit) | |
2442 | user: User Name <user@hostname> |
|
2442 | user: User Name <user@hostname> | |
2443 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2443 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2444 | files: a |
|
2444 | files: a | |
2445 | description: |
|
2445 | description: | |
2446 | line 1 |
|
2446 | line 1 | |
2447 | line 2 |
|
2447 | line 2 | |
2448 |
|
2448 | |||
2449 |
|
2449 | |||
2450 | changeset: 1:b608e9d1a3f0 |
|
2450 | changeset: 1:b608e9d1a3f0 | |
2451 | bisect: good |
|
2451 | bisect: good | |
2452 | user: A. N. Other <other@place> |
|
2452 | user: A. N. Other <other@place> | |
2453 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2453 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2454 | files: b |
|
2454 | files: b | |
2455 | description: |
|
2455 | description: | |
2456 | other 1 |
|
2456 | other 1 | |
2457 | other 2 |
|
2457 | other 2 | |
2458 |
|
2458 | |||
2459 | other 3 |
|
2459 | other 3 | |
2460 |
|
2460 | |||
2461 |
|
2461 | |||
2462 | changeset: 2:97054abb4ab8 |
|
2462 | changeset: 2:97054abb4ab8 | |
2463 | bisect: untested |
|
2463 | bisect: untested | |
2464 | user: other@place |
|
2464 | user: other@place | |
2465 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2465 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2466 | files: c |
|
2466 | files: c | |
2467 | description: |
|
2467 | description: | |
2468 | no person |
|
2468 | no person | |
2469 |
|
2469 | |||
2470 |
|
2470 | |||
2471 | changeset: 3:10e46f2dcbf4 |
|
2471 | changeset: 3:10e46f2dcbf4 | |
2472 | bisect: bad |
|
2472 | bisect: bad | |
2473 | user: person |
|
2473 | user: person | |
2474 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2474 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2475 | files: c |
|
2475 | files: c | |
2476 | description: |
|
2476 | description: | |
2477 | no user, no domain |
|
2477 | no user, no domain | |
2478 |
|
2478 | |||
2479 |
|
2479 | |||
2480 | changeset: 4:bbe44766e73d |
|
2480 | changeset: 4:bbe44766e73d | |
2481 | bisect: bad (implicit) |
|
2481 | bisect: bad (implicit) | |
2482 | branch: foo |
|
2482 | branch: foo | |
2483 | user: person |
|
2483 | user: person | |
2484 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2484 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2485 | description: |
|
2485 | description: | |
2486 | new branch |
|
2486 | new branch | |
2487 |
|
2487 | |||
2488 |
|
2488 | |||
2489 | $ hg --color=debug log -T bisect -r 0:4 |
|
2489 | $ hg --color=debug log -T bisect -r 0:4 | |
2490 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
2490 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2491 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2491 | [log.bisect bisect.good|bisect: good (implicit)] | |
2492 | [log.user|user: User Name <user@hostname>] |
|
2492 | [log.user|user: User Name <user@hostname>] | |
2493 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2493 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2494 | [log.summary|summary: line 1] |
|
2494 | [log.summary|summary: line 1] | |
2495 |
|
2495 | |||
2496 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
2496 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2497 | [log.bisect bisect.good|bisect: good] |
|
2497 | [log.bisect bisect.good|bisect: good] | |
2498 | [log.user|user: A. N. Other <other@place>] |
|
2498 | [log.user|user: A. N. Other <other@place>] | |
2499 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2499 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2500 | [log.summary|summary: other 1] |
|
2500 | [log.summary|summary: other 1] | |
2501 |
|
2501 | |||
2502 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
2502 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2503 | [log.bisect bisect.untested|bisect: untested] |
|
2503 | [log.bisect bisect.untested|bisect: untested] | |
2504 | [log.user|user: other@place] |
|
2504 | [log.user|user: other@place] | |
2505 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2505 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2506 | [log.summary|summary: no person] |
|
2506 | [log.summary|summary: no person] | |
2507 |
|
2507 | |||
2508 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
2508 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2509 | [log.bisect bisect.bad|bisect: bad] |
|
2509 | [log.bisect bisect.bad|bisect: bad] | |
2510 | [log.user|user: person] |
|
2510 | [log.user|user: person] | |
2511 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2511 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2512 | [log.summary|summary: no user, no domain] |
|
2512 | [log.summary|summary: no user, no domain] | |
2513 |
|
2513 | |||
2514 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
2514 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2515 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2515 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2516 | [log.branch|branch: foo] |
|
2516 | [log.branch|branch: foo] | |
2517 | [log.user|user: person] |
|
2517 | [log.user|user: person] | |
2518 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2518 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2519 | [log.summary|summary: new branch] |
|
2519 | [log.summary|summary: new branch] | |
2520 |
|
2520 | |||
2521 | $ hg --color=debug log --debug -T bisect -r 0:4 |
|
2521 | $ hg --color=debug log --debug -T bisect -r 0:4 | |
2522 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
2522 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2523 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2523 | [log.bisect bisect.good|bisect: good (implicit)] | |
2524 | [log.phase|phase: public] |
|
2524 | [log.phase|phase: public] | |
2525 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2525 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2526 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2526 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2527 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] |
|
2527 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] | |
2528 | [log.user|user: User Name <user@hostname>] |
|
2528 | [log.user|user: User Name <user@hostname>] | |
2529 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2529 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2530 | [ui.debug log.files|files+: a] |
|
2530 | [ui.debug log.files|files+: a] | |
2531 | [ui.debug log.extra|extra: branch=default] |
|
2531 | [ui.debug log.extra|extra: branch=default] | |
2532 | [ui.note log.description|description:] |
|
2532 | [ui.note log.description|description:] | |
2533 | [ui.note log.description|line 1 |
|
2533 | [ui.note log.description|line 1 | |
2534 | line 2] |
|
2534 | line 2] | |
2535 |
|
2535 | |||
2536 |
|
2536 | |||
2537 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
2537 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2538 | [log.bisect bisect.good|bisect: good] |
|
2538 | [log.bisect bisect.good|bisect: good] | |
2539 | [log.phase|phase: public] |
|
2539 | [log.phase|phase: public] | |
2540 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
2540 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2541 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2541 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2542 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] |
|
2542 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] | |
2543 | [log.user|user: A. N. Other <other@place>] |
|
2543 | [log.user|user: A. N. Other <other@place>] | |
2544 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2544 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2545 | [ui.debug log.files|files+: b] |
|
2545 | [ui.debug log.files|files+: b] | |
2546 | [ui.debug log.extra|extra: branch=default] |
|
2546 | [ui.debug log.extra|extra: branch=default] | |
2547 | [ui.note log.description|description:] |
|
2547 | [ui.note log.description|description:] | |
2548 | [ui.note log.description|other 1 |
|
2548 | [ui.note log.description|other 1 | |
2549 | other 2 |
|
2549 | other 2 | |
2550 |
|
2550 | |||
2551 | other 3] |
|
2551 | other 3] | |
2552 |
|
2552 | |||
2553 |
|
2553 | |||
2554 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
2554 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2555 | [log.bisect bisect.untested|bisect: untested] |
|
2555 | [log.bisect bisect.untested|bisect: untested] | |
2556 | [log.phase|phase: public] |
|
2556 | [log.phase|phase: public] | |
2557 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
2557 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2558 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2558 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2559 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] |
|
2559 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] | |
2560 | [log.user|user: other@place] |
|
2560 | [log.user|user: other@place] | |
2561 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2561 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2562 | [ui.debug log.files|files+: c] |
|
2562 | [ui.debug log.files|files+: c] | |
2563 | [ui.debug log.extra|extra: branch=default] |
|
2563 | [ui.debug log.extra|extra: branch=default] | |
2564 | [ui.note log.description|description:] |
|
2564 | [ui.note log.description|description:] | |
2565 | [ui.note log.description|no person] |
|
2565 | [ui.note log.description|no person] | |
2566 |
|
2566 | |||
2567 |
|
2567 | |||
2568 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
2568 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2569 | [log.bisect bisect.bad|bisect: bad] |
|
2569 | [log.bisect bisect.bad|bisect: bad] | |
2570 | [log.phase|phase: public] |
|
2570 | [log.phase|phase: public] | |
2571 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
2571 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2572 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2572 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2573 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
2573 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2574 | [log.user|user: person] |
|
2574 | [log.user|user: person] | |
2575 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2575 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2576 | [ui.debug log.files|files: c] |
|
2576 | [ui.debug log.files|files: c] | |
2577 | [ui.debug log.extra|extra: branch=default] |
|
2577 | [ui.debug log.extra|extra: branch=default] | |
2578 | [ui.note log.description|description:] |
|
2578 | [ui.note log.description|description:] | |
2579 | [ui.note log.description|no user, no domain] |
|
2579 | [ui.note log.description|no user, no domain] | |
2580 |
|
2580 | |||
2581 |
|
2581 | |||
2582 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] |
|
2582 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] | |
2583 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2583 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2584 | [log.branch|branch: foo] |
|
2584 | [log.branch|branch: foo] | |
2585 | [log.phase|phase: draft] |
|
2585 | [log.phase|phase: draft] | |
2586 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
2586 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2587 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2587 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2588 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
2588 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2589 | [log.user|user: person] |
|
2589 | [log.user|user: person] | |
2590 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2590 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2591 | [ui.debug log.extra|extra: branch=foo] |
|
2591 | [ui.debug log.extra|extra: branch=foo] | |
2592 | [ui.note log.description|description:] |
|
2592 | [ui.note log.description|description:] | |
2593 | [ui.note log.description|new branch] |
|
2593 | [ui.note log.description|new branch] | |
2594 |
|
2594 | |||
2595 |
|
2595 | |||
2596 | $ hg --color=debug log -v -T bisect -r 0:4 |
|
2596 | $ hg --color=debug log -v -T bisect -r 0:4 | |
2597 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
2597 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2598 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2598 | [log.bisect bisect.good|bisect: good (implicit)] | |
2599 | [log.user|user: User Name <user@hostname>] |
|
2599 | [log.user|user: User Name <user@hostname>] | |
2600 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2600 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2601 | [ui.note log.files|files: a] |
|
2601 | [ui.note log.files|files: a] | |
2602 | [ui.note log.description|description:] |
|
2602 | [ui.note log.description|description:] | |
2603 | [ui.note log.description|line 1 |
|
2603 | [ui.note log.description|line 1 | |
2604 | line 2] |
|
2604 | line 2] | |
2605 |
|
2605 | |||
2606 |
|
2606 | |||
2607 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
2607 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2608 | [log.bisect bisect.good|bisect: good] |
|
2608 | [log.bisect bisect.good|bisect: good] | |
2609 | [log.user|user: A. N. Other <other@place>] |
|
2609 | [log.user|user: A. N. Other <other@place>] | |
2610 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2610 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2611 | [ui.note log.files|files: b] |
|
2611 | [ui.note log.files|files: b] | |
2612 | [ui.note log.description|description:] |
|
2612 | [ui.note log.description|description:] | |
2613 | [ui.note log.description|other 1 |
|
2613 | [ui.note log.description|other 1 | |
2614 | other 2 |
|
2614 | other 2 | |
2615 |
|
2615 | |||
2616 | other 3] |
|
2616 | other 3] | |
2617 |
|
2617 | |||
2618 |
|
2618 | |||
2619 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
2619 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2620 | [log.bisect bisect.untested|bisect: untested] |
|
2620 | [log.bisect bisect.untested|bisect: untested] | |
2621 | [log.user|user: other@place] |
|
2621 | [log.user|user: other@place] | |
2622 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2622 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2623 | [ui.note log.files|files: c] |
|
2623 | [ui.note log.files|files: c] | |
2624 | [ui.note log.description|description:] |
|
2624 | [ui.note log.description|description:] | |
2625 | [ui.note log.description|no person] |
|
2625 | [ui.note log.description|no person] | |
2626 |
|
2626 | |||
2627 |
|
2627 | |||
2628 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
2628 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2629 | [log.bisect bisect.bad|bisect: bad] |
|
2629 | [log.bisect bisect.bad|bisect: bad] | |
2630 | [log.user|user: person] |
|
2630 | [log.user|user: person] | |
2631 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2631 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2632 | [ui.note log.files|files: c] |
|
2632 | [ui.note log.files|files: c] | |
2633 | [ui.note log.description|description:] |
|
2633 | [ui.note log.description|description:] | |
2634 | [ui.note log.description|no user, no domain] |
|
2634 | [ui.note log.description|no user, no domain] | |
2635 |
|
2635 | |||
2636 |
|
2636 | |||
2637 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
2637 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2638 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2638 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2639 | [log.branch|branch: foo] |
|
2639 | [log.branch|branch: foo] | |
2640 | [log.user|user: person] |
|
2640 | [log.user|user: person] | |
2641 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2641 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2642 | [ui.note log.description|description:] |
|
2642 | [ui.note log.description|description:] | |
2643 | [ui.note log.description|new branch] |
|
2643 | [ui.note log.description|new branch] | |
2644 |
|
2644 | |||
2645 |
|
2645 | |||
2646 | $ hg bisect --reset |
|
2646 | $ hg bisect --reset | |
2647 |
|
2647 | |||
2648 | Error on syntax: |
|
2648 | Error on syntax: | |
2649 |
|
2649 | |||
2650 | $ echo 'x = "f' >> t |
|
2650 | $ echo 'x = "f' >> t | |
2651 | $ hg log |
|
2651 | $ hg log | |
2652 | hg: parse error at t:3: unmatched quotes |
|
2652 | hg: parse error at t:3: unmatched quotes | |
2653 | [255] |
|
2653 | [255] | |
2654 |
|
2654 | |||
2655 | $ hg log -T '{date' |
|
2655 | $ hg log -T '{date' | |
2656 | hg: parse error at 1: unterminated template expansion |
|
2656 | hg: parse error at 1: unterminated template expansion | |
2657 | [255] |
|
2657 | [255] | |
2658 |
|
2658 | |||
2659 | Behind the scenes, this will throw TypeError |
|
2659 | Behind the scenes, this will throw TypeError | |
2660 |
|
2660 | |||
2661 | $ hg log -l 3 --template '{date|obfuscate}\n' |
|
2661 | $ hg log -l 3 --template '{date|obfuscate}\n' | |
2662 | abort: template filter 'obfuscate' is not compatible with keyword 'date' |
|
2662 | abort: template filter 'obfuscate' is not compatible with keyword 'date' | |
2663 | [255] |
|
2663 | [255] | |
2664 |
|
2664 | |||
2665 | Behind the scenes, this will throw a ValueError |
|
2665 | Behind the scenes, this will throw a ValueError | |
2666 |
|
2666 | |||
2667 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' |
|
2667 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' | |
2668 | abort: template filter 'shortdate' is not compatible with keyword 'desc' |
|
2668 | abort: template filter 'shortdate' is not compatible with keyword 'desc' | |
2669 | [255] |
|
2669 | [255] | |
2670 |
|
2670 | |||
2671 | Behind the scenes, this will throw AttributeError |
|
2671 | Behind the scenes, this will throw AttributeError | |
2672 |
|
2672 | |||
2673 | $ hg log -l 3 --template 'line: {date|escape}\n' |
|
2673 | $ hg log -l 3 --template 'line: {date|escape}\n' | |
2674 | abort: template filter 'escape' is not compatible with keyword 'date' |
|
2674 | abort: template filter 'escape' is not compatible with keyword 'date' | |
2675 | [255] |
|
2675 | [255] | |
2676 |
|
2676 | |||
2677 | $ hg log -l 3 --template 'line: {extras|localdate}\n' |
|
2677 | $ hg log -l 3 --template 'line: {extras|localdate}\n' | |
2678 | hg: parse error: localdate expects a date information |
|
2678 | hg: parse error: localdate expects a date information | |
2679 | [255] |
|
2679 | [255] | |
2680 |
|
2680 | |||
2681 | Behind the scenes, this will throw ValueError |
|
2681 | Behind the scenes, this will throw ValueError | |
2682 |
|
2682 | |||
2683 | $ hg tip --template '{author|email|date}\n' |
|
2683 | $ hg tip --template '{author|email|date}\n' | |
2684 | hg: parse error: date expects a date information |
|
2684 | hg: parse error: date expects a date information | |
2685 | [255] |
|
2685 | [255] | |
2686 |
|
2686 | |||
2687 | $ hg tip -T '{author|email|shortdate}\n' |
|
2687 | $ hg tip -T '{author|email|shortdate}\n' | |
2688 | abort: template filter 'shortdate' is not compatible with keyword 'author' |
|
2688 | abort: template filter 'shortdate' is not compatible with keyword 'author' | |
2689 | [255] |
|
2689 | [255] | |
2690 |
|
2690 | |||
2691 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' |
|
2691 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' | |
2692 | abort: incompatible use of template filter 'shortdate' |
|
2692 | abort: incompatible use of template filter 'shortdate' | |
2693 | [255] |
|
2693 | [255] | |
2694 |
|
2694 | |||
2695 | Error in nested template: |
|
2695 | Error in nested template: | |
2696 |
|
2696 | |||
2697 | $ hg log -T '{"date' |
|
2697 | $ hg log -T '{"date' | |
2698 | hg: parse error at 2: unterminated string |
|
2698 | hg: parse error at 2: unterminated string | |
2699 | [255] |
|
2699 | [255] | |
2700 |
|
2700 | |||
2701 | $ hg log -T '{"foo{date|?}"}' |
|
2701 | $ hg log -T '{"foo{date|?}"}' | |
2702 | hg: parse error at 11: syntax error |
|
2702 | hg: parse error at 11: syntax error | |
2703 | [255] |
|
2703 | [255] | |
2704 |
|
2704 | |||
2705 | Thrown an error if a template function doesn't exist |
|
2705 | Thrown an error if a template function doesn't exist | |
2706 |
|
2706 | |||
2707 | $ hg tip --template '{foo()}\n' |
|
2707 | $ hg tip --template '{foo()}\n' | |
2708 | hg: parse error: unknown function 'foo' |
|
2708 | hg: parse error: unknown function 'foo' | |
2709 | [255] |
|
2709 | [255] | |
2710 |
|
2710 | |||
2711 | Pass generator object created by template function to filter |
|
2711 | Pass generator object created by template function to filter | |
2712 |
|
2712 | |||
2713 | $ hg log -l 1 --template '{if(author, author)|user}\n' |
|
2713 | $ hg log -l 1 --template '{if(author, author)|user}\n' | |
2714 | test |
|
2714 | test | |
2715 |
|
2715 | |||
2716 | Test index keyword: |
|
2716 | Test index keyword: | |
2717 |
|
2717 | |||
2718 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' |
|
2718 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' | |
2719 | 10 0:a 1:b 2:fifth 3:fourth 4:third |
|
2719 | 10 0:a 1:b 2:fifth 3:fourth 4:third | |
2720 | 11 0:a |
|
2720 | 11 0:a | |
2721 |
|
2721 | |||
2722 | $ hg branches -T '{index} {branch}\n' |
|
2722 | $ hg branches -T '{index} {branch}\n' | |
2723 | 0 default |
|
2723 | 0 default | |
2724 | 1 foo |
|
2724 | 1 foo | |
2725 |
|
2725 | |||
2726 | Test diff function: |
|
2726 | Test diff function: | |
2727 |
|
2727 | |||
2728 | $ hg diff -c 8 |
|
2728 | $ hg diff -c 8 | |
2729 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2729 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2730 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2730 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2731 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2731 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2732 | @@ -0,0 +1,1 @@ |
|
2732 | @@ -0,0 +1,1 @@ | |
2733 | +second |
|
2733 | +second | |
2734 | diff -r 29114dbae42b -r 95c24699272e second |
|
2734 | diff -r 29114dbae42b -r 95c24699272e second | |
2735 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2735 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2736 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2736 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2737 | @@ -1,1 +0,0 @@ |
|
2737 | @@ -1,1 +0,0 @@ | |
2738 | -second |
|
2738 | -second | |
2739 | diff -r 29114dbae42b -r 95c24699272e third |
|
2739 | diff -r 29114dbae42b -r 95c24699272e third | |
2740 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2740 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2741 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2741 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2742 | @@ -0,0 +1,1 @@ |
|
2742 | @@ -0,0 +1,1 @@ | |
2743 | +third |
|
2743 | +third | |
2744 |
|
2744 | |||
2745 | $ hg log -r 8 -T "{diff()}" |
|
2745 | $ hg log -r 8 -T "{diff()}" | |
2746 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2746 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2747 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2747 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2748 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2748 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2749 | @@ -0,0 +1,1 @@ |
|
2749 | @@ -0,0 +1,1 @@ | |
2750 | +second |
|
2750 | +second | |
2751 | diff -r 29114dbae42b -r 95c24699272e second |
|
2751 | diff -r 29114dbae42b -r 95c24699272e second | |
2752 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2752 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2753 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2753 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2754 | @@ -1,1 +0,0 @@ |
|
2754 | @@ -1,1 +0,0 @@ | |
2755 | -second |
|
2755 | -second | |
2756 | diff -r 29114dbae42b -r 95c24699272e third |
|
2756 | diff -r 29114dbae42b -r 95c24699272e third | |
2757 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2757 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2758 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2758 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2759 | @@ -0,0 +1,1 @@ |
|
2759 | @@ -0,0 +1,1 @@ | |
2760 | +third |
|
2760 | +third | |
2761 |
|
2761 | |||
2762 | $ hg log -r 8 -T "{diff('glob:f*')}" |
|
2762 | $ hg log -r 8 -T "{diff('glob:f*')}" | |
2763 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2763 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2764 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2764 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2765 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2765 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2766 | @@ -0,0 +1,1 @@ |
|
2766 | @@ -0,0 +1,1 @@ | |
2767 | +second |
|
2767 | +second | |
2768 |
|
2768 | |||
2769 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" |
|
2769 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" | |
2770 | diff -r 29114dbae42b -r 95c24699272e second |
|
2770 | diff -r 29114dbae42b -r 95c24699272e second | |
2771 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2771 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2772 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2772 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2773 | @@ -1,1 +0,0 @@ |
|
2773 | @@ -1,1 +0,0 @@ | |
2774 | -second |
|
2774 | -second | |
2775 | diff -r 29114dbae42b -r 95c24699272e third |
|
2775 | diff -r 29114dbae42b -r 95c24699272e third | |
2776 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2776 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2777 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2777 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2778 | @@ -0,0 +1,1 @@ |
|
2778 | @@ -0,0 +1,1 @@ | |
2779 | +third |
|
2779 | +third | |
2780 |
|
2780 | |||
2781 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" |
|
2781 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" | |
2782 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2782 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2783 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2783 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2784 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2784 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2785 | @@ -0,0 +1,1 @@ |
|
2785 | @@ -0,0 +1,1 @@ | |
2786 | +second |
|
2786 | +second | |
2787 |
|
2787 | |||
2788 | $ cd .. |
|
2788 | $ cd .. | |
2789 |
|
2789 | |||
2790 |
|
2790 | |||
2791 | latesttag: |
|
2791 | latesttag: | |
2792 |
|
2792 | |||
2793 | $ hg init latesttag |
|
2793 | $ hg init latesttag | |
2794 | $ cd latesttag |
|
2794 | $ cd latesttag | |
2795 |
|
2795 | |||
2796 | $ echo a > file |
|
2796 | $ echo a > file | |
2797 | $ hg ci -Am a -d '0 0' |
|
2797 | $ hg ci -Am a -d '0 0' | |
2798 | adding file |
|
2798 | adding file | |
2799 |
|
2799 | |||
2800 | $ echo b >> file |
|
2800 | $ echo b >> file | |
2801 | $ hg ci -m b -d '1 0' |
|
2801 | $ hg ci -m b -d '1 0' | |
2802 |
|
2802 | |||
2803 | $ echo c >> head1 |
|
2803 | $ echo c >> head1 | |
2804 | $ hg ci -Am h1c -d '2 0' |
|
2804 | $ hg ci -Am h1c -d '2 0' | |
2805 | adding head1 |
|
2805 | adding head1 | |
2806 |
|
2806 | |||
2807 | $ hg update -q 1 |
|
2807 | $ hg update -q 1 | |
2808 | $ echo d >> head2 |
|
2808 | $ echo d >> head2 | |
2809 | $ hg ci -Am h2d -d '3 0' |
|
2809 | $ hg ci -Am h2d -d '3 0' | |
2810 | adding head2 |
|
2810 | adding head2 | |
2811 | created new head |
|
2811 | created new head | |
2812 |
|
2812 | |||
2813 | $ echo e >> head2 |
|
2813 | $ echo e >> head2 | |
2814 | $ hg ci -m h2e -d '4 0' |
|
2814 | $ hg ci -m h2e -d '4 0' | |
2815 |
|
2815 | |||
2816 | $ hg merge -q |
|
2816 | $ hg merge -q | |
2817 | $ hg ci -m merge -d '5 -3600' |
|
2817 | $ hg ci -m merge -d '5 -3600' | |
2818 |
|
2818 | |||
2819 | No tag set: |
|
2819 | No tag set: | |
2820 |
|
2820 | |||
2821 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2821 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2822 | 5: null+5 |
|
2822 | 5: null+5 | |
2823 | 4: null+4 |
|
2823 | 4: null+4 | |
2824 | 3: null+3 |
|
2824 | 3: null+3 | |
2825 | 2: null+3 |
|
2825 | 2: null+3 | |
2826 | 1: null+2 |
|
2826 | 1: null+2 | |
2827 | 0: null+1 |
|
2827 | 0: null+1 | |
2828 |
|
2828 | |||
2829 | One common tag: longest path wins: |
|
2829 | One common tag: longest path wins: | |
2830 |
|
2830 | |||
2831 | $ hg tag -r 1 -m t1 -d '6 0' t1 |
|
2831 | $ hg tag -r 1 -m t1 -d '6 0' t1 | |
2832 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2832 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2833 | 6: t1+4 |
|
2833 | 6: t1+4 | |
2834 | 5: t1+3 |
|
2834 | 5: t1+3 | |
2835 | 4: t1+2 |
|
2835 | 4: t1+2 | |
2836 | 3: t1+1 |
|
2836 | 3: t1+1 | |
2837 | 2: t1+1 |
|
2837 | 2: t1+1 | |
2838 | 1: t1+0 |
|
2838 | 1: t1+0 | |
2839 | 0: null+1 |
|
2839 | 0: null+1 | |
2840 |
|
2840 | |||
2841 | One ancestor tag: more recent wins: |
|
2841 | One ancestor tag: more recent wins: | |
2842 |
|
2842 | |||
2843 | $ hg tag -r 2 -m t2 -d '7 0' t2 |
|
2843 | $ hg tag -r 2 -m t2 -d '7 0' t2 | |
2844 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2844 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2845 | 7: t2+3 |
|
2845 | 7: t2+3 | |
2846 | 6: t2+2 |
|
2846 | 6: t2+2 | |
2847 | 5: t2+1 |
|
2847 | 5: t2+1 | |
2848 | 4: t1+2 |
|
2848 | 4: t1+2 | |
2849 | 3: t1+1 |
|
2849 | 3: t1+1 | |
2850 | 2: t2+0 |
|
2850 | 2: t2+0 | |
2851 | 1: t1+0 |
|
2851 | 1: t1+0 | |
2852 | 0: null+1 |
|
2852 | 0: null+1 | |
2853 |
|
2853 | |||
2854 | Two branch tags: more recent wins: |
|
2854 | Two branch tags: more recent wins: | |
2855 |
|
2855 | |||
2856 | $ hg tag -r 3 -m t3 -d '8 0' t3 |
|
2856 | $ hg tag -r 3 -m t3 -d '8 0' t3 | |
2857 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2857 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2858 | 8: t3+5 |
|
2858 | 8: t3+5 | |
2859 | 7: t3+4 |
|
2859 | 7: t3+4 | |
2860 | 6: t3+3 |
|
2860 | 6: t3+3 | |
2861 | 5: t3+2 |
|
2861 | 5: t3+2 | |
2862 | 4: t3+1 |
|
2862 | 4: t3+1 | |
2863 | 3: t3+0 |
|
2863 | 3: t3+0 | |
2864 | 2: t2+0 |
|
2864 | 2: t2+0 | |
2865 | 1: t1+0 |
|
2865 | 1: t1+0 | |
2866 | 0: null+1 |
|
2866 | 0: null+1 | |
2867 |
|
2867 | |||
2868 | Merged tag overrides: |
|
2868 | Merged tag overrides: | |
2869 |
|
2869 | |||
2870 | $ hg tag -r 5 -m t5 -d '9 0' t5 |
|
2870 | $ hg tag -r 5 -m t5 -d '9 0' t5 | |
2871 | $ hg tag -r 3 -m at3 -d '10 0' at3 |
|
2871 | $ hg tag -r 3 -m at3 -d '10 0' at3 | |
2872 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2872 | $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2873 | 10: t5+5 |
|
2873 | 10: t5+5 | |
2874 | 9: t5+4 |
|
2874 | 9: t5+4 | |
2875 | 8: t5+3 |
|
2875 | 8: t5+3 | |
2876 | 7: t5+2 |
|
2876 | 7: t5+2 | |
2877 | 6: t5+1 |
|
2877 | 6: t5+1 | |
2878 | 5: t5+0 |
|
2878 | 5: t5+0 | |
2879 | 4: at3:t3+1 |
|
2879 | 4: at3:t3+1 | |
2880 | 3: at3:t3+0 |
|
2880 | 3: at3:t3+0 | |
2881 | 2: t2+0 |
|
2881 | 2: t2+0 | |
2882 | 1: t1+0 |
|
2882 | 1: t1+0 | |
2883 | 0: null+1 |
|
2883 | 0: null+1 | |
2884 |
|
2884 | |||
2885 | $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
2885 | $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |
2886 | 10: t5+5,5 |
|
2886 | 10: t5+5,5 | |
2887 | 9: t5+4,4 |
|
2887 | 9: t5+4,4 | |
2888 | 8: t5+3,3 |
|
2888 | 8: t5+3,3 | |
2889 | 7: t5+2,2 |
|
2889 | 7: t5+2,2 | |
2890 | 6: t5+1,1 |
|
2890 | 6: t5+1,1 | |
2891 | 5: t5+0,0 |
|
2891 | 5: t5+0,0 | |
2892 | 4: at3+1,1 t3+1,1 |
|
2892 | 4: at3+1,1 t3+1,1 | |
2893 | 3: at3+0,0 t3+0,0 |
|
2893 | 3: at3+0,0 t3+0,0 | |
2894 | 2: t2+0,0 |
|
2894 | 2: t2+0,0 | |
2895 | 1: t1+0,0 |
|
2895 | 1: t1+0,0 | |
2896 | 0: null+1,1 |
|
2896 | 0: null+1,1 | |
2897 |
|
2897 | |||
2898 | $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" |
|
2898 | $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" | |
2899 | 10: t3, C: 8, D: 7 |
|
2899 | 10: t3, C: 8, D: 7 | |
2900 | 9: t3, C: 7, D: 6 |
|
2900 | 9: t3, C: 7, D: 6 | |
2901 | 8: t3, C: 6, D: 5 |
|
2901 | 8: t3, C: 6, D: 5 | |
2902 | 7: t3, C: 5, D: 4 |
|
2902 | 7: t3, C: 5, D: 4 | |
2903 | 6: t3, C: 4, D: 3 |
|
2903 | 6: t3, C: 4, D: 3 | |
2904 | 5: t3, C: 3, D: 2 |
|
2904 | 5: t3, C: 3, D: 2 | |
2905 | 4: t3, C: 1, D: 1 |
|
2905 | 4: t3, C: 1, D: 1 | |
2906 | 3: t3, C: 0, D: 0 |
|
2906 | 3: t3, C: 0, D: 0 | |
2907 | 2: t1, C: 1, D: 1 |
|
2907 | 2: t1, C: 1, D: 1 | |
2908 | 1: t1, C: 0, D: 0 |
|
2908 | 1: t1, C: 0, D: 0 | |
2909 | 0: null, C: 1, D: 1 |
|
2909 | 0: null, C: 1, D: 1 | |
2910 |
|
2910 | |||
2911 | $ cd .. |
|
2911 | $ cd .. | |
2912 |
|
2912 | |||
2913 |
|
2913 | |||
2914 | Style path expansion: issue1948 - ui.style option doesn't work on OSX |
|
2914 | Style path expansion: issue1948 - ui.style option doesn't work on OSX | |
2915 | if it is a relative path |
|
2915 | if it is a relative path | |
2916 |
|
2916 | |||
2917 | $ mkdir -p home/styles |
|
2917 | $ mkdir -p home/styles | |
2918 |
|
2918 | |||
2919 | $ cat > home/styles/teststyle <<EOF |
|
2919 | $ cat > home/styles/teststyle <<EOF | |
2920 | > changeset = 'test {rev}:{node|short}\n' |
|
2920 | > changeset = 'test {rev}:{node|short}\n' | |
2921 | > EOF |
|
2921 | > EOF | |
2922 |
|
2922 | |||
2923 | $ HOME=`pwd`/home; export HOME |
|
2923 | $ HOME=`pwd`/home; export HOME | |
2924 |
|
2924 | |||
2925 | $ cat > latesttag/.hg/hgrc <<EOF |
|
2925 | $ cat > latesttag/.hg/hgrc <<EOF | |
2926 | > [ui] |
|
2926 | > [ui] | |
2927 | > style = ~/styles/teststyle |
|
2927 | > style = ~/styles/teststyle | |
2928 | > EOF |
|
2928 | > EOF | |
2929 |
|
2929 | |||
2930 | $ hg -R latesttag tip |
|
2930 | $ hg -R latesttag tip | |
2931 | test 10:9b4a630e5f5f |
|
2931 | test 10:9b4a630e5f5f | |
2932 |
|
2932 | |||
2933 | Test recursive showlist template (issue1989): |
|
2933 | Test recursive showlist template (issue1989): | |
2934 |
|
2934 | |||
2935 | $ cat > style1989 <<EOF |
|
2935 | $ cat > style1989 <<EOF | |
2936 | > changeset = '{file_mods}{manifest}{extras}' |
|
2936 | > changeset = '{file_mods}{manifest}{extras}' | |
2937 | > file_mod = 'M|{author|person}\n' |
|
2937 | > file_mod = 'M|{author|person}\n' | |
2938 | > manifest = '{rev},{author}\n' |
|
2938 | > manifest = '{rev},{author}\n' | |
2939 | > extra = '{key}: {author}\n' |
|
2939 | > extra = '{key}: {author}\n' | |
2940 | > EOF |
|
2940 | > EOF | |
2941 |
|
2941 | |||
2942 | $ hg -R latesttag log -r tip --style=style1989 |
|
2942 | $ hg -R latesttag log -r tip --style=style1989 | |
2943 | M|test |
|
2943 | M|test | |
2944 | 10,test |
|
2944 | 10,test | |
2945 | branch: test |
|
2945 | branch: test | |
2946 |
|
2946 | |||
2947 | Test new-style inline templating: |
|
2947 | Test new-style inline templating: | |
2948 |
|
2948 | |||
2949 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
|
2949 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' | |
2950 | modified files: .hgtags |
|
2950 | modified files: .hgtags | |
2951 |
|
2951 | |||
2952 |
|
2952 | |||
2953 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' |
|
2953 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' | |
2954 | hg: parse error: keyword 'rev' is not iterable |
|
2954 | hg: parse error: keyword 'rev' is not iterable | |
2955 | [255] |
|
2955 | [255] | |
2956 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' |
|
2956 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' | |
2957 | hg: parse error: None is not iterable |
|
2957 | hg: parse error: None is not iterable | |
2958 | [255] |
|
2958 | [255] | |
2959 |
|
2959 | |||
2960 | Test the sub function of templating for expansion: |
|
2960 | Test the sub function of templating for expansion: | |
2961 |
|
2961 | |||
2962 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' |
|
2962 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' | |
2963 | xx |
|
2963 | xx | |
2964 |
|
2964 | |||
2965 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' |
|
2965 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' | |
2966 | hg: parse error: sub got an invalid pattern: [ |
|
2966 | hg: parse error: sub got an invalid pattern: [ | |
2967 | [255] |
|
2967 | [255] | |
2968 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' |
|
2968 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' | |
2969 | hg: parse error: sub got an invalid replacement: \1 |
|
2969 | hg: parse error: sub got an invalid replacement: \1 | |
2970 | [255] |
|
2970 | [255] | |
2971 |
|
2971 | |||
2972 | Test the strip function with chars specified: |
|
2972 | Test the strip function with chars specified: | |
2973 |
|
2973 | |||
2974 | $ hg log -R latesttag --template '{desc}\n' |
|
2974 | $ hg log -R latesttag --template '{desc}\n' | |
2975 | at3 |
|
2975 | at3 | |
2976 | t5 |
|
2976 | t5 | |
2977 | t3 |
|
2977 | t3 | |
2978 | t2 |
|
2978 | t2 | |
2979 | t1 |
|
2979 | t1 | |
2980 | merge |
|
2980 | merge | |
2981 | h2e |
|
2981 | h2e | |
2982 | h2d |
|
2982 | h2d | |
2983 | h1c |
|
2983 | h1c | |
2984 | b |
|
2984 | b | |
2985 | a |
|
2985 | a | |
2986 |
|
2986 | |||
2987 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' |
|
2987 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' | |
2988 | at3 |
|
2988 | at3 | |
2989 | 5 |
|
2989 | 5 | |
2990 | 3 |
|
2990 | 3 | |
2991 | 2 |
|
2991 | 2 | |
2992 | 1 |
|
2992 | 1 | |
2993 | merg |
|
2993 | merg | |
2994 | h2 |
|
2994 | h2 | |
2995 | h2d |
|
2995 | h2d | |
2996 | h1c |
|
2996 | h1c | |
2997 | b |
|
2997 | b | |
2998 | a |
|
2998 | a | |
2999 |
|
2999 | |||
3000 | Test date format: |
|
3000 | Test date format: | |
3001 |
|
3001 | |||
3002 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' |
|
3002 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' | |
3003 | date: 70 01 01 10 +0000 |
|
3003 | date: 70 01 01 10 +0000 | |
3004 | date: 70 01 01 09 +0000 |
|
3004 | date: 70 01 01 09 +0000 | |
3005 | date: 70 01 01 08 +0000 |
|
3005 | date: 70 01 01 08 +0000 | |
3006 | date: 70 01 01 07 +0000 |
|
3006 | date: 70 01 01 07 +0000 | |
3007 | date: 70 01 01 06 +0000 |
|
3007 | date: 70 01 01 06 +0000 | |
3008 | date: 70 01 01 05 +0100 |
|
3008 | date: 70 01 01 05 +0100 | |
3009 | date: 70 01 01 04 +0000 |
|
3009 | date: 70 01 01 04 +0000 | |
3010 | date: 70 01 01 03 +0000 |
|
3010 | date: 70 01 01 03 +0000 | |
3011 | date: 70 01 01 02 +0000 |
|
3011 | date: 70 01 01 02 +0000 | |
3012 | date: 70 01 01 01 +0000 |
|
3012 | date: 70 01 01 01 +0000 | |
3013 | date: 70 01 01 00 +0000 |
|
3013 | date: 70 01 01 00 +0000 | |
3014 |
|
3014 | |||
3015 | Test invalid date: |
|
3015 | Test invalid date: | |
3016 |
|
3016 | |||
3017 | $ hg log -R latesttag -T '{date(rev)}\n' |
|
3017 | $ hg log -R latesttag -T '{date(rev)}\n' | |
3018 | hg: parse error: date expects a date information |
|
3018 | hg: parse error: date expects a date information | |
3019 | [255] |
|
3019 | [255] | |
3020 |
|
3020 | |||
3021 | Test integer literal: |
|
3021 | Test integer literal: | |
3022 |
|
3022 | |||
3023 | $ hg debugtemplate -v '{(0)}\n' |
|
3023 | $ hg debugtemplate -v '{(0)}\n' | |
3024 | (template |
|
3024 | (template | |
3025 | (group |
|
3025 | (group | |
3026 | ('integer', '0')) |
|
3026 | ('integer', '0')) | |
3027 | ('string', '\n')) |
|
3027 | ('string', '\n')) | |
3028 | 0 |
|
3028 | 0 | |
3029 | $ hg debugtemplate -v '{(123)}\n' |
|
3029 | $ hg debugtemplate -v '{(123)}\n' | |
3030 | (template |
|
3030 | (template | |
3031 | (group |
|
3031 | (group | |
3032 | ('integer', '123')) |
|
3032 | ('integer', '123')) | |
3033 | ('string', '\n')) |
|
3033 | ('string', '\n')) | |
3034 | 123 |
|
3034 | 123 | |
3035 | $ hg debugtemplate -v '{(-4)}\n' |
|
3035 | $ hg debugtemplate -v '{(-4)}\n' | |
3036 | (template |
|
3036 | (template | |
3037 | (group |
|
3037 | (group | |
3038 | (negate |
|
3038 | (negate | |
3039 | ('integer', '4'))) |
|
3039 | ('integer', '4'))) | |
3040 | ('string', '\n')) |
|
3040 | ('string', '\n')) | |
3041 | -4 |
|
3041 | -4 | |
3042 | $ hg debugtemplate '{(-)}\n' |
|
3042 | $ hg debugtemplate '{(-)}\n' | |
3043 | hg: parse error at 3: not a prefix: ) |
|
3043 | hg: parse error at 3: not a prefix: ) | |
3044 | [255] |
|
3044 | [255] | |
3045 | $ hg debugtemplate '{(-a)}\n' |
|
3045 | $ hg debugtemplate '{(-a)}\n' | |
3046 | hg: parse error: negation needs an integer argument |
|
3046 | hg: parse error: negation needs an integer argument | |
3047 | [255] |
|
3047 | [255] | |
3048 |
|
3048 | |||
3049 | top-level integer literal is interpreted as symbol (i.e. variable name): |
|
3049 | top-level integer literal is interpreted as symbol (i.e. variable name): | |
3050 |
|
3050 | |||
3051 | $ hg debugtemplate -D 1=one -v '{1}\n' |
|
3051 | $ hg debugtemplate -D 1=one -v '{1}\n' | |
3052 | (template |
|
3052 | (template | |
3053 | ('integer', '1') |
|
3053 | ('integer', '1') | |
3054 | ('string', '\n')) |
|
3054 | ('string', '\n')) | |
3055 | one |
|
3055 | one | |
3056 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' |
|
3056 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' | |
3057 | (template |
|
3057 | (template | |
3058 | (func |
|
3058 | (func | |
3059 | ('symbol', 'if') |
|
3059 | ('symbol', 'if') | |
3060 | (list |
|
3060 | (list | |
3061 | ('string', 't') |
|
3061 | ('string', 't') | |
3062 | (template |
|
3062 | (template | |
3063 | ('integer', '1')))) |
|
3063 | ('integer', '1')))) | |
3064 | ('string', '\n')) |
|
3064 | ('string', '\n')) | |
3065 | one |
|
3065 | one | |
3066 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' |
|
3066 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' | |
3067 | (template |
|
3067 | (template | |
3068 | (| |
|
3068 | (| | |
3069 | ('integer', '1') |
|
3069 | ('integer', '1') | |
3070 | ('symbol', 'stringify')) |
|
3070 | ('symbol', 'stringify')) | |
3071 | ('string', '\n')) |
|
3071 | ('string', '\n')) | |
3072 | one |
|
3072 | one | |
3073 |
|
3073 | |||
3074 | unless explicit symbol is expected: |
|
3074 | unless explicit symbol is expected: | |
3075 |
|
3075 | |||
3076 | $ hg log -Ra -r0 -T '{desc|1}\n' |
|
3076 | $ hg log -Ra -r0 -T '{desc|1}\n' | |
3077 | hg: parse error: expected a symbol, got 'integer' |
|
3077 | hg: parse error: expected a symbol, got 'integer' | |
3078 | [255] |
|
3078 | [255] | |
3079 | $ hg log -Ra -r0 -T '{1()}\n' |
|
3079 | $ hg log -Ra -r0 -T '{1()}\n' | |
3080 | hg: parse error: expected a symbol, got 'integer' |
|
3080 | hg: parse error: expected a symbol, got 'integer' | |
3081 | [255] |
|
3081 | [255] | |
3082 |
|
3082 | |||
3083 | Test string literal: |
|
3083 | Test string literal: | |
3084 |
|
3084 | |||
3085 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' |
|
3085 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' | |
3086 | (template |
|
3086 | (template | |
3087 | ('string', 'string with no template fragment') |
|
3087 | ('string', 'string with no template fragment') | |
3088 | ('string', '\n')) |
|
3088 | ('string', '\n')) | |
3089 | string with no template fragment |
|
3089 | string with no template fragment | |
3090 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' |
|
3090 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' | |
3091 | (template |
|
3091 | (template | |
3092 | (template |
|
3092 | (template | |
3093 | ('string', 'template: ') |
|
3093 | ('string', 'template: ') | |
3094 | ('symbol', 'rev')) |
|
3094 | ('symbol', 'rev')) | |
3095 | ('string', '\n')) |
|
3095 | ('string', '\n')) | |
3096 | template: 0 |
|
3096 | template: 0 | |
3097 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' |
|
3097 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' | |
3098 | (template |
|
3098 | (template | |
3099 | ('string', 'rawstring: {rev}') |
|
3099 | ('string', 'rawstring: {rev}') | |
3100 | ('string', '\n')) |
|
3100 | ('string', '\n')) | |
3101 | rawstring: {rev} |
|
3101 | rawstring: {rev} | |
3102 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' |
|
3102 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' | |
3103 | (template |
|
3103 | (template | |
3104 | (% |
|
3104 | (% | |
3105 | ('symbol', 'files') |
|
3105 | ('symbol', 'files') | |
3106 | ('string', 'rawstring: {file}')) |
|
3106 | ('string', 'rawstring: {file}')) | |
3107 | ('string', '\n')) |
|
3107 | ('string', '\n')) | |
3108 | rawstring: {file} |
|
3108 | rawstring: {file} | |
3109 |
|
3109 | |||
3110 | Test string escaping: |
|
3110 | Test string escaping: | |
3111 |
|
3111 | |||
3112 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3112 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3113 | > |
|
3113 | > | |
3114 | <>\n<[> |
|
3114 | <>\n<[> | |
3115 | <>\n<]> |
|
3115 | <>\n<]> | |
3116 | <>\n< |
|
3116 | <>\n< | |
3117 |
|
3117 | |||
3118 | $ hg log -R latesttag -r 0 \ |
|
3118 | $ hg log -R latesttag -r 0 \ | |
3119 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3119 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3120 | > |
|
3120 | > | |
3121 | <>\n<[> |
|
3121 | <>\n<[> | |
3122 | <>\n<]> |
|
3122 | <>\n<]> | |
3123 | <>\n< |
|
3123 | <>\n< | |
3124 |
|
3124 | |||
3125 | $ hg log -R latesttag -r 0 -T esc \ |
|
3125 | $ hg log -R latesttag -r 0 -T esc \ | |
3126 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3126 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3127 | > |
|
3127 | > | |
3128 | <>\n<[> |
|
3128 | <>\n<[> | |
3129 | <>\n<]> |
|
3129 | <>\n<]> | |
3130 | <>\n< |
|
3130 | <>\n< | |
3131 |
|
3131 | |||
3132 | $ cat <<'EOF' > esctmpl |
|
3132 | $ cat <<'EOF' > esctmpl | |
3133 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3133 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3134 | > EOF |
|
3134 | > EOF | |
3135 | $ hg log -R latesttag -r 0 --style ./esctmpl |
|
3135 | $ hg log -R latesttag -r 0 --style ./esctmpl | |
3136 | > |
|
3136 | > | |
3137 | <>\n<[> |
|
3137 | <>\n<[> | |
3138 | <>\n<]> |
|
3138 | <>\n<]> | |
3139 | <>\n< |
|
3139 | <>\n< | |
3140 |
|
3140 | |||
3141 | Test string escaping of quotes: |
|
3141 | Test string escaping of quotes: | |
3142 |
|
3142 | |||
3143 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
3143 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3144 | " |
|
3144 | " | |
3145 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
3145 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3146 | \" |
|
3146 | \" | |
3147 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
3147 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3148 | \" |
|
3148 | \" | |
3149 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
3149 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3150 | \\\" |
|
3150 | \\\" | |
3151 |
|
3151 | |||
3152 |
|
3152 | |||
3153 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
3153 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3154 | " |
|
3154 | " | |
3155 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
3155 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3156 | \" |
|
3156 | \" | |
3157 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
3157 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3158 | \" |
|
3158 | \" | |
3159 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
3159 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3160 | \\\" |
|
3160 | \\\" | |
3161 |
|
3161 | |||
3162 | Test exception in quoted template. single backslash before quotation mark is |
|
3162 | Test exception in quoted template. single backslash before quotation mark is | |
3163 | stripped before parsing: |
|
3163 | stripped before parsing: | |
3164 |
|
3164 | |||
3165 | $ cat <<'EOF' > escquotetmpl |
|
3165 | $ cat <<'EOF' > escquotetmpl | |
3166 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" |
|
3166 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" | |
3167 | > EOF |
|
3167 | > EOF | |
3168 | $ cd latesttag |
|
3168 | $ cd latesttag | |
3169 | $ hg log -r 2 --style ../escquotetmpl |
|
3169 | $ hg log -r 2 --style ../escquotetmpl | |
3170 | " \" \" \\" head1 |
|
3170 | " \" \" \\" head1 | |
3171 |
|
3171 | |||
3172 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' |
|
3172 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' | |
3173 | valid |
|
3173 | valid | |
3174 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" |
|
3174 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" | |
3175 | valid |
|
3175 | valid | |
3176 |
|
3176 | |||
3177 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested |
|
3177 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested | |
3178 | _evalifliteral() templates (issue4733): |
|
3178 | _evalifliteral() templates (issue4733): | |
3179 |
|
3179 | |||
3180 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' |
|
3180 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' | |
3181 | "2 |
|
3181 | "2 | |
3182 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' |
|
3182 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' | |
3183 | "2 |
|
3183 | "2 | |
3184 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' |
|
3184 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' | |
3185 | "2 |
|
3185 | "2 | |
3186 |
|
3186 | |||
3187 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' |
|
3187 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' | |
3188 | \" |
|
3188 | \" | |
3189 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' |
|
3189 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' | |
3190 | \" |
|
3190 | \" | |
3191 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
3191 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3192 | \" |
|
3192 | \" | |
3193 |
|
3193 | |||
3194 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' |
|
3194 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' | |
3195 | \\\" |
|
3195 | \\\" | |
3196 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' |
|
3196 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' | |
3197 | \\\" |
|
3197 | \\\" | |
3198 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
3198 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3199 | \\\" |
|
3199 | \\\" | |
3200 |
|
3200 | |||
3201 | escaped single quotes and errors: |
|
3201 | escaped single quotes and errors: | |
3202 |
|
3202 | |||
3203 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' |
|
3203 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' | |
3204 | foo |
|
3204 | foo | |
3205 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' |
|
3205 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' | |
3206 | foo |
|
3206 | foo | |
3207 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' |
|
3207 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' | |
3208 | hg: parse error at 21: unterminated string |
|
3208 | hg: parse error at 21: unterminated string | |
3209 | [255] |
|
3209 | [255] | |
3210 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' |
|
3210 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' | |
3211 | hg: parse error: trailing \ in string |
|
3211 | hg: parse error: trailing \ in string | |
3212 | [255] |
|
3212 | [255] | |
3213 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' |
|
3213 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' | |
3214 | hg: parse error: trailing \ in string |
|
3214 | hg: parse error: trailing \ in string | |
3215 | [255] |
|
3215 | [255] | |
3216 |
|
3216 | |||
3217 | $ cd .. |
|
3217 | $ cd .. | |
3218 |
|
3218 | |||
3219 | Test leading backslashes: |
|
3219 | Test leading backslashes: | |
3220 |
|
3220 | |||
3221 | $ cd latesttag |
|
3221 | $ cd latesttag | |
3222 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' |
|
3222 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' | |
3223 | {rev} {file} |
|
3223 | {rev} {file} | |
3224 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' |
|
3224 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' | |
3225 | \2 \head1 |
|
3225 | \2 \head1 | |
3226 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' |
|
3226 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' | |
3227 | \{rev} \{file} |
|
3227 | \{rev} \{file} | |
3228 | $ cd .. |
|
3228 | $ cd .. | |
3229 |
|
3229 | |||
3230 | Test leading backslashes in "if" expression (issue4714): |
|
3230 | Test leading backslashes in "if" expression (issue4714): | |
3231 |
|
3231 | |||
3232 | $ cd latesttag |
|
3232 | $ cd latesttag | |
3233 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' |
|
3233 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' | |
3234 | {rev} \{rev} |
|
3234 | {rev} \{rev} | |
3235 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' |
|
3235 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' | |
3236 | \2 \\{rev} |
|
3236 | \2 \\{rev} | |
3237 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' |
|
3237 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' | |
3238 | \{rev} \\\{rev} |
|
3238 | \{rev} \\\{rev} | |
3239 | $ cd .. |
|
3239 | $ cd .. | |
3240 |
|
3240 | |||
3241 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) |
|
3241 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) | |
3242 |
|
3242 | |||
3243 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' |
|
3243 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' | |
3244 | \x6e |
|
3244 | \x6e | |
3245 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' |
|
3245 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' | |
3246 | \x5c\x786e |
|
3246 | \x5c\x786e | |
3247 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' |
|
3247 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' | |
3248 | \x6e |
|
3248 | \x6e | |
3249 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' |
|
3249 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' | |
3250 | \x5c\x786e |
|
3250 | \x5c\x786e | |
3251 |
|
3251 | |||
3252 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' |
|
3252 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' | |
3253 | \x6e |
|
3253 | \x6e | |
3254 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' |
|
3254 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' | |
3255 | \x5c\x786e |
|
3255 | \x5c\x786e | |
3256 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' |
|
3256 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' | |
3257 | \x6e |
|
3257 | \x6e | |
3258 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' |
|
3258 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' | |
3259 | \x5c\x786e |
|
3259 | \x5c\x786e | |
3260 |
|
3260 | |||
3261 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' |
|
3261 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' | |
3262 | fourth |
|
3262 | fourth | |
3263 | second |
|
3263 | second | |
3264 | third |
|
3264 | third | |
3265 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' |
|
3265 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' | |
3266 | fourth\nsecond\nthird |
|
3266 | fourth\nsecond\nthird | |
3267 |
|
3267 | |||
3268 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' |
|
3268 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' | |
3269 | <p> |
|
3269 | <p> | |
3270 | 1st |
|
3270 | 1st | |
3271 | </p> |
|
3271 | </p> | |
3272 | <p> |
|
3272 | <p> | |
3273 | 2nd |
|
3273 | 2nd | |
3274 | </p> |
|
3274 | </p> | |
3275 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' |
|
3275 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' | |
3276 | <p> |
|
3276 | <p> | |
3277 | 1st\n\n2nd |
|
3277 | 1st\n\n2nd | |
3278 | </p> |
|
3278 | </p> | |
3279 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' |
|
3279 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' | |
3280 | 1st |
|
3280 | 1st | |
3281 |
|
3281 | |||
3282 | 2nd |
|
3282 | 2nd | |
3283 |
|
3283 | |||
3284 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' |
|
3284 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' | |
3285 | o perso |
|
3285 | o perso | |
3286 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' |
|
3286 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' | |
3287 | no person |
|
3287 | no person | |
3288 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' |
|
3288 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' | |
3289 | o perso |
|
3289 | o perso | |
3290 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' |
|
3290 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' | |
3291 | no perso |
|
3291 | no perso | |
3292 |
|
3292 | |||
3293 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' |
|
3293 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' | |
3294 | -o perso- |
|
3294 | -o perso- | |
3295 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' |
|
3295 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' | |
3296 | no person |
|
3296 | no person | |
3297 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' |
|
3297 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' | |
3298 | \x2do perso\x2d |
|
3298 | \x2do perso\x2d | |
3299 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' |
|
3299 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' | |
3300 | -o perso- |
|
3300 | -o perso- | |
3301 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' |
|
3301 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' | |
3302 | \x2do perso\x6e |
|
3302 | \x2do perso\x6e | |
3303 |
|
3303 | |||
3304 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' |
|
3304 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' | |
3305 | fourth |
|
3305 | fourth | |
3306 | second |
|
3306 | second | |
3307 | third |
|
3307 | third | |
3308 |
|
3308 | |||
3309 | Test string escaping in nested expression: |
|
3309 | Test string escaping in nested expression: | |
3310 |
|
3310 | |||
3311 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' |
|
3311 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' | |
3312 | fourth\x6esecond\x6ethird |
|
3312 | fourth\x6esecond\x6ethird | |
3313 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' |
|
3313 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' | |
3314 | fourth\x6esecond\x6ethird |
|
3314 | fourth\x6esecond\x6ethird | |
3315 |
|
3315 | |||
3316 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' |
|
3316 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' | |
3317 | fourth\x6esecond\x6ethird |
|
3317 | fourth\x6esecond\x6ethird | |
3318 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' |
|
3318 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' | |
3319 | fourth\x5c\x786esecond\x5c\x786ethird |
|
3319 | fourth\x5c\x786esecond\x5c\x786ethird | |
3320 |
|
3320 | |||
3321 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' |
|
3321 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' | |
3322 | 3:\x6eo user, \x6eo domai\x6e |
|
3322 | 3:\x6eo user, \x6eo domai\x6e | |
3323 | 4:\x5c\x786eew bra\x5c\x786ech |
|
3323 | 4:\x5c\x786eew bra\x5c\x786ech | |
3324 |
|
3324 | |||
3325 | Test quotes in nested expression are evaluated just like a $(command) |
|
3325 | Test quotes in nested expression are evaluated just like a $(command) | |
3326 | substitution in POSIX shells: |
|
3326 | substitution in POSIX shells: | |
3327 |
|
3327 | |||
3328 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' |
|
3328 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' | |
3329 | 8:95c24699272e |
|
3329 | 8:95c24699272e | |
3330 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' |
|
3330 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' | |
3331 | {8} "95c24699272e" |
|
3331 | {8} "95c24699272e" | |
3332 |
|
3332 | |||
3333 | Test recursive evaluation: |
|
3333 | Test recursive evaluation: | |
3334 |
|
3334 | |||
3335 | $ hg init r |
|
3335 | $ hg init r | |
3336 | $ cd r |
|
3336 | $ cd r | |
3337 | $ echo a > a |
|
3337 | $ echo a > a | |
3338 | $ hg ci -Am '{rev}' |
|
3338 | $ hg ci -Am '{rev}' | |
3339 | adding a |
|
3339 | adding a | |
3340 | $ hg log -r 0 --template '{if(rev, desc)}\n' |
|
3340 | $ hg log -r 0 --template '{if(rev, desc)}\n' | |
3341 | {rev} |
|
3341 | {rev} | |
3342 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' |
|
3342 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' | |
3343 | test 0 |
|
3343 | test 0 | |
3344 |
|
3344 | |||
3345 | $ hg branch -q 'text.{rev}' |
|
3345 | $ hg branch -q 'text.{rev}' | |
3346 | $ echo aa >> aa |
|
3346 | $ echo aa >> aa | |
3347 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' |
|
3347 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' | |
3348 |
|
3348 | |||
3349 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' |
|
3349 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' | |
3350 | {node|short}desc to |
|
3350 | {node|short}desc to | |
3351 | text.{rev}be wrapped |
|
3351 | text.{rev}be wrapped | |
3352 | text.{rev}desc to be |
|
3352 | text.{rev}desc to be | |
3353 | text.{rev}wrapped (no-eol) |
|
3353 | text.{rev}wrapped (no-eol) | |
3354 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' |
|
3354 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' | |
3355 | bcc7ff960b8e:desc to |
|
3355 | bcc7ff960b8e:desc to | |
3356 | text.1:be wrapped |
|
3356 | text.1:be wrapped | |
3357 | text.1:desc to be |
|
3357 | text.1:desc to be | |
3358 | text.1:wrapped (no-eol) |
|
3358 | text.1:wrapped (no-eol) | |
3359 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' |
|
3359 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' | |
3360 | hg: parse error: fill expects an integer width |
|
3360 | hg: parse error: fill expects an integer width | |
3361 | [255] |
|
3361 | [255] | |
3362 |
|
3362 | |||
3363 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' |
|
3363 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' | |
3364 | bcc7ff960b8e:desc to be |
|
3364 | bcc7ff960b8e:desc to be | |
3365 | termwidth.1:wrapped desc |
|
3365 | termwidth.1:wrapped desc | |
3366 | termwidth.1:to be wrapped (no-eol) |
|
3366 | termwidth.1:to be wrapped (no-eol) | |
3367 |
|
3367 | |||
3368 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
3368 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' | |
3369 | {node|short} (no-eol) |
|
3369 | {node|short} (no-eol) | |
3370 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' |
|
3370 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' | |
3371 | bcc-ff---b-e (no-eol) |
|
3371 | bcc-ff---b-e (no-eol) | |
3372 |
|
3372 | |||
3373 | $ cat >> .hg/hgrc <<EOF |
|
3373 | $ cat >> .hg/hgrc <<EOF | |
3374 | > [extensions] |
|
3374 | > [extensions] | |
3375 | > color= |
|
3375 | > color= | |
3376 | > [color] |
|
3376 | > [color] | |
3377 | > mode=ansi |
|
3377 | > mode=ansi | |
3378 | > text.{rev} = red |
|
3378 | > text.{rev} = red | |
3379 | > text.1 = green |
|
3379 | > text.1 = green | |
3380 | > EOF |
|
3380 | > EOF | |
3381 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' |
|
3381 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' | |
3382 | \x1b[0;31mtext\x1b[0m (esc) |
|
3382 | \x1b[0;31mtext\x1b[0m (esc) | |
3383 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' |
|
3383 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' | |
3384 | \x1b[0;32mtext\x1b[0m (esc) |
|
3384 | \x1b[0;32mtext\x1b[0m (esc) | |
3385 |
|
3385 | |||
3386 | color effect can be specified without quoting: |
|
3386 | color effect can be specified without quoting: | |
3387 |
|
3387 | |||
3388 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' |
|
3388 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' | |
3389 | \x1b[0;31mtext\x1b[0m (esc) |
|
3389 | \x1b[0;31mtext\x1b[0m (esc) | |
3390 |
|
3390 | |||
3391 | color effects can be nested (issue5413) |
|
3391 | color effects can be nested (issue5413) | |
3392 |
|
3392 | |||
3393 | $ hg debugtemplate --color=always \ |
|
3393 | $ hg debugtemplate --color=always \ | |
3394 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' |
|
3394 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' | |
3395 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) |
|
3395 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) | |
3396 |
|
3396 | |||
3397 | pad() should interact well with color codes (issue5416) |
|
3397 | pad() should interact well with color codes (issue5416) | |
3398 |
|
3398 | |||
3399 | $ hg debugtemplate --color=always \ |
|
3399 | $ hg debugtemplate --color=always \ | |
3400 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' |
|
3400 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' | |
3401 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) |
|
3401 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) | |
3402 |
|
3402 | |||
3403 | label should be no-op if color is disabled: |
|
3403 | label should be no-op if color is disabled: | |
3404 |
|
3404 | |||
3405 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' |
|
3405 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' | |
3406 | text |
|
3406 | text | |
3407 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' |
|
3407 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' | |
3408 | text |
|
3408 | text | |
3409 |
|
3409 | |||
3410 | Test branches inside if statement: |
|
3410 | Test branches inside if statement: | |
3411 |
|
3411 | |||
3412 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' |
|
3412 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' | |
3413 | no |
|
3413 | no | |
3414 |
|
3414 | |||
3415 | Test dict constructor: |
|
3415 | Test dict constructor: | |
3416 |
|
3416 | |||
3417 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' |
|
3417 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' | |
3418 | y=f7769ec2ab97 x=0 |
|
3418 | y=f7769ec2ab97 x=0 | |
3419 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' |
|
3419 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' | |
3420 | x=0 |
|
3420 | x=0 | |
3421 | y=f7769ec2ab97 |
|
3421 | y=f7769ec2ab97 | |
3422 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' |
|
3422 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' | |
3423 | {"x": 0, "y": "f7769ec2ab97"} |
|
3423 | {"x": 0, "y": "f7769ec2ab97"} | |
3424 | $ hg log -r 0 -T '{dict()|json}\n' |
|
3424 | $ hg log -r 0 -T '{dict()|json}\n' | |
3425 | {} |
|
3425 | {} | |
3426 |
|
3426 | |||
3427 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' |
|
3427 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' | |
3428 | rev=0 node=f7769ec2ab97 |
|
3428 | rev=0 node=f7769ec2ab97 | |
3429 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' |
|
3429 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' | |
3430 | rev=0 node=f7769ec2ab97 |
|
3430 | rev=0 node=f7769ec2ab97 | |
3431 |
|
3431 | |||
3432 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' |
|
3432 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' | |
3433 | hg: parse error: duplicated dict key 'rev' inferred |
|
3433 | hg: parse error: duplicated dict key 'rev' inferred | |
3434 | [255] |
|
3434 | [255] | |
3435 | $ hg log -r 0 -T '{dict(node, node|short)}\n' |
|
3435 | $ hg log -r 0 -T '{dict(node, node|short)}\n' | |
3436 | hg: parse error: duplicated dict key 'node' inferred |
|
3436 | hg: parse error: duplicated dict key 'node' inferred | |
3437 | [255] |
|
3437 | [255] | |
3438 | $ hg log -r 0 -T '{dict(1 + 2)}' |
|
3438 | $ hg log -r 0 -T '{dict(1 + 2)}' | |
3439 | hg: parse error: dict key cannot be inferred |
|
3439 | hg: parse error: dict key cannot be inferred | |
3440 | [255] |
|
3440 | [255] | |
3441 |
|
3441 | |||
3442 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' |
|
3442 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' | |
3443 | hg: parse error: dict got multiple values for keyword argument 'x' |
|
3443 | hg: parse error: dict got multiple values for keyword argument 'x' | |
3444 | [255] |
|
3444 | [255] | |
3445 |
|
3445 | |||
3446 | Test get function: |
|
3446 | Test get function: | |
3447 |
|
3447 | |||
3448 | $ hg log -r 0 --template '{get(extras, "branch")}\n' |
|
3448 | $ hg log -r 0 --template '{get(extras, "branch")}\n' | |
3449 | default |
|
3449 | default | |
3450 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' |
|
3450 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' | |
3451 | default |
|
3451 | default | |
3452 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' |
|
3452 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' | |
3453 | hg: parse error: get() expects a dict as first argument |
|
3453 | hg: parse error: get() expects a dict as first argument | |
3454 | [255] |
|
3454 | [255] | |
3455 |
|
3455 | |||
3456 | Test json filter applied to hybrid object: |
|
3456 | Test json filter applied to hybrid object: | |
3457 |
|
3457 | |||
3458 | $ hg log -r0 -T '{files|json}\n' |
|
3458 | $ hg log -r0 -T '{files|json}\n' | |
3459 | ["a"] |
|
3459 | ["a"] | |
3460 | $ hg log -r0 -T '{extras|json}\n' |
|
3460 | $ hg log -r0 -T '{extras|json}\n' | |
3461 | {"branch": "default"} |
|
3461 | {"branch": "default"} | |
3462 |
|
3462 | |||
3463 | Test localdate(date, tz) function: |
|
3463 | Test localdate(date, tz) function: | |
3464 |
|
3464 | |||
3465 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' |
|
3465 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' | |
3466 | 1970-01-01 09:00 +0900 |
|
3466 | 1970-01-01 09:00 +0900 | |
3467 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' |
|
3467 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' | |
3468 | 1970-01-01 00:00 +0000 |
|
3468 | 1970-01-01 00:00 +0000 | |
3469 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' |
|
3469 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' | |
3470 | hg: parse error: localdate expects a timezone |
|
3470 | hg: parse error: localdate expects a timezone | |
3471 | [255] |
|
3471 | [255] | |
3472 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' |
|
3472 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' | |
3473 | 1970-01-01 02:00 +0200 |
|
3473 | 1970-01-01 02:00 +0200 | |
3474 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' |
|
3474 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' | |
3475 | 1970-01-01 00:00 +0000 |
|
3475 | 1970-01-01 00:00 +0000 | |
3476 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' |
|
3476 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' | |
3477 | 1970-01-01 00:00 +0000 |
|
3477 | 1970-01-01 00:00 +0000 | |
3478 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' |
|
3478 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' | |
3479 | hg: parse error: localdate expects a timezone |
|
3479 | hg: parse error: localdate expects a timezone | |
3480 | [255] |
|
3480 | [255] | |
3481 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' |
|
3481 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' | |
3482 | hg: parse error: localdate expects a timezone |
|
3482 | hg: parse error: localdate expects a timezone | |
3483 | [255] |
|
3483 | [255] | |
3484 |
|
3484 | |||
3485 | Test shortest(node) function: |
|
3485 | Test shortest(node) function: | |
3486 |
|
3486 | |||
3487 | $ echo b > b |
|
3487 | $ echo b > b | |
3488 | $ hg ci -qAm b |
|
3488 | $ hg ci -qAm b | |
3489 | $ hg log --template '{shortest(node)}\n' |
|
3489 | $ hg log --template '{shortest(node)}\n' | |
3490 | e777 |
|
3490 | e777 | |
3491 | bcc7 |
|
3491 | bcc7 | |
3492 | f776 |
|
3492 | f776 | |
3493 | $ hg log --template '{shortest(node, 10)}\n' |
|
3493 | $ hg log --template '{shortest(node, 10)}\n' | |
3494 | e777603221 |
|
3494 | e777603221 | |
3495 | bcc7ff960b |
|
3495 | bcc7ff960b | |
3496 | f7769ec2ab |
|
3496 | f7769ec2ab | |
3497 | $ hg log --template '{node|shortest}\n' -l1 |
|
3497 | $ hg log --template '{node|shortest}\n' -l1 | |
3498 | e777 |
|
3498 | e777 | |
3499 |
|
3499 | |||
3500 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' |
|
3500 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' | |
3501 | f7769ec2ab |
|
3501 | f7769ec2ab | |
3502 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' |
|
3502 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' | |
3503 | hg: parse error: shortest() expects an integer minlength |
|
3503 | hg: parse error: shortest() expects an integer minlength | |
3504 | [255] |
|
3504 | [255] | |
3505 |
|
3505 | |||
3506 | $ cd .. |
|
3506 | $ cd .. | |
3507 |
|
3507 | |||
3508 | Test shortest(node) with the repo having short hash collision: |
|
3508 | Test shortest(node) with the repo having short hash collision: | |
3509 |
|
3509 | |||
3510 | $ hg init hashcollision |
|
3510 | $ hg init hashcollision | |
3511 | $ cd hashcollision |
|
3511 | $ cd hashcollision | |
3512 | $ cat <<EOF >> .hg/hgrc |
|
3512 | $ cat <<EOF >> .hg/hgrc | |
3513 | > [experimental] |
|
3513 | > [experimental] | |
3514 | > evolution = createmarkers |
|
3514 | > evolution = createmarkers | |
3515 | > EOF |
|
3515 | > EOF | |
3516 | $ echo 0 > a |
|
3516 | $ echo 0 > a | |
3517 | $ hg ci -qAm 0 |
|
3517 | $ hg ci -qAm 0 | |
3518 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do |
|
3518 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do | |
3519 | > hg up -q 0 |
|
3519 | > hg up -q 0 | |
3520 | > echo $i > a |
|
3520 | > echo $i > a | |
3521 | > hg ci -qm $i |
|
3521 | > hg ci -qm $i | |
3522 | > done |
|
3522 | > done | |
3523 | $ hg up -q null |
|
3523 | $ hg up -q null | |
3524 | $ hg log -r0: -T '{rev}:{node}\n' |
|
3524 | $ hg log -r0: -T '{rev}:{node}\n' | |
3525 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a |
|
3525 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a | |
3526 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc |
|
3526 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc | |
3527 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 |
|
3527 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 | |
3528 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 |
|
3528 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 | |
3529 | 4:10776689e627b465361ad5c296a20a487e153ca4 |
|
3529 | 4:10776689e627b465361ad5c296a20a487e153ca4 | |
3530 | 5:a00be79088084cb3aff086ab799f8790e01a976b |
|
3530 | 5:a00be79088084cb3aff086ab799f8790e01a976b | |
3531 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 |
|
3531 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 | |
3532 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d |
|
3532 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d | |
3533 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a |
|
3533 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a | |
3534 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
3534 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
3535 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
3535 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f | |
3536 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b |
|
3536 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b | |
3537 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
3537 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
3538 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
3538 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f | |
3539 |
|
3539 | |||
3540 | nodes starting with '11' (we don't have the revision number '11' though) |
|
3540 | nodes starting with '11' (we don't have the revision number '11' though) | |
3541 |
|
3541 | |||
3542 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' |
|
3542 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' | |
3543 | 1:1142 |
|
3543 | 1:1142 | |
3544 | 2:1140 |
|
3544 | 2:1140 | |
3545 | 3:11d |
|
3545 | 3:11d | |
3546 |
|
3546 | |||
3547 | '5:a00' is hidden, but still we have two nodes starting with 'a0' |
|
3547 | '5:a00' is hidden, but still we have two nodes starting with 'a0' | |
3548 |
|
3548 | |||
3549 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' |
|
3549 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' | |
3550 | 6:a0b |
|
3550 | 6:a0b | |
3551 | 7:a04 |
|
3551 | 7:a04 | |
3552 |
|
3552 | |||
3553 | node '10' conflicts with the revision number '10' even if it is hidden |
|
3553 | node '10' conflicts with the revision number '10' even if it is hidden | |
3554 | (we could exclude hidden revision numbers, but currently we don't) |
|
3554 | (we could exclude hidden revision numbers, but currently we don't) | |
3555 |
|
3555 | |||
3556 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' |
|
3556 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' | |
3557 | 4:107 |
|
3557 | 4:107 | |
3558 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden |
|
3558 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden | |
3559 | 4:107 |
|
3559 | 4:107 | |
3560 |
|
3560 | |||
3561 | node 'c562' should be unique if the other 'c562' nodes are hidden |
|
3561 | node 'c562' should be unique if the other 'c562' nodes are hidden | |
3562 | (but we don't try the slow path to filter out hidden nodes for now) |
|
3562 | (but we don't try the slow path to filter out hidden nodes for now) | |
3563 |
|
3563 | |||
3564 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' |
|
3564 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' | |
3565 | 8:c5625 |
|
3565 | 8:c5625 | |
3566 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden |
|
3566 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden | |
3567 | 8:c5625 |
|
3567 | 8:c5625 | |
3568 | 9:c5623 |
|
3568 | 9:c5623 | |
3569 | 10:c562d |
|
3569 | 10:c562d | |
3570 |
|
3570 | |||
3571 | $ cd .. |
|
3571 | $ cd .. | |
3572 |
|
3572 | |||
3573 | Test pad function |
|
3573 | Test pad function | |
3574 |
|
3574 | |||
3575 | $ cd r |
|
3575 | $ cd r | |
3576 |
|
3576 | |||
3577 | $ hg log --template '{pad(rev, 20)} {author|user}\n' |
|
3577 | $ hg log --template '{pad(rev, 20)} {author|user}\n' | |
3578 | 2 test |
|
3578 | 2 test | |
3579 | 1 {node|short} |
|
3579 | 1 {node|short} | |
3580 | 0 test |
|
3580 | 0 test | |
3581 |
|
3581 | |||
3582 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' |
|
3582 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' | |
3583 | 2 test |
|
3583 | 2 test | |
3584 | 1 {node|short} |
|
3584 | 1 {node|short} | |
3585 | 0 test |
|
3585 | 0 test | |
3586 |
|
3586 | |||
3587 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' |
|
3587 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' | |
3588 | 2------------------- test |
|
3588 | 2------------------- test | |
3589 | 1------------------- {node|short} |
|
3589 | 1------------------- {node|short} | |
3590 | 0------------------- test |
|
3590 | 0------------------- test | |
3591 |
|
3591 | |||
3592 | Test template string in pad function |
|
3592 | Test template string in pad function | |
3593 |
|
3593 | |||
3594 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' |
|
3594 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' | |
3595 | {0} test |
|
3595 | {0} test | |
3596 |
|
3596 | |||
3597 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' |
|
3597 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' | |
3598 | \{rev} test |
|
3598 | \{rev} test | |
3599 |
|
3599 | |||
3600 | Test width argument passed to pad function |
|
3600 | Test width argument passed to pad function | |
3601 |
|
3601 | |||
3602 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' |
|
3602 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' | |
3603 | 0 test |
|
3603 | 0 test | |
3604 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' |
|
3604 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' | |
3605 | hg: parse error: pad() expects an integer width |
|
3605 | hg: parse error: pad() expects an integer width | |
3606 | [255] |
|
3606 | [255] | |
3607 |
|
3607 | |||
3608 | Test invalid fillchar passed to pad function |
|
3608 | Test invalid fillchar passed to pad function | |
3609 |
|
3609 | |||
3610 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' |
|
3610 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' | |
3611 | hg: parse error: pad() expects a single fill character |
|
3611 | hg: parse error: pad() expects a single fill character | |
3612 | [255] |
|
3612 | [255] | |
3613 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' |
|
3613 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' | |
3614 | hg: parse error: pad() expects a single fill character |
|
3614 | hg: parse error: pad() expects a single fill character | |
3615 | [255] |
|
3615 | [255] | |
3616 |
|
3616 | |||
3617 | Test boolean argument passed to pad function |
|
3617 | Test boolean argument passed to pad function | |
3618 |
|
3618 | |||
3619 | no crash |
|
3619 | no crash | |
3620 |
|
3620 | |||
3621 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' |
|
3621 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' | |
3622 | ---------0 |
|
3622 | ---------0 | |
3623 |
|
3623 | |||
3624 | string/literal |
|
3624 | string/literal | |
3625 |
|
3625 | |||
3626 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' |
|
3626 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' | |
3627 | ---------0 |
|
3627 | ---------0 | |
3628 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' |
|
3628 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' | |
3629 | 0--------- |
|
3629 | 0--------- | |
3630 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' |
|
3630 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' | |
3631 | 0--------- |
|
3631 | 0--------- | |
3632 |
|
3632 | |||
3633 | unknown keyword is evaluated to '' |
|
3633 | unknown keyword is evaluated to '' | |
3634 |
|
3634 | |||
3635 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' |
|
3635 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' | |
3636 | 0--------- |
|
3636 | 0--------- | |
3637 |
|
3637 | |||
3638 | Test separate function |
|
3638 | Test separate function | |
3639 |
|
3639 | |||
3640 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' |
|
3640 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' | |
3641 | a-b-c |
|
3641 | a-b-c | |
3642 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' |
|
3642 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' | |
3643 | 0:f7769ec2ab97 test default |
|
3643 | 0:f7769ec2ab97 test default | |
3644 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' |
|
3644 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' | |
3645 | a \x1b[0;31mb\x1b[0m c d (esc) |
|
3645 | a \x1b[0;31mb\x1b[0m c d (esc) | |
3646 |
|
3646 | |||
3647 | Test boolean expression/literal passed to if function |
|
3647 | Test boolean expression/literal passed to if function | |
3648 |
|
3648 | |||
3649 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' |
|
3649 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' | |
3650 | rev 0 is True |
|
3650 | rev 0 is True | |
3651 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' |
|
3651 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' | |
3652 | literal 0 is True as well |
|
3652 | literal 0 is True as well | |
3653 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' |
|
3653 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' | |
3654 | empty string is False |
|
3654 | empty string is False | |
3655 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' |
|
3655 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' | |
3656 | empty list is False |
|
3656 | empty list is False | |
3657 | $ hg log -r 0 -T '{if(true, "true is True")}\n' |
|
3657 | $ hg log -r 0 -T '{if(true, "true is True")}\n' | |
3658 | true is True |
|
3658 | true is True | |
3659 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' |
|
3659 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' | |
3660 | false is False |
|
3660 | false is False | |
3661 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' |
|
3661 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' | |
3662 | non-empty string is True |
|
3662 | non-empty string is True | |
3663 |
|
3663 | |||
3664 | Test ifcontains function |
|
3664 | Test ifcontains function | |
3665 |
|
3665 | |||
3666 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' |
|
3666 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' | |
3667 | 2 is in the string |
|
3667 | 2 is in the string | |
3668 | 1 is not |
|
3668 | 1 is not | |
3669 | 0 is in the string |
|
3669 | 0 is in the string | |
3670 |
|
3670 | |||
3671 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' |
|
3671 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' | |
3672 | 2 is in the string |
|
3672 | 2 is in the string | |
3673 | 1 is not |
|
3673 | 1 is not | |
3674 | 0 is in the string |
|
3674 | 0 is in the string | |
3675 |
|
3675 | |||
3676 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' |
|
3676 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' | |
3677 | 2 did not add a |
|
3677 | 2 did not add a | |
3678 | 1 did not add a |
|
3678 | 1 did not add a | |
3679 | 0 added a |
|
3679 | 0 added a | |
3680 |
|
3680 | |||
3681 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' |
|
3681 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' | |
3682 | 2 is parent of 1 |
|
3682 | 2 is parent of 1 | |
3683 | 1 |
|
3683 | 1 | |
3684 | 0 |
|
3684 | 0 | |
3685 |
|
3685 | |||
3686 | Test revset function |
|
3686 | Test revset function | |
3687 |
|
3687 | |||
3688 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' |
|
3688 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' | |
3689 | 2 current rev |
|
3689 | 2 current rev | |
3690 | 1 not current rev |
|
3690 | 1 not current rev | |
3691 | 0 not current rev |
|
3691 | 0 not current rev | |
3692 |
|
3692 | |||
3693 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' |
|
3693 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' | |
3694 | 2 match rev |
|
3694 | 2 match rev | |
3695 | 1 match rev |
|
3695 | 1 match rev | |
3696 | 0 not match rev |
|
3696 | 0 not match rev | |
3697 |
|
3697 | |||
3698 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' |
|
3698 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' | |
3699 | 2 Parents: 1 |
|
3699 | 2 Parents: 1 | |
3700 | 1 Parents: 0 |
|
3700 | 1 Parents: 0 | |
3701 | 0 Parents: |
|
3701 | 0 Parents: | |
3702 |
|
3702 | |||
3703 | $ cat >> .hg/hgrc <<EOF |
|
3703 | $ cat >> .hg/hgrc <<EOF | |
3704 | > [revsetalias] |
|
3704 | > [revsetalias] | |
3705 | > myparents(\$1) = parents(\$1) |
|
3705 | > myparents(\$1) = parents(\$1) | |
3706 | > EOF |
|
3706 | > EOF | |
3707 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' |
|
3707 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' | |
3708 | 2 Parents: 1 |
|
3708 | 2 Parents: 1 | |
3709 | 1 Parents: 0 |
|
3709 | 1 Parents: 0 | |
3710 | 0 Parents: |
|
3710 | 0 Parents: | |
3711 |
|
3711 | |||
3712 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' |
|
3712 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' | |
3713 | Rev: 2 |
|
3713 | Rev: 2 | |
3714 | Ancestor: 0 |
|
3714 | Ancestor: 0 | |
3715 | Ancestor: 1 |
|
3715 | Ancestor: 1 | |
3716 | Ancestor: 2 |
|
3716 | Ancestor: 2 | |
3717 |
|
3717 | |||
3718 | Rev: 1 |
|
3718 | Rev: 1 | |
3719 | Ancestor: 0 |
|
3719 | Ancestor: 0 | |
3720 | Ancestor: 1 |
|
3720 | Ancestor: 1 | |
3721 |
|
3721 | |||
3722 | Rev: 0 |
|
3722 | Rev: 0 | |
3723 | Ancestor: 0 |
|
3723 | Ancestor: 0 | |
3724 |
|
3724 | |||
3725 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 |
|
3725 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 | |
3726 | 2 |
|
3726 | 2 | |
3727 |
|
3727 | |||
3728 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 |
|
3728 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 | |
3729 | 2 |
|
3729 | 2 | |
3730 |
|
3730 | |||
3731 | a list template is evaluated for each item of revset/parents |
|
3731 | a list template is evaluated for each item of revset/parents | |
3732 |
|
3732 | |||
3733 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' |
|
3733 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' | |
3734 | 2 p: 1:bcc7ff960b8e |
|
3734 | 2 p: 1:bcc7ff960b8e | |
3735 | 1 p: 0:f7769ec2ab97 |
|
3735 | 1 p: 0:f7769ec2ab97 | |
3736 | 0 p: |
|
3736 | 0 p: | |
3737 |
|
3737 | |||
3738 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' |
|
3738 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' | |
3739 | 2 p: 1:bcc7ff960b8e -1:000000000000 |
|
3739 | 2 p: 1:bcc7ff960b8e -1:000000000000 | |
3740 | 1 p: 0:f7769ec2ab97 -1:000000000000 |
|
3740 | 1 p: 0:f7769ec2ab97 -1:000000000000 | |
3741 | 0 p: -1:000000000000 -1:000000000000 |
|
3741 | 0 p: -1:000000000000 -1:000000000000 | |
3742 |
|
3742 | |||
3743 | therefore, 'revcache' should be recreated for each rev |
|
3743 | therefore, 'revcache' should be recreated for each rev | |
3744 |
|
3744 | |||
3745 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' |
|
3745 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' | |
3746 | 2 aa b |
|
3746 | 2 aa b | |
3747 | p |
|
3747 | p | |
3748 | 1 |
|
3748 | 1 | |
3749 | p a |
|
3749 | p a | |
3750 | 0 a |
|
3750 | 0 a | |
3751 | p |
|
3751 | p | |
3752 |
|
3752 | |||
3753 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' |
|
3753 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' | |
3754 | 2 aa b |
|
3754 | 2 aa b | |
3755 | p |
|
3755 | p | |
3756 | 1 |
|
3756 | 1 | |
3757 | p a |
|
3757 | p a | |
3758 | 0 a |
|
3758 | 0 a | |
3759 | p |
|
3759 | p | |
3760 |
|
3760 | |||
3761 | a revset item must be evaluated as an integer revision, not an offset from tip |
|
3761 | a revset item must be evaluated as an integer revision, not an offset from tip | |
3762 |
|
3762 | |||
3763 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' |
|
3763 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' | |
3764 | -1:000000000000 |
|
3764 | -1:000000000000 | |
3765 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' |
|
3765 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' | |
3766 | -1:000000000000 |
|
3766 | -1:000000000000 | |
3767 |
|
3767 | |||
3768 | join() should pick '{rev}' from revset items: |
|
3768 | join() should pick '{rev}' from revset items: | |
3769 |
|
3769 | |||
3770 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 |
|
3770 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 | |
3771 | 4, 5 |
|
3771 | 4, 5 | |
3772 |
|
3772 | |||
3773 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by |
|
3773 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by | |
3774 | default. join() should agree with the default formatting: |
|
3774 | default. join() should agree with the default formatting: | |
3775 |
|
3775 | |||
3776 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 |
|
3776 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 | |
3777 | 5:13207e5a10d9, 4:bbe44766e73d |
|
3777 | 5:13207e5a10d9, 4:bbe44766e73d | |
3778 |
|
3778 | |||
3779 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug |
|
3779 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug | |
3780 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, |
|
3780 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, | |
3781 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
3781 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
3782 |
|
3782 | |||
3783 | Test files function |
|
3783 | Test files function | |
3784 |
|
3784 | |||
3785 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" |
|
3785 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" | |
3786 | 2 |
|
3786 | 2 | |
3787 | a |
|
3787 | a | |
3788 | aa |
|
3788 | aa | |
3789 | b |
|
3789 | b | |
3790 | 1 |
|
3790 | 1 | |
3791 | a |
|
3791 | a | |
3792 | 0 |
|
3792 | 0 | |
3793 | a |
|
3793 | a | |
3794 |
|
3794 | |||
3795 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" |
|
3795 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" | |
3796 | 2 |
|
3796 | 2 | |
3797 | aa |
|
3797 | aa | |
3798 | 1 |
|
3798 | 1 | |
3799 |
|
3799 | |||
3800 | 0 |
|
3800 | 0 | |
3801 |
|
3801 | |||
3802 |
|
3802 | |||
3803 | Test relpath function |
|
3803 | Test relpath function | |
3804 |
|
3804 | |||
3805 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' |
|
3805 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' | |
3806 | a |
|
3806 | a | |
3807 | $ cd .. |
|
3807 | $ cd .. | |
3808 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' |
|
3808 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' | |
3809 | r/a |
|
3809 | r/a | |
3810 | $ cd r |
|
3810 | $ cd r | |
3811 |
|
3811 | |||
3812 | Test active bookmark templating |
|
3812 | Test active bookmark templating | |
3813 |
|
3813 | |||
3814 | $ hg book foo |
|
3814 | $ hg book foo | |
3815 | $ hg book bar |
|
3815 | $ hg book bar | |
3816 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" |
|
3816 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" | |
3817 | 2 bar* foo |
|
3817 | 2 bar* foo | |
3818 | 1 |
|
3818 | 1 | |
3819 | 0 |
|
3819 | 0 | |
3820 | $ hg log --template "{rev} {activebookmark}\n" |
|
3820 | $ hg log --template "{rev} {activebookmark}\n" | |
3821 | 2 bar |
|
3821 | 2 bar | |
3822 | 1 |
|
3822 | 1 | |
3823 | 0 |
|
3823 | 0 | |
3824 | $ hg bookmarks --inactive bar |
|
3824 | $ hg bookmarks --inactive bar | |
3825 | $ hg log --template "{rev} {activebookmark}\n" |
|
3825 | $ hg log --template "{rev} {activebookmark}\n" | |
3826 | 2 |
|
3826 | 2 | |
3827 | 1 |
|
3827 | 1 | |
3828 | 0 |
|
3828 | 0 | |
3829 | $ hg book -r1 baz |
|
3829 | $ hg book -r1 baz | |
3830 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" |
|
3830 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" | |
3831 | 2 bar foo |
|
3831 | 2 bar foo | |
3832 | 1 baz |
|
3832 | 1 baz | |
3833 | 0 |
|
3833 | 0 | |
3834 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" |
|
3834 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" | |
3835 | 2 t |
|
3835 | 2 t | |
3836 | 1 f |
|
3836 | 1 f | |
3837 | 0 f |
|
3837 | 0 f | |
3838 |
|
3838 | |||
3839 | Test namespaces dict |
|
3839 | Test namespaces dict | |
3840 |
|
3840 | |||
3841 | $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n' |
|
3841 | $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n' | |
3842 | 2 bookmarks=bar,foo tags=tip branches=text.{rev} |
|
3842 | 2 bookmarks=bar,foo tags=tip branches=text.{rev} | |
3843 | 1 bookmarks=baz tags= branches=text.{rev} |
|
3843 | 1 bookmarks=baz tags= branches=text.{rev} | |
3844 | 0 bookmarks= tags= branches=default |
|
3844 | 0 bookmarks= tags= branches=default | |
3845 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' |
|
3845 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' | |
3846 | bookmarks: bar foo |
|
3846 | bookmarks: bar foo | |
3847 | tags: tip |
|
3847 | tags: tip | |
3848 | branches: text.{rev} |
|
3848 | branches: text.{rev} | |
3849 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' |
|
3849 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' | |
3850 | bookmarks: |
|
3850 | bookmarks: | |
3851 | bar |
|
3851 | bar | |
3852 | foo |
|
3852 | foo | |
3853 | tags: |
|
3853 | tags: | |
3854 | tip |
|
3854 | tip | |
3855 | branches: |
|
3855 | branches: | |
3856 | text.{rev} |
|
3856 | text.{rev} | |
3857 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' |
|
3857 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' | |
3858 | bar |
|
3858 | bar | |
3859 | foo |
|
3859 | foo | |
3860 |
|
3860 | |||
3861 | Test stringify on sub expressions |
|
3861 | Test stringify on sub expressions | |
3862 |
|
3862 | |||
3863 | $ cd .. |
|
3863 | $ cd .. | |
3864 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' |
|
3864 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' | |
3865 | fourth, second, third |
|
3865 | fourth, second, third | |
3866 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' |
|
3866 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' | |
3867 | abc |
|
3867 | abc | |
3868 |
|
3868 | |||
3869 | Test splitlines |
|
3869 | Test splitlines | |
3870 |
|
3870 | |||
3871 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" |
|
3871 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" | |
3872 | @ foo Modify, add, remove, rename |
|
3872 | @ foo Modify, add, remove, rename | |
3873 | | |
|
3873 | | | |
3874 | o foo future |
|
3874 | o foo future | |
3875 | | |
|
3875 | | | |
3876 | o foo third |
|
3876 | o foo third | |
3877 | | |
|
3877 | | | |
3878 | o foo second |
|
3878 | o foo second | |
3879 |
|
3879 | |||
3880 | o foo merge |
|
3880 | o foo merge | |
3881 | |\ |
|
3881 | |\ | |
3882 | | o foo new head |
|
3882 | | o foo new head | |
3883 | | | |
|
3883 | | | | |
3884 | o | foo new branch |
|
3884 | o | foo new branch | |
3885 | |/ |
|
3885 | |/ | |
3886 | o foo no user, no domain |
|
3886 | o foo no user, no domain | |
3887 | | |
|
3887 | | | |
3888 | o foo no person |
|
3888 | o foo no person | |
3889 | | |
|
3889 | | | |
3890 | o foo other 1 |
|
3890 | o foo other 1 | |
3891 | | foo other 2 |
|
3891 | | foo other 2 | |
3892 | | foo |
|
3892 | | foo | |
3893 | | foo other 3 |
|
3893 | | foo other 3 | |
3894 | o foo line 1 |
|
3894 | o foo line 1 | |
3895 | foo line 2 |
|
3895 | foo line 2 | |
3896 |
|
3896 | |||
|
3897 | $ hg log -R a -r0 -T '{desc|splitlines}\n' | |||
|
3898 | line 1 line 2 | |||
|
3899 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' | |||
|
3900 | line 1|line 2 | |||
|
3901 | ||||
3897 | Test startswith |
|
3902 | Test startswith | |
3898 | $ hg log -Gv -R a --template "{startswith(desc)}" |
|
3903 | $ hg log -Gv -R a --template "{startswith(desc)}" | |
3899 | hg: parse error: startswith expects two arguments |
|
3904 | hg: parse error: startswith expects two arguments | |
3900 | [255] |
|
3905 | [255] | |
3901 |
|
3906 | |||
3902 | $ hg log -Gv -R a --template "{startswith('line', desc)}" |
|
3907 | $ hg log -Gv -R a --template "{startswith('line', desc)}" | |
3903 | @ |
|
3908 | @ | |
3904 | | |
|
3909 | | | |
3905 | o |
|
3910 | o | |
3906 | | |
|
3911 | | | |
3907 | o |
|
3912 | o | |
3908 | | |
|
3913 | | | |
3909 | o |
|
3914 | o | |
3910 |
|
3915 | |||
3911 | o |
|
3916 | o | |
3912 | |\ |
|
3917 | |\ | |
3913 | | o |
|
3918 | | o | |
3914 | | | |
|
3919 | | | | |
3915 | o | |
|
3920 | o | | |
3916 | |/ |
|
3921 | |/ | |
3917 | o |
|
3922 | o | |
3918 | | |
|
3923 | | | |
3919 | o |
|
3924 | o | |
3920 | | |
|
3925 | | | |
3921 | o |
|
3926 | o | |
3922 | | |
|
3927 | | | |
3923 | o line 1 |
|
3928 | o line 1 | |
3924 | line 2 |
|
3929 | line 2 | |
3925 |
|
3930 | |||
3926 | Test bad template with better error message |
|
3931 | Test bad template with better error message | |
3927 |
|
3932 | |||
3928 | $ hg log -Gv -R a --template '{desc|user()}' |
|
3933 | $ hg log -Gv -R a --template '{desc|user()}' | |
3929 | hg: parse error: expected a symbol, got 'func' |
|
3934 | hg: parse error: expected a symbol, got 'func' | |
3930 | [255] |
|
3935 | [255] | |
3931 |
|
3936 | |||
3932 | Test word function (including index out of bounds graceful failure) |
|
3937 | Test word function (including index out of bounds graceful failure) | |
3933 |
|
3938 | |||
3934 | $ hg log -Gv -R a --template "{word('1', desc)}" |
|
3939 | $ hg log -Gv -R a --template "{word('1', desc)}" | |
3935 | @ add, |
|
3940 | @ add, | |
3936 | | |
|
3941 | | | |
3937 | o |
|
3942 | o | |
3938 | | |
|
3943 | | | |
3939 | o |
|
3944 | o | |
3940 | | |
|
3945 | | | |
3941 | o |
|
3946 | o | |
3942 |
|
3947 | |||
3943 | o |
|
3948 | o | |
3944 | |\ |
|
3949 | |\ | |
3945 | | o head |
|
3950 | | o head | |
3946 | | | |
|
3951 | | | | |
3947 | o | branch |
|
3952 | o | branch | |
3948 | |/ |
|
3953 | |/ | |
3949 | o user, |
|
3954 | o user, | |
3950 | | |
|
3955 | | | |
3951 | o person |
|
3956 | o person | |
3952 | | |
|
3957 | | | |
3953 | o 1 |
|
3958 | o 1 | |
3954 | | |
|
3959 | | | |
3955 | o 1 |
|
3960 | o 1 | |
3956 |
|
3961 | |||
3957 |
|
3962 | |||
3958 | Test word third parameter used as splitter |
|
3963 | Test word third parameter used as splitter | |
3959 |
|
3964 | |||
3960 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" |
|
3965 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" | |
3961 | @ M |
|
3966 | @ M | |
3962 | | |
|
3967 | | | |
3963 | o future |
|
3968 | o future | |
3964 | | |
|
3969 | | | |
3965 | o third |
|
3970 | o third | |
3966 | | |
|
3971 | | | |
3967 | o sec |
|
3972 | o sec | |
3968 |
|
3973 | |||
3969 | o merge |
|
3974 | o merge | |
3970 | |\ |
|
3975 | |\ | |
3971 | | o new head |
|
3976 | | o new head | |
3972 | | | |
|
3977 | | | | |
3973 | o | new branch |
|
3978 | o | new branch | |
3974 | |/ |
|
3979 | |/ | |
3975 | o n |
|
3980 | o n | |
3976 | | |
|
3981 | | | |
3977 | o n |
|
3982 | o n | |
3978 | | |
|
3983 | | | |
3979 | o |
|
3984 | o | |
3980 | | |
|
3985 | | | |
3981 | o line 1 |
|
3986 | o line 1 | |
3982 | line 2 |
|
3987 | line 2 | |
3983 |
|
3988 | |||
3984 | Test word error messages for not enough and too many arguments |
|
3989 | Test word error messages for not enough and too many arguments | |
3985 |
|
3990 | |||
3986 | $ hg log -Gv -R a --template "{word('0')}" |
|
3991 | $ hg log -Gv -R a --template "{word('0')}" | |
3987 | hg: parse error: word expects two or three arguments, got 1 |
|
3992 | hg: parse error: word expects two or three arguments, got 1 | |
3988 | [255] |
|
3993 | [255] | |
3989 |
|
3994 | |||
3990 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" |
|
3995 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" | |
3991 | hg: parse error: word expects two or three arguments, got 7 |
|
3996 | hg: parse error: word expects two or three arguments, got 7 | |
3992 | [255] |
|
3997 | [255] | |
3993 |
|
3998 | |||
3994 | Test word for integer literal |
|
3999 | Test word for integer literal | |
3995 |
|
4000 | |||
3996 | $ hg log -R a --template "{word(2, desc)}\n" -r0 |
|
4001 | $ hg log -R a --template "{word(2, desc)}\n" -r0 | |
3997 | line |
|
4002 | line | |
3998 |
|
4003 | |||
3999 | Test word for invalid numbers |
|
4004 | Test word for invalid numbers | |
4000 |
|
4005 | |||
4001 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
4006 | $ hg log -Gv -R a --template "{word('a', desc)}" | |
4002 | hg: parse error: word expects an integer index |
|
4007 | hg: parse error: word expects an integer index | |
4003 | [255] |
|
4008 | [255] | |
4004 |
|
4009 | |||
4005 | Test word for out of range |
|
4010 | Test word for out of range | |
4006 |
|
4011 | |||
4007 | $ hg log -R a --template "{word(10000, desc)}" |
|
4012 | $ hg log -R a --template "{word(10000, desc)}" | |
4008 | $ hg log -R a --template "{word(-10000, desc)}" |
|
4013 | $ hg log -R a --template "{word(-10000, desc)}" | |
4009 |
|
4014 | |||
4010 | Test indent and not adding to empty lines |
|
4015 | Test indent and not adding to empty lines | |
4011 |
|
4016 | |||
4012 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a |
|
4017 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a | |
4013 | ----- |
|
4018 | ----- | |
4014 | > line 1 |
|
4019 | > line 1 | |
4015 | >> line 2 |
|
4020 | >> line 2 | |
4016 | ----- |
|
4021 | ----- | |
4017 | > other 1 |
|
4022 | > other 1 | |
4018 | >> other 2 |
|
4023 | >> other 2 | |
4019 |
|
4024 | |||
4020 | >> other 3 |
|
4025 | >> other 3 | |
4021 |
|
4026 | |||
4022 | Test with non-strings like dates |
|
4027 | Test with non-strings like dates | |
4023 |
|
4028 | |||
4024 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a |
|
4029 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a | |
4025 | 1200000.00 |
|
4030 | 1200000.00 | |
4026 | 1300000.00 |
|
4031 | 1300000.00 | |
4027 |
|
4032 | |||
4028 | Test broken string escapes: |
|
4033 | Test broken string escapes: | |
4029 |
|
4034 | |||
4030 | $ hg log -T "bogus\\" -R a |
|
4035 | $ hg log -T "bogus\\" -R a | |
4031 | hg: parse error: trailing \ in string |
|
4036 | hg: parse error: trailing \ in string | |
4032 | [255] |
|
4037 | [255] | |
4033 | $ hg log -T "\\xy" -R a |
|
4038 | $ hg log -T "\\xy" -R a | |
4034 | hg: parse error: invalid \x escape |
|
4039 | hg: parse error: invalid \x escape | |
4035 | [255] |
|
4040 | [255] | |
4036 |
|
4041 | |||
4037 | json filter should escape HTML tags so that the output can be embedded in hgweb: |
|
4042 | json filter should escape HTML tags so that the output can be embedded in hgweb: | |
4038 |
|
4043 | |||
4039 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 |
|
4044 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 | |
4040 | "\u003cfoo@example.org\u003e" |
|
4045 | "\u003cfoo@example.org\u003e" | |
4041 |
|
4046 | |||
4042 | Templater supports aliases of symbol and func() styles: |
|
4047 | Templater supports aliases of symbol and func() styles: | |
4043 |
|
4048 | |||
4044 | $ hg clone -q a aliases |
|
4049 | $ hg clone -q a aliases | |
4045 | $ cd aliases |
|
4050 | $ cd aliases | |
4046 | $ cat <<EOF >> .hg/hgrc |
|
4051 | $ cat <<EOF >> .hg/hgrc | |
4047 | > [templatealias] |
|
4052 | > [templatealias] | |
4048 | > r = rev |
|
4053 | > r = rev | |
4049 | > rn = "{r}:{node|short}" |
|
4054 | > rn = "{r}:{node|short}" | |
4050 | > status(c, files) = files % "{c} {file}\n" |
|
4055 | > status(c, files) = files % "{c} {file}\n" | |
4051 | > utcdate(d) = localdate(d, "UTC") |
|
4056 | > utcdate(d) = localdate(d, "UTC") | |
4052 | > EOF |
|
4057 | > EOF | |
4053 |
|
4058 | |||
4054 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' |
|
4059 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' | |
4055 | (template |
|
4060 | (template | |
4056 | ('symbol', 'rn') |
|
4061 | ('symbol', 'rn') | |
4057 | ('string', ' ') |
|
4062 | ('string', ' ') | |
4058 | (| |
|
4063 | (| | |
4059 | (func |
|
4064 | (func | |
4060 | ('symbol', 'utcdate') |
|
4065 | ('symbol', 'utcdate') | |
4061 | ('symbol', 'date')) |
|
4066 | ('symbol', 'date')) | |
4062 | ('symbol', 'isodate')) |
|
4067 | ('symbol', 'isodate')) | |
4063 | ('string', '\n')) |
|
4068 | ('string', '\n')) | |
4064 | * expanded: |
|
4069 | * expanded: | |
4065 | (template |
|
4070 | (template | |
4066 | (template |
|
4071 | (template | |
4067 | ('symbol', 'rev') |
|
4072 | ('symbol', 'rev') | |
4068 | ('string', ':') |
|
4073 | ('string', ':') | |
4069 | (| |
|
4074 | (| | |
4070 | ('symbol', 'node') |
|
4075 | ('symbol', 'node') | |
4071 | ('symbol', 'short'))) |
|
4076 | ('symbol', 'short'))) | |
4072 | ('string', ' ') |
|
4077 | ('string', ' ') | |
4073 | (| |
|
4078 | (| | |
4074 | (func |
|
4079 | (func | |
4075 | ('symbol', 'localdate') |
|
4080 | ('symbol', 'localdate') | |
4076 | (list |
|
4081 | (list | |
4077 | ('symbol', 'date') |
|
4082 | ('symbol', 'date') | |
4078 | ('string', 'UTC'))) |
|
4083 | ('string', 'UTC'))) | |
4079 | ('symbol', 'isodate')) |
|
4084 | ('symbol', 'isodate')) | |
4080 | ('string', '\n')) |
|
4085 | ('string', '\n')) | |
4081 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4086 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4082 |
|
4087 | |||
4083 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' |
|
4088 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' | |
4084 | (template |
|
4089 | (template | |
4085 | (func |
|
4090 | (func | |
4086 | ('symbol', 'status') |
|
4091 | ('symbol', 'status') | |
4087 | (list |
|
4092 | (list | |
4088 | ('string', 'A') |
|
4093 | ('string', 'A') | |
4089 | ('symbol', 'file_adds')))) |
|
4094 | ('symbol', 'file_adds')))) | |
4090 | * expanded: |
|
4095 | * expanded: | |
4091 | (template |
|
4096 | (template | |
4092 | (% |
|
4097 | (% | |
4093 | ('symbol', 'file_adds') |
|
4098 | ('symbol', 'file_adds') | |
4094 | (template |
|
4099 | (template | |
4095 | ('string', 'A') |
|
4100 | ('string', 'A') | |
4096 | ('string', ' ') |
|
4101 | ('string', ' ') | |
4097 | ('symbol', 'file') |
|
4102 | ('symbol', 'file') | |
4098 | ('string', '\n')))) |
|
4103 | ('string', '\n')))) | |
4099 | A a |
|
4104 | A a | |
4100 |
|
4105 | |||
4101 | A unary function alias can be called as a filter: |
|
4106 | A unary function alias can be called as a filter: | |
4102 |
|
4107 | |||
4103 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' |
|
4108 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' | |
4104 | (template |
|
4109 | (template | |
4105 | (| |
|
4110 | (| | |
4106 | (| |
|
4111 | (| | |
4107 | ('symbol', 'date') |
|
4112 | ('symbol', 'date') | |
4108 | ('symbol', 'utcdate')) |
|
4113 | ('symbol', 'utcdate')) | |
4109 | ('symbol', 'isodate')) |
|
4114 | ('symbol', 'isodate')) | |
4110 | ('string', '\n')) |
|
4115 | ('string', '\n')) | |
4111 | * expanded: |
|
4116 | * expanded: | |
4112 | (template |
|
4117 | (template | |
4113 | (| |
|
4118 | (| | |
4114 | (func |
|
4119 | (func | |
4115 | ('symbol', 'localdate') |
|
4120 | ('symbol', 'localdate') | |
4116 | (list |
|
4121 | (list | |
4117 | ('symbol', 'date') |
|
4122 | ('symbol', 'date') | |
4118 | ('string', 'UTC'))) |
|
4123 | ('string', 'UTC'))) | |
4119 | ('symbol', 'isodate')) |
|
4124 | ('symbol', 'isodate')) | |
4120 | ('string', '\n')) |
|
4125 | ('string', '\n')) | |
4121 | 1970-01-12 13:46 +0000 |
|
4126 | 1970-01-12 13:46 +0000 | |
4122 |
|
4127 | |||
4123 | Aliases should be applied only to command arguments and templates in hgrc. |
|
4128 | Aliases should be applied only to command arguments and templates in hgrc. | |
4124 | Otherwise, our stock styles and web templates could be corrupted: |
|
4129 | Otherwise, our stock styles and web templates could be corrupted: | |
4125 |
|
4130 | |||
4126 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' |
|
4131 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' | |
4127 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4132 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4128 |
|
4133 | |||
4129 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' |
|
4134 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' | |
4130 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4135 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4131 |
|
4136 | |||
4132 | $ cat <<EOF > tmpl |
|
4137 | $ cat <<EOF > tmpl | |
4133 | > changeset = 'nothing expanded:{rn}\n' |
|
4138 | > changeset = 'nothing expanded:{rn}\n' | |
4134 | > EOF |
|
4139 | > EOF | |
4135 | $ hg log -r0 --style ./tmpl |
|
4140 | $ hg log -r0 --style ./tmpl | |
4136 | nothing expanded: |
|
4141 | nothing expanded: | |
4137 |
|
4142 | |||
4138 | Aliases in formatter: |
|
4143 | Aliases in formatter: | |
4139 |
|
4144 | |||
4140 | $ hg branches -T '{pad(branch, 7)} {rn}\n' |
|
4145 | $ hg branches -T '{pad(branch, 7)} {rn}\n' | |
4141 | default 6:d41e714fe50d |
|
4146 | default 6:d41e714fe50d | |
4142 | foo 4:bbe44766e73d |
|
4147 | foo 4:bbe44766e73d | |
4143 |
|
4148 | |||
4144 | Aliases should honor HGPLAIN: |
|
4149 | Aliases should honor HGPLAIN: | |
4145 |
|
4150 | |||
4146 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' |
|
4151 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' | |
4147 | nothing expanded: |
|
4152 | nothing expanded: | |
4148 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' |
|
4153 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' | |
4149 | 0:1e4e1b8f71e0 |
|
4154 | 0:1e4e1b8f71e0 | |
4150 |
|
4155 | |||
4151 | Unparsable alias: |
|
4156 | Unparsable alias: | |
4152 |
|
4157 | |||
4153 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' |
|
4158 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' | |
4154 | (template |
|
4159 | (template | |
4155 | ('symbol', 'bad')) |
|
4160 | ('symbol', 'bad')) | |
4156 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
4161 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4157 | [255] |
|
4162 | [255] | |
4158 | $ hg log --config templatealias.bad='x(' -T '{bad}' |
|
4163 | $ hg log --config templatealias.bad='x(' -T '{bad}' | |
4159 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
4164 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4160 | [255] |
|
4165 | [255] | |
4161 |
|
4166 | |||
4162 | $ cd .. |
|
4167 | $ cd .. | |
4163 |
|
4168 | |||
4164 | Set up repository for non-ascii encoding tests: |
|
4169 | Set up repository for non-ascii encoding tests: | |
4165 |
|
4170 | |||
4166 | $ hg init nonascii |
|
4171 | $ hg init nonascii | |
4167 | $ cd nonascii |
|
4172 | $ cd nonascii | |
4168 | $ python <<EOF |
|
4173 | $ python <<EOF | |
4169 | > open('latin1', 'w').write('\xe9') |
|
4174 | > open('latin1', 'w').write('\xe9') | |
4170 | > open('utf-8', 'w').write('\xc3\xa9') |
|
4175 | > open('utf-8', 'w').write('\xc3\xa9') | |
4171 | > EOF |
|
4176 | > EOF | |
4172 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
|
4177 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` | |
4173 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
|
4178 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 | |
4174 |
|
4179 | |||
4175 | json filter should try round-trip conversion to utf-8: |
|
4180 | json filter should try round-trip conversion to utf-8: | |
4176 |
|
4181 | |||
4177 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 |
|
4182 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 | |
4178 | "\u00e9" |
|
4183 | "\u00e9" | |
4179 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 |
|
4184 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 | |
4180 | "non-ascii branch: \u00e9" |
|
4185 | "non-ascii branch: \u00e9" | |
4181 |
|
4186 | |||
4182 | json filter takes input as utf-8b: |
|
4187 | json filter takes input as utf-8b: | |
4183 |
|
4188 | |||
4184 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
|
4189 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 | |
4185 | "\u00e9" |
|
4190 | "\u00e9" | |
4186 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 |
|
4191 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 | |
4187 | "\udce9" |
|
4192 | "\udce9" | |
4188 |
|
4193 | |||
4189 | utf8 filter: |
|
4194 | utf8 filter: | |
4190 |
|
4195 | |||
4191 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 |
|
4196 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 | |
4192 | round-trip: c3a9 |
|
4197 | round-trip: c3a9 | |
4193 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
4198 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4194 | decoded: c3a9 |
|
4199 | decoded: c3a9 | |
4195 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
4200 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4196 | abort: decoding near * (glob) |
|
4201 | abort: decoding near * (glob) | |
4197 | [255] |
|
4202 | [255] | |
4198 | $ hg log -T "invalid type: {rev|utf8}\n" -r0 |
|
4203 | $ hg log -T "invalid type: {rev|utf8}\n" -r0 | |
4199 | abort: template filter 'utf8' is not compatible with keyword 'rev' |
|
4204 | abort: template filter 'utf8' is not compatible with keyword 'rev' | |
4200 | [255] |
|
4205 | [255] | |
4201 |
|
4206 | |||
4202 | pad width: |
|
4207 | pad width: | |
4203 |
|
4208 | |||
4204 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" |
|
4209 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" | |
4205 | \xc3\xa9- (esc) |
|
4210 | \xc3\xa9- (esc) | |
4206 |
|
4211 | |||
4207 | $ cd .. |
|
4212 | $ cd .. | |
4208 |
|
4213 | |||
4209 | Test that template function in extension is registered as expected |
|
4214 | Test that template function in extension is registered as expected | |
4210 |
|
4215 | |||
4211 | $ cd a |
|
4216 | $ cd a | |
4212 |
|
4217 | |||
4213 | $ cat <<EOF > $TESTTMP/customfunc.py |
|
4218 | $ cat <<EOF > $TESTTMP/customfunc.py | |
4214 | > from mercurial import registrar |
|
4219 | > from mercurial import registrar | |
4215 | > |
|
4220 | > | |
4216 | > templatefunc = registrar.templatefunc() |
|
4221 | > templatefunc = registrar.templatefunc() | |
4217 | > |
|
4222 | > | |
4218 | > @templatefunc('custom()') |
|
4223 | > @templatefunc('custom()') | |
4219 | > def custom(context, mapping, args): |
|
4224 | > def custom(context, mapping, args): | |
4220 | > return 'custom' |
|
4225 | > return 'custom' | |
4221 | > EOF |
|
4226 | > EOF | |
4222 | $ cat <<EOF > .hg/hgrc |
|
4227 | $ cat <<EOF > .hg/hgrc | |
4223 | > [extensions] |
|
4228 | > [extensions] | |
4224 | > customfunc = $TESTTMP/customfunc.py |
|
4229 | > customfunc = $TESTTMP/customfunc.py | |
4225 | > EOF |
|
4230 | > EOF | |
4226 |
|
4231 | |||
4227 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true |
|
4232 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true | |
4228 | custom |
|
4233 | custom | |
4229 |
|
4234 | |||
4230 | $ cd .. |
|
4235 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now