Show More
@@ -1,445 +1,444 b'' | |||||
1 | # templatefilters.py - common template expansion filters |
|
1 | # templatefilters.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 os |
|
10 | import os | |
11 | import re |
|
11 | import re | |
12 | import time |
|
12 | import time | |
13 |
|
13 | |||
14 | from . import ( |
|
14 | from . import ( | |
15 | encoding, |
|
15 | encoding, | |
16 | error, |
|
16 | error, | |
17 | hbisect, |
|
17 | hbisect, | |
18 | node, |
|
18 | node, | |
19 | pycompat, |
|
19 | pycompat, | |
20 | registrar, |
|
20 | registrar, | |
21 | templatekw, |
|
21 | templatekw, | |
22 | url, |
|
22 | url, | |
23 | util, |
|
23 | util, | |
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | urlerr = util.urlerr |
|
26 | urlerr = util.urlerr | |
27 | urlreq = util.urlreq |
|
27 | urlreq = util.urlreq | |
28 |
|
28 | |||
29 | if pycompat.ispy3: |
|
29 | if pycompat.ispy3: | |
30 | long = int |
|
30 | long = int | |
31 |
|
31 | |||
32 | # filters are callables like: |
|
32 | # filters are callables like: | |
33 | # fn(obj) |
|
33 | # fn(obj) | |
34 | # with: |
|
34 | # with: | |
35 | # obj - object to be filtered (text, date, list and so on) |
|
35 | # obj - object to be filtered (text, date, list and so on) | |
36 | filters = {} |
|
36 | filters = {} | |
37 |
|
37 | |||
38 | templatefilter = registrar.templatefilter(filters) |
|
38 | templatefilter = registrar.templatefilter(filters) | |
39 |
|
39 | |||
40 | @templatefilter('addbreaks') |
|
40 | @templatefilter('addbreaks') | |
41 | def addbreaks(text): |
|
41 | def addbreaks(text): | |
42 | """Any text. Add an XHTML "<br />" tag before the end of |
|
42 | """Any text. Add an XHTML "<br />" tag before the end of | |
43 | every line except the last. |
|
43 | every line except the last. | |
44 | """ |
|
44 | """ | |
45 | return text.replace('\n', '<br/>\n') |
|
45 | return text.replace('\n', '<br/>\n') | |
46 |
|
46 | |||
47 | agescales = [("year", 3600 * 24 * 365, 'Y'), |
|
47 | agescales = [("year", 3600 * 24 * 365, 'Y'), | |
48 | ("month", 3600 * 24 * 30, 'M'), |
|
48 | ("month", 3600 * 24 * 30, 'M'), | |
49 | ("week", 3600 * 24 * 7, 'W'), |
|
49 | ("week", 3600 * 24 * 7, 'W'), | |
50 | ("day", 3600 * 24, 'd'), |
|
50 | ("day", 3600 * 24, 'd'), | |
51 | ("hour", 3600, 'h'), |
|
51 | ("hour", 3600, 'h'), | |
52 | ("minute", 60, 'm'), |
|
52 | ("minute", 60, 'm'), | |
53 | ("second", 1, 's')] |
|
53 | ("second", 1, 's')] | |
54 |
|
54 | |||
55 | @templatefilter('age') |
|
55 | @templatefilter('age') | |
56 | def age(date, abbrev=False): |
|
56 | def age(date, abbrev=False): | |
57 | """Date. Returns a human-readable date/time difference between the |
|
57 | """Date. Returns a human-readable date/time difference between the | |
58 | given date/time and the current date/time. |
|
58 | given date/time and the current date/time. | |
59 | """ |
|
59 | """ | |
60 |
|
60 | |||
61 | def plural(t, c): |
|
61 | def plural(t, c): | |
62 | if c == 1: |
|
62 | if c == 1: | |
63 | return t |
|
63 | return t | |
64 | return t + "s" |
|
64 | return t + "s" | |
65 | def fmt(t, c, a): |
|
65 | def fmt(t, c, a): | |
66 | if abbrev: |
|
66 | if abbrev: | |
67 | return "%d%s" % (c, a) |
|
67 | return "%d%s" % (c, a) | |
68 | return "%d %s" % (c, plural(t, c)) |
|
68 | return "%d %s" % (c, plural(t, c)) | |
69 |
|
69 | |||
70 | now = time.time() |
|
70 | now = time.time() | |
71 | then = date[0] |
|
71 | then = date[0] | |
72 | future = False |
|
72 | future = False | |
73 | if then > now: |
|
73 | if then > now: | |
74 | future = True |
|
74 | future = True | |
75 | delta = max(1, int(then - now)) |
|
75 | delta = max(1, int(then - now)) | |
76 | if delta > agescales[0][1] * 30: |
|
76 | if delta > agescales[0][1] * 30: | |
77 | return 'in the distant future' |
|
77 | return 'in the distant future' | |
78 | else: |
|
78 | else: | |
79 | delta = max(1, int(now - then)) |
|
79 | delta = max(1, int(now - then)) | |
80 | if delta > agescales[0][1] * 2: |
|
80 | if delta > agescales[0][1] * 2: | |
81 | return util.shortdate(date) |
|
81 | return util.shortdate(date) | |
82 |
|
82 | |||
83 | for t, s, a in agescales: |
|
83 | for t, s, a in agescales: | |
84 | n = delta // s |
|
84 | n = delta // s | |
85 | if n >= 2 or s == 1: |
|
85 | if n >= 2 or s == 1: | |
86 | if future: |
|
86 | if future: | |
87 | return '%s from now' % fmt(t, n, a) |
|
87 | return '%s from now' % fmt(t, n, a) | |
88 | return '%s ago' % fmt(t, n, a) |
|
88 | return '%s ago' % fmt(t, n, a) | |
89 |
|
89 | |||
90 | @templatefilter('basename') |
|
90 | @templatefilter('basename') | |
91 | def basename(path): |
|
91 | def basename(path): | |
92 | """Any text. Treats the text as a path, and returns the last |
|
92 | """Any text. Treats the text as a path, and returns the last | |
93 | component of the path after splitting by the path separator |
|
93 | component of the path after splitting by the path separator. | |
94 | (ignoring trailing separators). For example, "foo/bar/baz" becomes |
|
94 | For example, "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "". | |
95 | "baz" and "foo/bar//" becomes "bar". |
|
|||
96 | """ |
|
95 | """ | |
97 | return os.path.basename(path) |
|
96 | return os.path.basename(path) | |
98 |
|
97 | |||
99 | @templatefilter('count') |
|
98 | @templatefilter('count') | |
100 | def count(i): |
|
99 | def count(i): | |
101 | """List or text. Returns the length as an integer.""" |
|
100 | """List or text. Returns the length as an integer.""" | |
102 | return len(i) |
|
101 | return len(i) | |
103 |
|
102 | |||
104 | @templatefilter('domain') |
|
103 | @templatefilter('domain') | |
105 | def domain(author): |
|
104 | def domain(author): | |
106 | """Any text. Finds the first string that looks like an email |
|
105 | """Any text. Finds the first string that looks like an email | |
107 | address, and extracts just the domain component. Example: ``User |
|
106 | address, and extracts just the domain component. Example: ``User | |
108 | <user@example.com>`` becomes ``example.com``. |
|
107 | <user@example.com>`` becomes ``example.com``. | |
109 | """ |
|
108 | """ | |
110 | f = author.find('@') |
|
109 | f = author.find('@') | |
111 | if f == -1: |
|
110 | if f == -1: | |
112 | return '' |
|
111 | return '' | |
113 | author = author[f + 1:] |
|
112 | author = author[f + 1:] | |
114 | f = author.find('>') |
|
113 | f = author.find('>') | |
115 | if f >= 0: |
|
114 | if f >= 0: | |
116 | author = author[:f] |
|
115 | author = author[:f] | |
117 | return author |
|
116 | return author | |
118 |
|
117 | |||
119 | @templatefilter('email') |
|
118 | @templatefilter('email') | |
120 | def email(text): |
|
119 | def email(text): | |
121 | """Any text. Extracts the first string that looks like an email |
|
120 | """Any text. Extracts the first string that looks like an email | |
122 | address. Example: ``User <user@example.com>`` becomes |
|
121 | address. Example: ``User <user@example.com>`` becomes | |
123 | ``user@example.com``. |
|
122 | ``user@example.com``. | |
124 | """ |
|
123 | """ | |
125 | return util.email(text) |
|
124 | return util.email(text) | |
126 |
|
125 | |||
127 | @templatefilter('escape') |
|
126 | @templatefilter('escape') | |
128 | def escape(text): |
|
127 | def escape(text): | |
129 | """Any text. Replaces the special XML/XHTML characters "&", "<" |
|
128 | """Any text. Replaces the special XML/XHTML characters "&", "<" | |
130 | and ">" with XML entities, and filters out NUL characters. |
|
129 | and ">" with XML entities, and filters out NUL characters. | |
131 | """ |
|
130 | """ | |
132 | return url.escape(text.replace('\0', ''), True) |
|
131 | return url.escape(text.replace('\0', ''), True) | |
133 |
|
132 | |||
134 | para_re = None |
|
133 | para_re = None | |
135 | space_re = None |
|
134 | space_re = None | |
136 |
|
135 | |||
137 | def fill(text, width, initindent='', hangindent=''): |
|
136 | def fill(text, width, initindent='', hangindent=''): | |
138 | '''fill many paragraphs with optional indentation.''' |
|
137 | '''fill many paragraphs with optional indentation.''' | |
139 | global para_re, space_re |
|
138 | global para_re, space_re | |
140 | if para_re is None: |
|
139 | if para_re is None: | |
141 | para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M) |
|
140 | para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M) | |
142 | space_re = re.compile(r' +') |
|
141 | space_re = re.compile(r' +') | |
143 |
|
142 | |||
144 | def findparas(): |
|
143 | def findparas(): | |
145 | start = 0 |
|
144 | start = 0 | |
146 | while True: |
|
145 | while True: | |
147 | m = para_re.search(text, start) |
|
146 | m = para_re.search(text, start) | |
148 | if not m: |
|
147 | if not m: | |
149 | uctext = unicode(text[start:], encoding.encoding) |
|
148 | uctext = unicode(text[start:], encoding.encoding) | |
150 | w = len(uctext) |
|
149 | w = len(uctext) | |
151 | while 0 < w and uctext[w - 1].isspace(): |
|
150 | while 0 < w and uctext[w - 1].isspace(): | |
152 | w -= 1 |
|
151 | w -= 1 | |
153 | yield (uctext[:w].encode(encoding.encoding), |
|
152 | yield (uctext[:w].encode(encoding.encoding), | |
154 | uctext[w:].encode(encoding.encoding)) |
|
153 | uctext[w:].encode(encoding.encoding)) | |
155 | break |
|
154 | break | |
156 | yield text[start:m.start(0)], m.group(1) |
|
155 | yield text[start:m.start(0)], m.group(1) | |
157 | start = m.end(1) |
|
156 | start = m.end(1) | |
158 |
|
157 | |||
159 | return "".join([util.wrap(space_re.sub(' ', util.wrap(para, width)), |
|
158 | return "".join([util.wrap(space_re.sub(' ', util.wrap(para, width)), | |
160 | width, initindent, hangindent) + rest |
|
159 | width, initindent, hangindent) + rest | |
161 | for para, rest in findparas()]) |
|
160 | for para, rest in findparas()]) | |
162 |
|
161 | |||
163 | @templatefilter('fill68') |
|
162 | @templatefilter('fill68') | |
164 | def fill68(text): |
|
163 | def fill68(text): | |
165 | """Any text. Wraps the text to fit in 68 columns.""" |
|
164 | """Any text. Wraps the text to fit in 68 columns.""" | |
166 | return fill(text, 68) |
|
165 | return fill(text, 68) | |
167 |
|
166 | |||
168 | @templatefilter('fill76') |
|
167 | @templatefilter('fill76') | |
169 | def fill76(text): |
|
168 | def fill76(text): | |
170 | """Any text. Wraps the text to fit in 76 columns.""" |
|
169 | """Any text. Wraps the text to fit in 76 columns.""" | |
171 | return fill(text, 76) |
|
170 | return fill(text, 76) | |
172 |
|
171 | |||
173 | @templatefilter('firstline') |
|
172 | @templatefilter('firstline') | |
174 | def firstline(text): |
|
173 | def firstline(text): | |
175 | """Any text. Returns the first line of text.""" |
|
174 | """Any text. Returns the first line of text.""" | |
176 | try: |
|
175 | try: | |
177 | return text.splitlines(True)[0].rstrip('\r\n') |
|
176 | return text.splitlines(True)[0].rstrip('\r\n') | |
178 | except IndexError: |
|
177 | except IndexError: | |
179 | return '' |
|
178 | return '' | |
180 |
|
179 | |||
181 | @templatefilter('hex') |
|
180 | @templatefilter('hex') | |
182 | def hexfilter(text): |
|
181 | def hexfilter(text): | |
183 | """Any text. Convert a binary Mercurial node identifier into |
|
182 | """Any text. Convert a binary Mercurial node identifier into | |
184 | its long hexadecimal representation. |
|
183 | its long hexadecimal representation. | |
185 | """ |
|
184 | """ | |
186 | return node.hex(text) |
|
185 | return node.hex(text) | |
187 |
|
186 | |||
188 | @templatefilter('hgdate') |
|
187 | @templatefilter('hgdate') | |
189 | def hgdate(text): |
|
188 | def hgdate(text): | |
190 | """Date. Returns the date as a pair of numbers: "1157407993 |
|
189 | """Date. Returns the date as a pair of numbers: "1157407993 | |
191 | 25200" (Unix timestamp, timezone offset). |
|
190 | 25200" (Unix timestamp, timezone offset). | |
192 | """ |
|
191 | """ | |
193 | return "%d %d" % text |
|
192 | return "%d %d" % text | |
194 |
|
193 | |||
195 | @templatefilter('isodate') |
|
194 | @templatefilter('isodate') | |
196 | def isodate(text): |
|
195 | def isodate(text): | |
197 | """Date. Returns the date in ISO 8601 format: "2009-08-18 13:00 |
|
196 | """Date. Returns the date in ISO 8601 format: "2009-08-18 13:00 | |
198 | +0200". |
|
197 | +0200". | |
199 | """ |
|
198 | """ | |
200 | return util.datestr(text, '%Y-%m-%d %H:%M %1%2') |
|
199 | return util.datestr(text, '%Y-%m-%d %H:%M %1%2') | |
201 |
|
200 | |||
202 | @templatefilter('isodatesec') |
|
201 | @templatefilter('isodatesec') | |
203 | def isodatesec(text): |
|
202 | def isodatesec(text): | |
204 | """Date. Returns the date in ISO 8601 format, including |
|
203 | """Date. Returns the date in ISO 8601 format, including | |
205 | seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date |
|
204 | seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date | |
206 | filter. |
|
205 | filter. | |
207 | """ |
|
206 | """ | |
208 | return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2') |
|
207 | return util.datestr(text, '%Y-%m-%d %H:%M:%S %1%2') | |
209 |
|
208 | |||
210 | def indent(text, prefix): |
|
209 | def indent(text, prefix): | |
211 | '''indent each non-empty line of text after first with prefix.''' |
|
210 | '''indent each non-empty line of text after first with prefix.''' | |
212 | lines = text.splitlines() |
|
211 | lines = text.splitlines() | |
213 | num_lines = len(lines) |
|
212 | num_lines = len(lines) | |
214 | endswithnewline = text[-1:] == '\n' |
|
213 | endswithnewline = text[-1:] == '\n' | |
215 | def indenter(): |
|
214 | def indenter(): | |
216 | for i in xrange(num_lines): |
|
215 | for i in xrange(num_lines): | |
217 | l = lines[i] |
|
216 | l = lines[i] | |
218 | if i and l.strip(): |
|
217 | if i and l.strip(): | |
219 | yield prefix |
|
218 | yield prefix | |
220 | yield l |
|
219 | yield l | |
221 | if i < num_lines - 1 or endswithnewline: |
|
220 | if i < num_lines - 1 or endswithnewline: | |
222 | yield '\n' |
|
221 | yield '\n' | |
223 | return "".join(indenter()) |
|
222 | return "".join(indenter()) | |
224 |
|
223 | |||
225 | @templatefilter('json') |
|
224 | @templatefilter('json') | |
226 | def json(obj, paranoid=True): |
|
225 | def json(obj, paranoid=True): | |
227 | if obj is None: |
|
226 | if obj is None: | |
228 | return 'null' |
|
227 | return 'null' | |
229 | elif obj is False: |
|
228 | elif obj is False: | |
230 | return 'false' |
|
229 | return 'false' | |
231 | elif obj is True: |
|
230 | elif obj is True: | |
232 | return 'true' |
|
231 | return 'true' | |
233 | elif isinstance(obj, (int, long, float)): |
|
232 | elif isinstance(obj, (int, long, float)): | |
234 | return pycompat.bytestr(obj) |
|
233 | return pycompat.bytestr(obj) | |
235 | elif isinstance(obj, bytes): |
|
234 | elif isinstance(obj, bytes): | |
236 | return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) |
|
235 | return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) | |
237 | elif isinstance(obj, str): |
|
236 | elif isinstance(obj, str): | |
238 | # This branch is unreachable on Python 2, because bytes == str |
|
237 | # This branch is unreachable on Python 2, because bytes == str | |
239 | # and we'll return in the next-earlier block in the elif |
|
238 | # and we'll return in the next-earlier block in the elif | |
240 | # ladder. On Python 3, this helps us catch bugs before they |
|
239 | # ladder. On Python 3, this helps us catch bugs before they | |
241 | # hurt someone. |
|
240 | # hurt someone. | |
242 | raise error.ProgrammingError( |
|
241 | raise error.ProgrammingError( | |
243 | 'Mercurial only does output with bytes on Python 3: %r' % obj) |
|
242 | 'Mercurial only does output with bytes on Python 3: %r' % obj) | |
244 | elif util.safehasattr(obj, 'keys'): |
|
243 | elif util.safehasattr(obj, 'keys'): | |
245 | out = ['"%s": %s' % (encoding.jsonescape(k, paranoid=paranoid), |
|
244 | out = ['"%s": %s' % (encoding.jsonescape(k, paranoid=paranoid), | |
246 | json(v, paranoid)) |
|
245 | json(v, paranoid)) | |
247 | for k, v in sorted(obj.iteritems())] |
|
246 | for k, v in sorted(obj.iteritems())] | |
248 | return '{' + ', '.join(out) + '}' |
|
247 | return '{' + ', '.join(out) + '}' | |
249 | elif util.safehasattr(obj, '__iter__'): |
|
248 | elif util.safehasattr(obj, '__iter__'): | |
250 | out = [json(i, paranoid) for i in obj] |
|
249 | out = [json(i, paranoid) for i in obj] | |
251 | return '[' + ', '.join(out) + ']' |
|
250 | return '[' + ', '.join(out) + ']' | |
252 | else: |
|
251 | else: | |
253 | raise TypeError('cannot encode type %s' % obj.__class__.__name__) |
|
252 | raise TypeError('cannot encode type %s' % obj.__class__.__name__) | |
254 |
|
253 | |||
255 | @templatefilter('lower') |
|
254 | @templatefilter('lower') | |
256 | def lower(text): |
|
255 | def lower(text): | |
257 | """Any text. Converts the text to lowercase.""" |
|
256 | """Any text. Converts the text to lowercase.""" | |
258 | return encoding.lower(text) |
|
257 | return encoding.lower(text) | |
259 |
|
258 | |||
260 | @templatefilter('nonempty') |
|
259 | @templatefilter('nonempty') | |
261 | def nonempty(str): |
|
260 | def nonempty(str): | |
262 | """Any text. Returns '(none)' if the string is empty.""" |
|
261 | """Any text. Returns '(none)' if the string is empty.""" | |
263 | return str or "(none)" |
|
262 | return str or "(none)" | |
264 |
|
263 | |||
265 | @templatefilter('obfuscate') |
|
264 | @templatefilter('obfuscate') | |
266 | def obfuscate(text): |
|
265 | def obfuscate(text): | |
267 | """Any text. Returns the input text rendered as a sequence of |
|
266 | """Any text. Returns the input text rendered as a sequence of | |
268 | XML entities. |
|
267 | XML entities. | |
269 | """ |
|
268 | """ | |
270 | text = unicode(text, encoding.encoding, 'replace') |
|
269 | text = unicode(text, encoding.encoding, 'replace') | |
271 | return ''.join(['&#%d;' % ord(c) for c in text]) |
|
270 | return ''.join(['&#%d;' % ord(c) for c in text]) | |
272 |
|
271 | |||
273 | @templatefilter('permissions') |
|
272 | @templatefilter('permissions') | |
274 | def permissions(flags): |
|
273 | def permissions(flags): | |
275 | if "l" in flags: |
|
274 | if "l" in flags: | |
276 | return "lrwxrwxrwx" |
|
275 | return "lrwxrwxrwx" | |
277 | if "x" in flags: |
|
276 | if "x" in flags: | |
278 | return "-rwxr-xr-x" |
|
277 | return "-rwxr-xr-x" | |
279 | return "-rw-r--r--" |
|
278 | return "-rw-r--r--" | |
280 |
|
279 | |||
281 | @templatefilter('person') |
|
280 | @templatefilter('person') | |
282 | def person(author): |
|
281 | def person(author): | |
283 | """Any text. Returns the name before an email address, |
|
282 | """Any text. Returns the name before an email address, | |
284 | interpreting it as per RFC 5322. |
|
283 | interpreting it as per RFC 5322. | |
285 |
|
284 | |||
286 | >>> person(b'foo@bar') |
|
285 | >>> person(b'foo@bar') | |
287 | 'foo' |
|
286 | 'foo' | |
288 | >>> person(b'Foo Bar <foo@bar>') |
|
287 | >>> person(b'Foo Bar <foo@bar>') | |
289 | 'Foo Bar' |
|
288 | 'Foo Bar' | |
290 | >>> person(b'"Foo Bar" <foo@bar>') |
|
289 | >>> person(b'"Foo Bar" <foo@bar>') | |
291 | 'Foo Bar' |
|
290 | 'Foo Bar' | |
292 | >>> person(b'"Foo \"buz\" Bar" <foo@bar>') |
|
291 | >>> person(b'"Foo \"buz\" Bar" <foo@bar>') | |
293 | 'Foo "buz" Bar' |
|
292 | 'Foo "buz" Bar' | |
294 | >>> # The following are invalid, but do exist in real-life |
|
293 | >>> # The following are invalid, but do exist in real-life | |
295 | ... |
|
294 | ... | |
296 | >>> person(b'Foo "buz" Bar <foo@bar>') |
|
295 | >>> person(b'Foo "buz" Bar <foo@bar>') | |
297 | 'Foo "buz" Bar' |
|
296 | 'Foo "buz" Bar' | |
298 | >>> person(b'"Foo Bar <foo@bar>') |
|
297 | >>> person(b'"Foo Bar <foo@bar>') | |
299 | 'Foo Bar' |
|
298 | 'Foo Bar' | |
300 | """ |
|
299 | """ | |
301 | if '@' not in author: |
|
300 | if '@' not in author: | |
302 | return author |
|
301 | return author | |
303 | f = author.find('<') |
|
302 | f = author.find('<') | |
304 | if f != -1: |
|
303 | if f != -1: | |
305 | return author[:f].strip(' "').replace('\\"', '"') |
|
304 | return author[:f].strip(' "').replace('\\"', '"') | |
306 | f = author.find('@') |
|
305 | f = author.find('@') | |
307 | return author[:f].replace('.', ' ') |
|
306 | return author[:f].replace('.', ' ') | |
308 |
|
307 | |||
309 | @templatefilter('revescape') |
|
308 | @templatefilter('revescape') | |
310 | def revescape(text): |
|
309 | def revescape(text): | |
311 | """Any text. Escapes all "special" characters, except @. |
|
310 | """Any text. Escapes all "special" characters, except @. | |
312 | Forward slashes are escaped twice to prevent web servers from prematurely |
|
311 | Forward slashes are escaped twice to prevent web servers from prematurely | |
313 | unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz". |
|
312 | unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz". | |
314 | """ |
|
313 | """ | |
315 | return urlreq.quote(text, safe='/@').replace('/', '%252F') |
|
314 | return urlreq.quote(text, safe='/@').replace('/', '%252F') | |
316 |
|
315 | |||
317 | @templatefilter('rfc3339date') |
|
316 | @templatefilter('rfc3339date') | |
318 | def rfc3339date(text): |
|
317 | def rfc3339date(text): | |
319 | """Date. Returns a date using the Internet date format |
|
318 | """Date. Returns a date using the Internet date format | |
320 | specified in RFC 3339: "2009-08-18T13:00:13+02:00". |
|
319 | specified in RFC 3339: "2009-08-18T13:00:13+02:00". | |
321 | """ |
|
320 | """ | |
322 | return util.datestr(text, "%Y-%m-%dT%H:%M:%S%1:%2") |
|
321 | return util.datestr(text, "%Y-%m-%dT%H:%M:%S%1:%2") | |
323 |
|
322 | |||
324 | @templatefilter('rfc822date') |
|
323 | @templatefilter('rfc822date') | |
325 | def rfc822date(text): |
|
324 | def rfc822date(text): | |
326 | """Date. Returns a date using the same format used in email |
|
325 | """Date. Returns a date using the same format used in email | |
327 | headers: "Tue, 18 Aug 2009 13:00:13 +0200". |
|
326 | headers: "Tue, 18 Aug 2009 13:00:13 +0200". | |
328 | """ |
|
327 | """ | |
329 | return util.datestr(text, "%a, %d %b %Y %H:%M:%S %1%2") |
|
328 | return util.datestr(text, "%a, %d %b %Y %H:%M:%S %1%2") | |
330 |
|
329 | |||
331 | @templatefilter('short') |
|
330 | @templatefilter('short') | |
332 | def short(text): |
|
331 | def short(text): | |
333 | """Changeset hash. Returns the short form of a changeset hash, |
|
332 | """Changeset hash. Returns the short form of a changeset hash, | |
334 | i.e. a 12 hexadecimal digit string. |
|
333 | i.e. a 12 hexadecimal digit string. | |
335 | """ |
|
334 | """ | |
336 | return text[:12] |
|
335 | return text[:12] | |
337 |
|
336 | |||
338 | @templatefilter('shortbisect') |
|
337 | @templatefilter('shortbisect') | |
339 | def shortbisect(text): |
|
338 | def shortbisect(text): | |
340 | """Any text. Treats `text` as a bisection status, and |
|
339 | """Any text. Treats `text` as a bisection status, and | |
341 | returns a single-character representing the status (G: good, B: bad, |
|
340 | returns a single-character representing the status (G: good, B: bad, | |
342 | S: skipped, U: untested, I: ignored). Returns single space if `text` |
|
341 | S: skipped, U: untested, I: ignored). Returns single space if `text` | |
343 | is not a valid bisection status. |
|
342 | is not a valid bisection status. | |
344 | """ |
|
343 | """ | |
345 | return hbisect.shortlabel(text) or ' ' |
|
344 | return hbisect.shortlabel(text) or ' ' | |
346 |
|
345 | |||
347 | @templatefilter('shortdate') |
|
346 | @templatefilter('shortdate') | |
348 | def shortdate(text): |
|
347 | def shortdate(text): | |
349 | """Date. Returns a date like "2006-09-18".""" |
|
348 | """Date. Returns a date like "2006-09-18".""" | |
350 | return util.shortdate(text) |
|
349 | return util.shortdate(text) | |
351 |
|
350 | |||
352 | @templatefilter('splitlines') |
|
351 | @templatefilter('splitlines') | |
353 | def splitlines(text): |
|
352 | def splitlines(text): | |
354 | """Any text. Split text into a list of lines.""" |
|
353 | """Any text. Split text into a list of lines.""" | |
355 | return templatekw.hybridlist(text.splitlines(), name='line') |
|
354 | return templatekw.hybridlist(text.splitlines(), name='line') | |
356 |
|
355 | |||
357 | @templatefilter('stringescape') |
|
356 | @templatefilter('stringescape') | |
358 | def stringescape(text): |
|
357 | def stringescape(text): | |
359 | return util.escapestr(text) |
|
358 | return util.escapestr(text) | |
360 |
|
359 | |||
361 | @templatefilter('stringify') |
|
360 | @templatefilter('stringify') | |
362 | def stringify(thing): |
|
361 | def stringify(thing): | |
363 | """Any type. Turns the value into text by converting values into |
|
362 | """Any type. Turns the value into text by converting values into | |
364 | text and concatenating them. |
|
363 | text and concatenating them. | |
365 | """ |
|
364 | """ | |
366 | thing = templatekw.unwraphybrid(thing) |
|
365 | thing = templatekw.unwraphybrid(thing) | |
367 | if util.safehasattr(thing, '__iter__') and not isinstance(thing, bytes): |
|
366 | if util.safehasattr(thing, '__iter__') and not isinstance(thing, bytes): | |
368 | return "".join([stringify(t) for t in thing if t is not None]) |
|
367 | return "".join([stringify(t) for t in thing if t is not None]) | |
369 | if thing is None: |
|
368 | if thing is None: | |
370 | return "" |
|
369 | return "" | |
371 | return pycompat.bytestr(thing) |
|
370 | return pycompat.bytestr(thing) | |
372 |
|
371 | |||
373 | @templatefilter('stripdir') |
|
372 | @templatefilter('stripdir') | |
374 | def stripdir(text): |
|
373 | def stripdir(text): | |
375 | """Treat the text as path and strip a directory level, if |
|
374 | """Treat the text as path and strip a directory level, if | |
376 | possible. For example, "foo" and "foo/bar" becomes "foo". |
|
375 | possible. For example, "foo" and "foo/bar" becomes "foo". | |
377 | """ |
|
376 | """ | |
378 | dir = os.path.dirname(text) |
|
377 | dir = os.path.dirname(text) | |
379 | if dir == "": |
|
378 | if dir == "": | |
380 | return os.path.basename(text) |
|
379 | return os.path.basename(text) | |
381 | else: |
|
380 | else: | |
382 | return dir |
|
381 | return dir | |
383 |
|
382 | |||
384 | @templatefilter('tabindent') |
|
383 | @templatefilter('tabindent') | |
385 | def tabindent(text): |
|
384 | def tabindent(text): | |
386 | """Any text. Returns the text, with every non-empty line |
|
385 | """Any text. Returns the text, with every non-empty line | |
387 | except the first starting with a tab character. |
|
386 | except the first starting with a tab character. | |
388 | """ |
|
387 | """ | |
389 | return indent(text, '\t') |
|
388 | return indent(text, '\t') | |
390 |
|
389 | |||
391 | @templatefilter('upper') |
|
390 | @templatefilter('upper') | |
392 | def upper(text): |
|
391 | def upper(text): | |
393 | """Any text. Converts the text to uppercase.""" |
|
392 | """Any text. Converts the text to uppercase.""" | |
394 | return encoding.upper(text) |
|
393 | return encoding.upper(text) | |
395 |
|
394 | |||
396 | @templatefilter('urlescape') |
|
395 | @templatefilter('urlescape') | |
397 | def urlescape(text): |
|
396 | def urlescape(text): | |
398 | """Any text. Escapes all "special" characters. For example, |
|
397 | """Any text. Escapes all "special" characters. For example, | |
399 | "foo bar" becomes "foo%20bar". |
|
398 | "foo bar" becomes "foo%20bar". | |
400 | """ |
|
399 | """ | |
401 | return urlreq.quote(text) |
|
400 | return urlreq.quote(text) | |
402 |
|
401 | |||
403 | @templatefilter('user') |
|
402 | @templatefilter('user') | |
404 | def userfilter(text): |
|
403 | def userfilter(text): | |
405 | """Any text. Returns a short representation of a user name or email |
|
404 | """Any text. Returns a short representation of a user name or email | |
406 | address.""" |
|
405 | address.""" | |
407 | return util.shortuser(text) |
|
406 | return util.shortuser(text) | |
408 |
|
407 | |||
409 | @templatefilter('emailuser') |
|
408 | @templatefilter('emailuser') | |
410 | def emailuser(text): |
|
409 | def emailuser(text): | |
411 | """Any text. Returns the user portion of an email address.""" |
|
410 | """Any text. Returns the user portion of an email address.""" | |
412 | return util.emailuser(text) |
|
411 | return util.emailuser(text) | |
413 |
|
412 | |||
414 | @templatefilter('utf8') |
|
413 | @templatefilter('utf8') | |
415 | def utf8(text): |
|
414 | def utf8(text): | |
416 | """Any text. Converts from the local character encoding to UTF-8.""" |
|
415 | """Any text. Converts from the local character encoding to UTF-8.""" | |
417 | return encoding.fromlocal(text) |
|
416 | return encoding.fromlocal(text) | |
418 |
|
417 | |||
419 | @templatefilter('xmlescape') |
|
418 | @templatefilter('xmlescape') | |
420 | def xmlescape(text): |
|
419 | def xmlescape(text): | |
421 | text = (text |
|
420 | text = (text | |
422 | .replace('&', '&') |
|
421 | .replace('&', '&') | |
423 | .replace('<', '<') |
|
422 | .replace('<', '<') | |
424 | .replace('>', '>') |
|
423 | .replace('>', '>') | |
425 | .replace('"', '"') |
|
424 | .replace('"', '"') | |
426 | .replace("'", ''')) # ' invalid in HTML |
|
425 | .replace("'", ''')) # ' invalid in HTML | |
427 | return re.sub('[\x00-\x08\x0B\x0C\x0E-\x1F]', ' ', text) |
|
426 | return re.sub('[\x00-\x08\x0B\x0C\x0E-\x1F]', ' ', text) | |
428 |
|
427 | |||
429 | def websub(text, websubtable): |
|
428 | def websub(text, websubtable): | |
430 | """:websub: Any text. Only applies to hgweb. Applies the regular |
|
429 | """:websub: Any text. Only applies to hgweb. Applies the regular | |
431 | expression replacements defined in the websub section. |
|
430 | expression replacements defined in the websub section. | |
432 | """ |
|
431 | """ | |
433 | if websubtable: |
|
432 | if websubtable: | |
434 | for regexp, format in websubtable: |
|
433 | for regexp, format in websubtable: | |
435 | text = regexp.sub(format, text) |
|
434 | text = regexp.sub(format, text) | |
436 | return text |
|
435 | return text | |
437 |
|
436 | |||
438 | def loadfilter(ui, extname, registrarobj): |
|
437 | def loadfilter(ui, extname, registrarobj): | |
439 | """Load template filter from specified registrarobj |
|
438 | """Load template filter from specified registrarobj | |
440 | """ |
|
439 | """ | |
441 | for name, func in registrarobj._table.iteritems(): |
|
440 | for name, func in registrarobj._table.iteritems(): | |
442 | filters[name] = func |
|
441 | filters[name] = func | |
443 |
|
442 | |||
444 | # tell hggettext to extract docstrings from these functions: |
|
443 | # tell hggettext to extract docstrings from these functions: | |
445 | i18nfunctions = filters.values() |
|
444 | i18nfunctions = filters.values() |
@@ -1,4696 +1,4701 b'' | |||||
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 | Filters bind as close as map operator: |
|
137 | Filters bind as close as map operator: | |
138 |
|
138 | |||
139 | $ hg debugtemplate -r0 -v '{desc|splitlines % "{line}\n"}' |
|
139 | $ hg debugtemplate -r0 -v '{desc|splitlines % "{line}\n"}' | |
140 | (template |
|
140 | (template | |
141 | (% |
|
141 | (% | |
142 | (| |
|
142 | (| | |
143 | (symbol 'desc') |
|
143 | (symbol 'desc') | |
144 | (symbol 'splitlines')) |
|
144 | (symbol 'splitlines')) | |
145 | (template |
|
145 | (template | |
146 | (symbol 'line') |
|
146 | (symbol 'line') | |
147 | (string '\n')))) |
|
147 | (string '\n')))) | |
148 | line 1 |
|
148 | line 1 | |
149 | line 2 |
|
149 | line 2 | |
150 |
|
150 | |||
151 | Keyword arguments: |
|
151 | Keyword arguments: | |
152 |
|
152 | |||
153 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' |
|
153 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' | |
154 | (template |
|
154 | (template | |
155 | (keyvalue |
|
155 | (keyvalue | |
156 | (symbol 'foo') |
|
156 | (symbol 'foo') | |
157 | (| |
|
157 | (| | |
158 | (symbol 'bar') |
|
158 | (symbol 'bar') | |
159 | (symbol 'baz')))) |
|
159 | (symbol 'baz')))) | |
160 | hg: parse error: can't use a key-value pair in this context |
|
160 | hg: parse error: can't use a key-value pair in this context | |
161 | [255] |
|
161 | [255] | |
162 |
|
162 | |||
163 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' |
|
163 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' | |
164 | foo |
|
164 | foo | |
165 |
|
165 | |||
166 | Call function which takes named arguments by filter syntax: |
|
166 | Call function which takes named arguments by filter syntax: | |
167 |
|
167 | |||
168 | $ hg debugtemplate '{" "|separate}' |
|
168 | $ hg debugtemplate '{" "|separate}' | |
169 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' |
|
169 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' | |
170 | hg: parse error: unknown method 'list' |
|
170 | hg: parse error: unknown method 'list' | |
171 | [255] |
|
171 | [255] | |
172 |
|
172 | |||
173 | Second branch starting at nullrev: |
|
173 | Second branch starting at nullrev: | |
174 |
|
174 | |||
175 | $ hg update null |
|
175 | $ hg update null | |
176 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
176 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
177 | $ echo second > second |
|
177 | $ echo second > second | |
178 | $ hg add second |
|
178 | $ hg add second | |
179 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' |
|
179 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' | |
180 | created new head |
|
180 | created new head | |
181 |
|
181 | |||
182 | $ echo third > third |
|
182 | $ echo third > third | |
183 | $ hg add third |
|
183 | $ hg add third | |
184 | $ hg mv second fourth |
|
184 | $ hg mv second fourth | |
185 | $ hg commit -m third -d "2020-01-01 10:01" |
|
185 | $ hg commit -m third -d "2020-01-01 10:01" | |
186 |
|
186 | |||
187 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . |
|
187 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . | |
188 | fourth (second) |
|
188 | fourth (second) | |
189 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . |
|
189 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . | |
190 | second -> fourth |
|
190 | second -> fourth | |
191 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 |
|
191 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 | |
192 | 8 t |
|
192 | 8 t | |
193 | 7 f |
|
193 | 7 f | |
194 |
|
194 | |||
195 | Working-directory revision has special identifiers, though they are still |
|
195 | Working-directory revision has special identifiers, though they are still | |
196 | experimental: |
|
196 | experimental: | |
197 |
|
197 | |||
198 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' |
|
198 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' | |
199 | 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
199 | 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
200 |
|
200 | |||
201 | Some keywords are invalid for working-directory revision, but they should |
|
201 | Some keywords are invalid for working-directory revision, but they should | |
202 | never cause crash: |
|
202 | never cause crash: | |
203 |
|
203 | |||
204 | $ hg log -r 'wdir()' -T '{manifest}\n' |
|
204 | $ hg log -r 'wdir()' -T '{manifest}\n' | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | Quoting for ui.logtemplate |
|
207 | Quoting for ui.logtemplate | |
208 |
|
208 | |||
209 | $ hg tip --config "ui.logtemplate={rev}\n" |
|
209 | $ hg tip --config "ui.logtemplate={rev}\n" | |
210 | 8 |
|
210 | 8 | |
211 | $ hg tip --config "ui.logtemplate='{rev}\n'" |
|
211 | $ hg tip --config "ui.logtemplate='{rev}\n'" | |
212 | 8 |
|
212 | 8 | |
213 | $ hg tip --config 'ui.logtemplate="{rev}\n"' |
|
213 | $ hg tip --config 'ui.logtemplate="{rev}\n"' | |
214 | 8 |
|
214 | 8 | |
215 | $ hg tip --config 'ui.logtemplate=n{rev}\n' |
|
215 | $ hg tip --config 'ui.logtemplate=n{rev}\n' | |
216 | n8 |
|
216 | n8 | |
217 |
|
217 | |||
218 | Make sure user/global hgrc does not affect tests |
|
218 | Make sure user/global hgrc does not affect tests | |
219 |
|
219 | |||
220 | $ echo '[ui]' > .hg/hgrc |
|
220 | $ echo '[ui]' > .hg/hgrc | |
221 | $ echo 'logtemplate =' >> .hg/hgrc |
|
221 | $ echo 'logtemplate =' >> .hg/hgrc | |
222 | $ echo 'style =' >> .hg/hgrc |
|
222 | $ echo 'style =' >> .hg/hgrc | |
223 |
|
223 | |||
224 | Add some simple styles to settings |
|
224 | Add some simple styles to settings | |
225 |
|
225 | |||
226 | $ cat <<'EOF' >> .hg/hgrc |
|
226 | $ cat <<'EOF' >> .hg/hgrc | |
227 | > [templates] |
|
227 | > [templates] | |
228 | > simple = "{rev}\n" |
|
228 | > simple = "{rev}\n" | |
229 | > simple2 = {rev}\n |
|
229 | > simple2 = {rev}\n | |
230 | > rev = "should not precede {rev} keyword\n" |
|
230 | > rev = "should not precede {rev} keyword\n" | |
231 | > EOF |
|
231 | > EOF | |
232 |
|
232 | |||
233 | $ hg log -l1 -Tsimple |
|
233 | $ hg log -l1 -Tsimple | |
234 | 8 |
|
234 | 8 | |
235 | $ hg log -l1 -Tsimple2 |
|
235 | $ hg log -l1 -Tsimple2 | |
236 | 8 |
|
236 | 8 | |
237 | $ hg log -l1 -Trev |
|
237 | $ hg log -l1 -Trev | |
238 | should not precede 8 keyword |
|
238 | should not precede 8 keyword | |
239 | $ hg log -l1 -T '{simple}' |
|
239 | $ hg log -l1 -T '{simple}' | |
240 | 8 |
|
240 | 8 | |
241 |
|
241 | |||
242 | Map file shouldn't see user templates: |
|
242 | Map file shouldn't see user templates: | |
243 |
|
243 | |||
244 | $ cat <<EOF > tmpl |
|
244 | $ cat <<EOF > tmpl | |
245 | > changeset = 'nothing expanded:{simple}\n' |
|
245 | > changeset = 'nothing expanded:{simple}\n' | |
246 | > EOF |
|
246 | > EOF | |
247 | $ hg log -l1 --style ./tmpl |
|
247 | $ hg log -l1 --style ./tmpl | |
248 | nothing expanded: |
|
248 | nothing expanded: | |
249 |
|
249 | |||
250 | Test templates and style maps in files: |
|
250 | Test templates and style maps in files: | |
251 |
|
251 | |||
252 | $ echo "{rev}" > tmpl |
|
252 | $ echo "{rev}" > tmpl | |
253 | $ hg log -l1 -T./tmpl |
|
253 | $ hg log -l1 -T./tmpl | |
254 | 8 |
|
254 | 8 | |
255 | $ hg log -l1 -Tblah/blah |
|
255 | $ hg log -l1 -Tblah/blah | |
256 | blah/blah (no-eol) |
|
256 | blah/blah (no-eol) | |
257 |
|
257 | |||
258 | $ printf 'changeset = "{rev}\\n"\n' > map-simple |
|
258 | $ printf 'changeset = "{rev}\\n"\n' > map-simple | |
259 | $ hg log -l1 -T./map-simple |
|
259 | $ hg log -l1 -T./map-simple | |
260 | 8 |
|
260 | 8 | |
261 |
|
261 | |||
262 | a map file may have [templates] and [templatealias] sections: |
|
262 | a map file may have [templates] and [templatealias] sections: | |
263 |
|
263 | |||
264 | $ cat <<'EOF' > map-simple |
|
264 | $ cat <<'EOF' > map-simple | |
265 | > [templates] |
|
265 | > [templates] | |
266 | > changeset = "{a}\n" |
|
266 | > changeset = "{a}\n" | |
267 | > [templatealias] |
|
267 | > [templatealias] | |
268 | > a = rev |
|
268 | > a = rev | |
269 | > EOF |
|
269 | > EOF | |
270 | $ hg log -l1 -T./map-simple |
|
270 | $ hg log -l1 -T./map-simple | |
271 | 8 |
|
271 | 8 | |
272 |
|
272 | |||
273 | so it can be included in hgrc |
|
273 | so it can be included in hgrc | |
274 |
|
274 | |||
275 | $ cat <<'EOF' > myhgrc |
|
275 | $ cat <<'EOF' > myhgrc | |
276 | > %include map-simple |
|
276 | > %include map-simple | |
277 | > [templates] |
|
277 | > [templates] | |
278 | > foo = "{changeset}" |
|
278 | > foo = "{changeset}" | |
279 | > EOF |
|
279 | > EOF | |
280 | $ HGRCPATH=./myhgrc hg log -l1 -Tfoo |
|
280 | $ HGRCPATH=./myhgrc hg log -l1 -Tfoo | |
281 | 8 |
|
281 | 8 | |
282 | $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' |
|
282 | $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' | |
283 | 8 |
|
283 | 8 | |
284 |
|
284 | |||
285 | Test template map inheritance |
|
285 | Test template map inheritance | |
286 |
|
286 | |||
287 | $ echo "__base__ = map-cmdline.default" > map-simple |
|
287 | $ echo "__base__ = map-cmdline.default" > map-simple | |
288 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple |
|
288 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple | |
289 | $ hg log -l1 -T./map-simple |
|
289 | $ hg log -l1 -T./map-simple | |
290 | changeset: ***8*** |
|
290 | changeset: ***8*** | |
291 | tag: tip |
|
291 | tag: tip | |
292 | user: test |
|
292 | user: test | |
293 | date: Wed Jan 01 10:01:00 2020 +0000 |
|
293 | date: Wed Jan 01 10:01:00 2020 +0000 | |
294 | summary: third |
|
294 | summary: third | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | Test docheader, docfooter and separator in template map |
|
297 | Test docheader, docfooter and separator in template map | |
298 |
|
298 | |||
299 | $ cat <<'EOF' > map-myjson |
|
299 | $ cat <<'EOF' > map-myjson | |
300 | > docheader = '\{\n' |
|
300 | > docheader = '\{\n' | |
301 | > docfooter = '\n}\n' |
|
301 | > docfooter = '\n}\n' | |
302 | > separator = ',\n' |
|
302 | > separator = ',\n' | |
303 | > changeset = ' {dict(rev, node|short)|json}' |
|
303 | > changeset = ' {dict(rev, node|short)|json}' | |
304 | > EOF |
|
304 | > EOF | |
305 | $ hg log -l2 -T./map-myjson |
|
305 | $ hg log -l2 -T./map-myjson | |
306 | { |
|
306 | { | |
307 | {"node": "95c24699272e", "rev": 8}, |
|
307 | {"node": "95c24699272e", "rev": 8}, | |
308 | {"node": "29114dbae42b", "rev": 7} |
|
308 | {"node": "29114dbae42b", "rev": 7} | |
309 | } |
|
309 | } | |
310 |
|
310 | |||
311 | Test docheader, docfooter and separator in [templates] section |
|
311 | Test docheader, docfooter and separator in [templates] section | |
312 |
|
312 | |||
313 | $ cat <<'EOF' >> .hg/hgrc |
|
313 | $ cat <<'EOF' >> .hg/hgrc | |
314 | > [templates] |
|
314 | > [templates] | |
315 | > myjson = ' {dict(rev, node|short)|json}' |
|
315 | > myjson = ' {dict(rev, node|short)|json}' | |
316 | > myjson:docheader = '\{\n' |
|
316 | > myjson:docheader = '\{\n' | |
317 | > myjson:docfooter = '\n}\n' |
|
317 | > myjson:docfooter = '\n}\n' | |
318 | > myjson:separator = ',\n' |
|
318 | > myjson:separator = ',\n' | |
319 | > :docheader = 'should not be selected as a docheader for literal templates\n' |
|
319 | > :docheader = 'should not be selected as a docheader for literal templates\n' | |
320 | > EOF |
|
320 | > EOF | |
321 | $ hg log -l2 -Tmyjson |
|
321 | $ hg log -l2 -Tmyjson | |
322 | { |
|
322 | { | |
323 | {"node": "95c24699272e", "rev": 8}, |
|
323 | {"node": "95c24699272e", "rev": 8}, | |
324 | {"node": "29114dbae42b", "rev": 7} |
|
324 | {"node": "29114dbae42b", "rev": 7} | |
325 | } |
|
325 | } | |
326 | $ hg log -l1 -T'{rev}\n' |
|
326 | $ hg log -l1 -T'{rev}\n' | |
327 | 8 |
|
327 | 8 | |
328 |
|
328 | |||
329 | Template should precede style option |
|
329 | Template should precede style option | |
330 |
|
330 | |||
331 | $ hg log -l1 --style default -T '{rev}\n' |
|
331 | $ hg log -l1 --style default -T '{rev}\n' | |
332 | 8 |
|
332 | 8 | |
333 |
|
333 | |||
334 | Add a commit with empty description, to ensure that the templates |
|
334 | Add a commit with empty description, to ensure that the templates | |
335 | below will omit the description line. |
|
335 | below will omit the description line. | |
336 |
|
336 | |||
337 | $ echo c >> c |
|
337 | $ echo c >> c | |
338 | $ hg add c |
|
338 | $ hg add c | |
339 | $ hg commit -qm ' ' |
|
339 | $ hg commit -qm ' ' | |
340 |
|
340 | |||
341 | Default style is like normal output. Phases style should be the same |
|
341 | Default style is like normal output. Phases style should be the same | |
342 | as default style, except for extra phase lines. |
|
342 | as default style, except for extra phase lines. | |
343 |
|
343 | |||
344 | $ hg log > log.out |
|
344 | $ hg log > log.out | |
345 | $ hg log --style default > style.out |
|
345 | $ hg log --style default > style.out | |
346 | $ cmp log.out style.out || diff -u log.out style.out |
|
346 | $ cmp log.out style.out || diff -u log.out style.out | |
347 | $ hg log -T phases > phases.out |
|
347 | $ hg log -T phases > phases.out | |
348 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
348 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
349 | +phase: draft |
|
349 | +phase: draft | |
350 | +phase: draft |
|
350 | +phase: draft | |
351 | +phase: draft |
|
351 | +phase: draft | |
352 | +phase: draft |
|
352 | +phase: draft | |
353 | +phase: draft |
|
353 | +phase: draft | |
354 | +phase: draft |
|
354 | +phase: draft | |
355 | +phase: draft |
|
355 | +phase: draft | |
356 | +phase: draft |
|
356 | +phase: draft | |
357 | +phase: draft |
|
357 | +phase: draft | |
358 | +phase: draft |
|
358 | +phase: draft | |
359 |
|
359 | |||
360 | $ hg log -v > log.out |
|
360 | $ hg log -v > log.out | |
361 | $ hg log -v --style default > style.out |
|
361 | $ hg log -v --style default > style.out | |
362 | $ cmp log.out style.out || diff -u log.out style.out |
|
362 | $ cmp log.out style.out || diff -u log.out style.out | |
363 | $ hg log -v -T phases > phases.out |
|
363 | $ hg log -v -T phases > phases.out | |
364 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
364 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
365 | +phase: draft |
|
365 | +phase: draft | |
366 | +phase: draft |
|
366 | +phase: draft | |
367 | +phase: draft |
|
367 | +phase: draft | |
368 | +phase: draft |
|
368 | +phase: draft | |
369 | +phase: draft |
|
369 | +phase: draft | |
370 | +phase: draft |
|
370 | +phase: draft | |
371 | +phase: draft |
|
371 | +phase: draft | |
372 | +phase: draft |
|
372 | +phase: draft | |
373 | +phase: draft |
|
373 | +phase: draft | |
374 | +phase: draft |
|
374 | +phase: draft | |
375 |
|
375 | |||
376 | $ hg log -q > log.out |
|
376 | $ hg log -q > log.out | |
377 | $ hg log -q --style default > style.out |
|
377 | $ hg log -q --style default > style.out | |
378 | $ cmp log.out style.out || diff -u log.out style.out |
|
378 | $ cmp log.out style.out || diff -u log.out style.out | |
379 | $ hg log -q -T phases > phases.out |
|
379 | $ hg log -q -T phases > phases.out | |
380 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
380 | $ cmp log.out phases.out || diff -u log.out phases.out | |
381 |
|
381 | |||
382 | $ hg log --debug > log.out |
|
382 | $ hg log --debug > log.out | |
383 | $ hg log --debug --style default > style.out |
|
383 | $ hg log --debug --style default > style.out | |
384 | $ cmp log.out style.out || diff -u log.out style.out |
|
384 | $ cmp log.out style.out || diff -u log.out style.out | |
385 | $ hg log --debug -T phases > phases.out |
|
385 | $ hg log --debug -T phases > phases.out | |
386 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
386 | $ cmp log.out phases.out || diff -u log.out phases.out | |
387 |
|
387 | |||
388 | Default style of working-directory revision should also be the same (but |
|
388 | Default style of working-directory revision should also be the same (but | |
389 | date may change while running tests): |
|
389 | date may change while running tests): | |
390 |
|
390 | |||
391 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out |
|
391 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out | |
392 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out |
|
392 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out | |
393 | $ cmp log.out style.out || diff -u log.out style.out |
|
393 | $ cmp log.out style.out || diff -u log.out style.out | |
394 |
|
394 | |||
395 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out |
|
395 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out | |
396 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out |
|
396 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out | |
397 | $ cmp log.out style.out || diff -u log.out style.out |
|
397 | $ cmp log.out style.out || diff -u log.out style.out | |
398 |
|
398 | |||
399 | $ hg log -r 'wdir()' -q > log.out |
|
399 | $ hg log -r 'wdir()' -q > log.out | |
400 | $ hg log -r 'wdir()' -q --style default > style.out |
|
400 | $ hg log -r 'wdir()' -q --style default > style.out | |
401 | $ cmp log.out style.out || diff -u log.out style.out |
|
401 | $ cmp log.out style.out || diff -u log.out style.out | |
402 |
|
402 | |||
403 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out |
|
403 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out | |
404 | $ hg log -r 'wdir()' --debug --style default \ |
|
404 | $ hg log -r 'wdir()' --debug --style default \ | |
405 | > | sed 's|^date:.*|date:|' > style.out |
|
405 | > | sed 's|^date:.*|date:|' > style.out | |
406 | $ cmp log.out style.out || diff -u log.out style.out |
|
406 | $ cmp log.out style.out || diff -u log.out style.out | |
407 |
|
407 | |||
408 | Default style should also preserve color information (issue2866): |
|
408 | Default style should also preserve color information (issue2866): | |
409 |
|
409 | |||
410 | $ cp $HGRCPATH $HGRCPATH-bak |
|
410 | $ cp $HGRCPATH $HGRCPATH-bak | |
411 | $ cat <<EOF >> $HGRCPATH |
|
411 | $ cat <<EOF >> $HGRCPATH | |
412 | > [extensions] |
|
412 | > [extensions] | |
413 | > color= |
|
413 | > color= | |
414 | > EOF |
|
414 | > EOF | |
415 |
|
415 | |||
416 | $ hg --color=debug log > log.out |
|
416 | $ hg --color=debug log > log.out | |
417 | $ hg --color=debug log --style default > style.out |
|
417 | $ hg --color=debug log --style default > style.out | |
418 | $ cmp log.out style.out || diff -u log.out style.out |
|
418 | $ cmp log.out style.out || diff -u log.out style.out | |
419 | $ hg --color=debug log -T phases > phases.out |
|
419 | $ hg --color=debug log -T phases > phases.out | |
420 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
420 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
421 | +[log.phase|phase: draft] |
|
421 | +[log.phase|phase: draft] | |
422 | +[log.phase|phase: draft] |
|
422 | +[log.phase|phase: draft] | |
423 | +[log.phase|phase: draft] |
|
423 | +[log.phase|phase: draft] | |
424 | +[log.phase|phase: draft] |
|
424 | +[log.phase|phase: draft] | |
425 | +[log.phase|phase: draft] |
|
425 | +[log.phase|phase: draft] | |
426 | +[log.phase|phase: draft] |
|
426 | +[log.phase|phase: draft] | |
427 | +[log.phase|phase: draft] |
|
427 | +[log.phase|phase: draft] | |
428 | +[log.phase|phase: draft] |
|
428 | +[log.phase|phase: draft] | |
429 | +[log.phase|phase: draft] |
|
429 | +[log.phase|phase: draft] | |
430 | +[log.phase|phase: draft] |
|
430 | +[log.phase|phase: draft] | |
431 |
|
431 | |||
432 | $ hg --color=debug -v log > log.out |
|
432 | $ hg --color=debug -v log > log.out | |
433 | $ hg --color=debug -v log --style default > style.out |
|
433 | $ hg --color=debug -v log --style default > style.out | |
434 | $ cmp log.out style.out || diff -u log.out style.out |
|
434 | $ cmp log.out style.out || diff -u log.out style.out | |
435 | $ hg --color=debug -v log -T phases > phases.out |
|
435 | $ hg --color=debug -v log -T phases > phases.out | |
436 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
436 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
437 | +[log.phase|phase: draft] |
|
437 | +[log.phase|phase: draft] | |
438 | +[log.phase|phase: draft] |
|
438 | +[log.phase|phase: draft] | |
439 | +[log.phase|phase: draft] |
|
439 | +[log.phase|phase: draft] | |
440 | +[log.phase|phase: draft] |
|
440 | +[log.phase|phase: draft] | |
441 | +[log.phase|phase: draft] |
|
441 | +[log.phase|phase: draft] | |
442 | +[log.phase|phase: draft] |
|
442 | +[log.phase|phase: draft] | |
443 | +[log.phase|phase: draft] |
|
443 | +[log.phase|phase: draft] | |
444 | +[log.phase|phase: draft] |
|
444 | +[log.phase|phase: draft] | |
445 | +[log.phase|phase: draft] |
|
445 | +[log.phase|phase: draft] | |
446 | +[log.phase|phase: draft] |
|
446 | +[log.phase|phase: draft] | |
447 |
|
447 | |||
448 | $ hg --color=debug -q log > log.out |
|
448 | $ hg --color=debug -q log > log.out | |
449 | $ hg --color=debug -q log --style default > style.out |
|
449 | $ hg --color=debug -q log --style default > style.out | |
450 | $ cmp log.out style.out || diff -u log.out style.out |
|
450 | $ cmp log.out style.out || diff -u log.out style.out | |
451 | $ hg --color=debug -q log -T phases > phases.out |
|
451 | $ hg --color=debug -q log -T phases > phases.out | |
452 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
452 | $ cmp log.out phases.out || diff -u log.out phases.out | |
453 |
|
453 | |||
454 | $ hg --color=debug --debug log > log.out |
|
454 | $ hg --color=debug --debug log > log.out | |
455 | $ hg --color=debug --debug log --style default > style.out |
|
455 | $ hg --color=debug --debug log --style default > style.out | |
456 | $ cmp log.out style.out || diff -u log.out style.out |
|
456 | $ cmp log.out style.out || diff -u log.out style.out | |
457 | $ hg --color=debug --debug log -T phases > phases.out |
|
457 | $ hg --color=debug --debug log -T phases > phases.out | |
458 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
458 | $ cmp log.out phases.out || diff -u log.out phases.out | |
459 |
|
459 | |||
460 | $ mv $HGRCPATH-bak $HGRCPATH |
|
460 | $ mv $HGRCPATH-bak $HGRCPATH | |
461 |
|
461 | |||
462 | Remove commit with empty commit message, so as to not pollute further |
|
462 | Remove commit with empty commit message, so as to not pollute further | |
463 | tests. |
|
463 | tests. | |
464 |
|
464 | |||
465 | $ hg --config extensions.strip= strip -q . |
|
465 | $ hg --config extensions.strip= strip -q . | |
466 |
|
466 | |||
467 | Revision with no copies (used to print a traceback): |
|
467 | Revision with no copies (used to print a traceback): | |
468 |
|
468 | |||
469 | $ hg tip -v --template '\n' |
|
469 | $ hg tip -v --template '\n' | |
470 |
|
470 | |||
471 |
|
471 | |||
472 | Compact style works: |
|
472 | Compact style works: | |
473 |
|
473 | |||
474 | $ hg log -Tcompact |
|
474 | $ hg log -Tcompact | |
475 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
475 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
476 | third |
|
476 | third | |
477 |
|
477 | |||
478 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user |
|
478 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user | |
479 | second |
|
479 | second | |
480 |
|
480 | |||
481 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
481 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
482 | merge |
|
482 | merge | |
483 |
|
483 | |||
484 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
484 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
485 | new head |
|
485 | new head | |
486 |
|
486 | |||
487 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
487 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
488 | new branch |
|
488 | new branch | |
489 |
|
489 | |||
490 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
490 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
491 | no user, no domain |
|
491 | no user, no domain | |
492 |
|
492 | |||
493 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other |
|
493 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other | |
494 | no person |
|
494 | no person | |
495 |
|
495 | |||
496 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other |
|
496 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other | |
497 | other 1 |
|
497 | other 1 | |
498 |
|
498 | |||
499 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user |
|
499 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user | |
500 | line 1 |
|
500 | line 1 | |
501 |
|
501 | |||
502 |
|
502 | |||
503 | $ hg log -v --style compact |
|
503 | $ hg log -v --style compact | |
504 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
504 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
505 | third |
|
505 | third | |
506 |
|
506 | |||
507 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
507 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
508 | second |
|
508 | second | |
509 |
|
509 | |||
510 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
510 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
511 | merge |
|
511 | merge | |
512 |
|
512 | |||
513 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
513 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
514 | new head |
|
514 | new head | |
515 |
|
515 | |||
516 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
516 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
517 | new branch |
|
517 | new branch | |
518 |
|
518 | |||
519 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
519 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
520 | no user, no domain |
|
520 | no user, no domain | |
521 |
|
521 | |||
522 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
522 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
523 | no person |
|
523 | no person | |
524 |
|
524 | |||
525 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
525 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
526 | other 1 |
|
526 | other 1 | |
527 | other 2 |
|
527 | other 2 | |
528 |
|
528 | |||
529 | other 3 |
|
529 | other 3 | |
530 |
|
530 | |||
531 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
531 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
532 | line 1 |
|
532 | line 1 | |
533 | line 2 |
|
533 | line 2 | |
534 |
|
534 | |||
535 |
|
535 | |||
536 | $ hg log --debug --style compact |
|
536 | $ hg log --debug --style compact | |
537 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test |
|
537 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test | |
538 | third |
|
538 | third | |
539 |
|
539 | |||
540 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
540 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
541 | second |
|
541 | second | |
542 |
|
542 | |||
543 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
543 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
544 | merge |
|
544 | merge | |
545 |
|
545 | |||
546 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
546 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person | |
547 | new head |
|
547 | new head | |
548 |
|
548 | |||
549 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
549 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person | |
550 | new branch |
|
550 | new branch | |
551 |
|
551 | |||
552 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
552 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
553 | no user, no domain |
|
553 | no user, no domain | |
554 |
|
554 | |||
555 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
555 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
556 | no person |
|
556 | no person | |
557 |
|
557 | |||
558 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
558 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
559 | other 1 |
|
559 | other 1 | |
560 | other 2 |
|
560 | other 2 | |
561 |
|
561 | |||
562 | other 3 |
|
562 | other 3 | |
563 |
|
563 | |||
564 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
564 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
565 | line 1 |
|
565 | line 1 | |
566 | line 2 |
|
566 | line 2 | |
567 |
|
567 | |||
568 |
|
568 | |||
569 | Test xml styles: |
|
569 | Test xml styles: | |
570 |
|
570 | |||
571 | $ hg log --style xml -r 'not all()' |
|
571 | $ hg log --style xml -r 'not all()' | |
572 | <?xml version="1.0"?> |
|
572 | <?xml version="1.0"?> | |
573 | <log> |
|
573 | <log> | |
574 | </log> |
|
574 | </log> | |
575 |
|
575 | |||
576 | $ hg log --style xml |
|
576 | $ hg log --style xml | |
577 | <?xml version="1.0"?> |
|
577 | <?xml version="1.0"?> | |
578 | <log> |
|
578 | <log> | |
579 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
579 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
580 | <tag>tip</tag> |
|
580 | <tag>tip</tag> | |
581 | <author email="test">test</author> |
|
581 | <author email="test">test</author> | |
582 | <date>2020-01-01T10:01:00+00:00</date> |
|
582 | <date>2020-01-01T10:01:00+00:00</date> | |
583 | <msg xml:space="preserve">third</msg> |
|
583 | <msg xml:space="preserve">third</msg> | |
584 | </logentry> |
|
584 | </logentry> | |
585 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
585 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
586 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
586 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
587 | <author email="user@hostname">User Name</author> |
|
587 | <author email="user@hostname">User Name</author> | |
588 | <date>1970-01-12T13:46:40+00:00</date> |
|
588 | <date>1970-01-12T13:46:40+00:00</date> | |
589 | <msg xml:space="preserve">second</msg> |
|
589 | <msg xml:space="preserve">second</msg> | |
590 | </logentry> |
|
590 | </logentry> | |
591 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
591 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
592 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
592 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
593 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
593 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
594 | <author email="person">person</author> |
|
594 | <author email="person">person</author> | |
595 | <date>1970-01-18T08:40:01+00:00</date> |
|
595 | <date>1970-01-18T08:40:01+00:00</date> | |
596 | <msg xml:space="preserve">merge</msg> |
|
596 | <msg xml:space="preserve">merge</msg> | |
597 | </logentry> |
|
597 | </logentry> | |
598 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
598 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
599 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
599 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
600 | <author email="person">person</author> |
|
600 | <author email="person">person</author> | |
601 | <date>1970-01-18T08:40:00+00:00</date> |
|
601 | <date>1970-01-18T08:40:00+00:00</date> | |
602 | <msg xml:space="preserve">new head</msg> |
|
602 | <msg xml:space="preserve">new head</msg> | |
603 | </logentry> |
|
603 | </logentry> | |
604 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
604 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
605 | <branch>foo</branch> |
|
605 | <branch>foo</branch> | |
606 | <author email="person">person</author> |
|
606 | <author email="person">person</author> | |
607 | <date>1970-01-17T04:53:20+00:00</date> |
|
607 | <date>1970-01-17T04:53:20+00:00</date> | |
608 | <msg xml:space="preserve">new branch</msg> |
|
608 | <msg xml:space="preserve">new branch</msg> | |
609 | </logentry> |
|
609 | </logentry> | |
610 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
610 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
611 | <author email="person">person</author> |
|
611 | <author email="person">person</author> | |
612 | <date>1970-01-16T01:06:40+00:00</date> |
|
612 | <date>1970-01-16T01:06:40+00:00</date> | |
613 | <msg xml:space="preserve">no user, no domain</msg> |
|
613 | <msg xml:space="preserve">no user, no domain</msg> | |
614 | </logentry> |
|
614 | </logentry> | |
615 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
615 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
616 | <author email="other@place">other</author> |
|
616 | <author email="other@place">other</author> | |
617 | <date>1970-01-14T21:20:00+00:00</date> |
|
617 | <date>1970-01-14T21:20:00+00:00</date> | |
618 | <msg xml:space="preserve">no person</msg> |
|
618 | <msg xml:space="preserve">no person</msg> | |
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 | </logentry> |
|
627 | </logentry> | |
628 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
628 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
629 | <author email="user@hostname">User Name</author> |
|
629 | <author email="user@hostname">User Name</author> | |
630 | <date>1970-01-12T13:46:40+00:00</date> |
|
630 | <date>1970-01-12T13:46:40+00:00</date> | |
631 | <msg xml:space="preserve">line 1 |
|
631 | <msg xml:space="preserve">line 1 | |
632 | line 2</msg> |
|
632 | line 2</msg> | |
633 | </logentry> |
|
633 | </logentry> | |
634 | </log> |
|
634 | </log> | |
635 |
|
635 | |||
636 | $ hg log -v --style xml |
|
636 | $ hg log -v --style xml | |
637 | <?xml version="1.0"?> |
|
637 | <?xml version="1.0"?> | |
638 | <log> |
|
638 | <log> | |
639 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
639 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
640 | <tag>tip</tag> |
|
640 | <tag>tip</tag> | |
641 | <author email="test">test</author> |
|
641 | <author email="test">test</author> | |
642 | <date>2020-01-01T10:01:00+00:00</date> |
|
642 | <date>2020-01-01T10:01:00+00:00</date> | |
643 | <msg xml:space="preserve">third</msg> |
|
643 | <msg xml:space="preserve">third</msg> | |
644 | <paths> |
|
644 | <paths> | |
645 | <path action="A">fourth</path> |
|
645 | <path action="A">fourth</path> | |
646 | <path action="A">third</path> |
|
646 | <path action="A">third</path> | |
647 | <path action="R">second</path> |
|
647 | <path action="R">second</path> | |
648 | </paths> |
|
648 | </paths> | |
649 | <copies> |
|
649 | <copies> | |
650 | <copy source="second">fourth</copy> |
|
650 | <copy source="second">fourth</copy> | |
651 | </copies> |
|
651 | </copies> | |
652 | </logentry> |
|
652 | </logentry> | |
653 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
653 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
654 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
654 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
655 | <author email="user@hostname">User Name</author> |
|
655 | <author email="user@hostname">User Name</author> | |
656 | <date>1970-01-12T13:46:40+00:00</date> |
|
656 | <date>1970-01-12T13:46:40+00:00</date> | |
657 | <msg xml:space="preserve">second</msg> |
|
657 | <msg xml:space="preserve">second</msg> | |
658 | <paths> |
|
658 | <paths> | |
659 | <path action="A">second</path> |
|
659 | <path action="A">second</path> | |
660 | </paths> |
|
660 | </paths> | |
661 | </logentry> |
|
661 | </logentry> | |
662 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
662 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
663 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
663 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
664 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
664 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
665 | <author email="person">person</author> |
|
665 | <author email="person">person</author> | |
666 | <date>1970-01-18T08:40:01+00:00</date> |
|
666 | <date>1970-01-18T08:40:01+00:00</date> | |
667 | <msg xml:space="preserve">merge</msg> |
|
667 | <msg xml:space="preserve">merge</msg> | |
668 | <paths> |
|
668 | <paths> | |
669 | </paths> |
|
669 | </paths> | |
670 | </logentry> |
|
670 | </logentry> | |
671 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
671 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
672 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
672 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
673 | <author email="person">person</author> |
|
673 | <author email="person">person</author> | |
674 | <date>1970-01-18T08:40:00+00:00</date> |
|
674 | <date>1970-01-18T08:40:00+00:00</date> | |
675 | <msg xml:space="preserve">new head</msg> |
|
675 | <msg xml:space="preserve">new head</msg> | |
676 | <paths> |
|
676 | <paths> | |
677 | <path action="A">d</path> |
|
677 | <path action="A">d</path> | |
678 | </paths> |
|
678 | </paths> | |
679 | </logentry> |
|
679 | </logentry> | |
680 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
680 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
681 | <branch>foo</branch> |
|
681 | <branch>foo</branch> | |
682 | <author email="person">person</author> |
|
682 | <author email="person">person</author> | |
683 | <date>1970-01-17T04:53:20+00:00</date> |
|
683 | <date>1970-01-17T04:53:20+00:00</date> | |
684 | <msg xml:space="preserve">new branch</msg> |
|
684 | <msg xml:space="preserve">new branch</msg> | |
685 | <paths> |
|
685 | <paths> | |
686 | </paths> |
|
686 | </paths> | |
687 | </logentry> |
|
687 | </logentry> | |
688 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
688 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
689 | <author email="person">person</author> |
|
689 | <author email="person">person</author> | |
690 | <date>1970-01-16T01:06:40+00:00</date> |
|
690 | <date>1970-01-16T01:06:40+00:00</date> | |
691 | <msg xml:space="preserve">no user, no domain</msg> |
|
691 | <msg xml:space="preserve">no user, no domain</msg> | |
692 | <paths> |
|
692 | <paths> | |
693 | <path action="M">c</path> |
|
693 | <path action="M">c</path> | |
694 | </paths> |
|
694 | </paths> | |
695 | </logentry> |
|
695 | </logentry> | |
696 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
696 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
697 | <author email="other@place">other</author> |
|
697 | <author email="other@place">other</author> | |
698 | <date>1970-01-14T21:20:00+00:00</date> |
|
698 | <date>1970-01-14T21:20:00+00:00</date> | |
699 | <msg xml:space="preserve">no person</msg> |
|
699 | <msg xml:space="preserve">no person</msg> | |
700 | <paths> |
|
700 | <paths> | |
701 | <path action="A">c</path> |
|
701 | <path action="A">c</path> | |
702 | </paths> |
|
702 | </paths> | |
703 | </logentry> |
|
703 | </logentry> | |
704 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
704 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
705 | <author email="other@place">A. N. Other</author> |
|
705 | <author email="other@place">A. N. Other</author> | |
706 | <date>1970-01-13T17:33:20+00:00</date> |
|
706 | <date>1970-01-13T17:33:20+00:00</date> | |
707 | <msg xml:space="preserve">other 1 |
|
707 | <msg xml:space="preserve">other 1 | |
708 | other 2 |
|
708 | other 2 | |
709 |
|
709 | |||
710 | other 3</msg> |
|
710 | other 3</msg> | |
711 | <paths> |
|
711 | <paths> | |
712 | <path action="A">b</path> |
|
712 | <path action="A">b</path> | |
713 | </paths> |
|
713 | </paths> | |
714 | </logentry> |
|
714 | </logentry> | |
715 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
715 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
716 | <author email="user@hostname">User Name</author> |
|
716 | <author email="user@hostname">User Name</author> | |
717 | <date>1970-01-12T13:46:40+00:00</date> |
|
717 | <date>1970-01-12T13:46:40+00:00</date> | |
718 | <msg xml:space="preserve">line 1 |
|
718 | <msg xml:space="preserve">line 1 | |
719 | line 2</msg> |
|
719 | line 2</msg> | |
720 | <paths> |
|
720 | <paths> | |
721 | <path action="A">a</path> |
|
721 | <path action="A">a</path> | |
722 | </paths> |
|
722 | </paths> | |
723 | </logentry> |
|
723 | </logentry> | |
724 | </log> |
|
724 | </log> | |
725 |
|
725 | |||
726 | $ hg log --debug --style xml |
|
726 | $ hg log --debug --style xml | |
727 | <?xml version="1.0"?> |
|
727 | <?xml version="1.0"?> | |
728 | <log> |
|
728 | <log> | |
729 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
729 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
730 | <tag>tip</tag> |
|
730 | <tag>tip</tag> | |
731 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> |
|
731 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> | |
732 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
732 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
733 | <author email="test">test</author> |
|
733 | <author email="test">test</author> | |
734 | <date>2020-01-01T10:01:00+00:00</date> |
|
734 | <date>2020-01-01T10:01:00+00:00</date> | |
735 | <msg xml:space="preserve">third</msg> |
|
735 | <msg xml:space="preserve">third</msg> | |
736 | <paths> |
|
736 | <paths> | |
737 | <path action="A">fourth</path> |
|
737 | <path action="A">fourth</path> | |
738 | <path action="A">third</path> |
|
738 | <path action="A">third</path> | |
739 | <path action="R">second</path> |
|
739 | <path action="R">second</path> | |
740 | </paths> |
|
740 | </paths> | |
741 | <copies> |
|
741 | <copies> | |
742 | <copy source="second">fourth</copy> |
|
742 | <copy source="second">fourth</copy> | |
743 | </copies> |
|
743 | </copies> | |
744 | <extra key="branch">default</extra> |
|
744 | <extra key="branch">default</extra> | |
745 | </logentry> |
|
745 | </logentry> | |
746 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
746 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
747 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
747 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
748 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
748 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
749 | <author email="user@hostname">User Name</author> |
|
749 | <author email="user@hostname">User Name</author> | |
750 | <date>1970-01-12T13:46:40+00:00</date> |
|
750 | <date>1970-01-12T13:46:40+00:00</date> | |
751 | <msg xml:space="preserve">second</msg> |
|
751 | <msg xml:space="preserve">second</msg> | |
752 | <paths> |
|
752 | <paths> | |
753 | <path action="A">second</path> |
|
753 | <path action="A">second</path> | |
754 | </paths> |
|
754 | </paths> | |
755 | <extra key="branch">default</extra> |
|
755 | <extra key="branch">default</extra> | |
756 | </logentry> |
|
756 | </logentry> | |
757 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
757 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
758 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
758 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
759 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
759 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
760 | <author email="person">person</author> |
|
760 | <author email="person">person</author> | |
761 | <date>1970-01-18T08:40:01+00:00</date> |
|
761 | <date>1970-01-18T08:40:01+00:00</date> | |
762 | <msg xml:space="preserve">merge</msg> |
|
762 | <msg xml:space="preserve">merge</msg> | |
763 | <paths> |
|
763 | <paths> | |
764 | </paths> |
|
764 | </paths> | |
765 | <extra key="branch">default</extra> |
|
765 | <extra key="branch">default</extra> | |
766 | </logentry> |
|
766 | </logentry> | |
767 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
767 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
768 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
768 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
769 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
769 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
770 | <author email="person">person</author> |
|
770 | <author email="person">person</author> | |
771 | <date>1970-01-18T08:40:00+00:00</date> |
|
771 | <date>1970-01-18T08:40:00+00:00</date> | |
772 | <msg xml:space="preserve">new head</msg> |
|
772 | <msg xml:space="preserve">new head</msg> | |
773 | <paths> |
|
773 | <paths> | |
774 | <path action="A">d</path> |
|
774 | <path action="A">d</path> | |
775 | </paths> |
|
775 | </paths> | |
776 | <extra key="branch">default</extra> |
|
776 | <extra key="branch">default</extra> | |
777 | </logentry> |
|
777 | </logentry> | |
778 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
778 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
779 | <branch>foo</branch> |
|
779 | <branch>foo</branch> | |
780 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
780 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
781 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
781 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
782 | <author email="person">person</author> |
|
782 | <author email="person">person</author> | |
783 | <date>1970-01-17T04:53:20+00:00</date> |
|
783 | <date>1970-01-17T04:53:20+00:00</date> | |
784 | <msg xml:space="preserve">new branch</msg> |
|
784 | <msg xml:space="preserve">new branch</msg> | |
785 | <paths> |
|
785 | <paths> | |
786 | </paths> |
|
786 | </paths> | |
787 | <extra key="branch">foo</extra> |
|
787 | <extra key="branch">foo</extra> | |
788 | </logentry> |
|
788 | </logentry> | |
789 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
789 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
790 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> |
|
790 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> | |
791 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
791 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
792 | <author email="person">person</author> |
|
792 | <author email="person">person</author> | |
793 | <date>1970-01-16T01:06:40+00:00</date> |
|
793 | <date>1970-01-16T01:06:40+00:00</date> | |
794 | <msg xml:space="preserve">no user, no domain</msg> |
|
794 | <msg xml:space="preserve">no user, no domain</msg> | |
795 | <paths> |
|
795 | <paths> | |
796 | <path action="M">c</path> |
|
796 | <path action="M">c</path> | |
797 | </paths> |
|
797 | </paths> | |
798 | <extra key="branch">default</extra> |
|
798 | <extra key="branch">default</extra> | |
799 | </logentry> |
|
799 | </logentry> | |
800 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
800 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
801 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> |
|
801 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> | |
802 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
802 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
803 | <author email="other@place">other</author> |
|
803 | <author email="other@place">other</author> | |
804 | <date>1970-01-14T21:20:00+00:00</date> |
|
804 | <date>1970-01-14T21:20:00+00:00</date> | |
805 | <msg xml:space="preserve">no person</msg> |
|
805 | <msg xml:space="preserve">no person</msg> | |
806 | <paths> |
|
806 | <paths> | |
807 | <path action="A">c</path> |
|
807 | <path action="A">c</path> | |
808 | </paths> |
|
808 | </paths> | |
809 | <extra key="branch">default</extra> |
|
809 | <extra key="branch">default</extra> | |
810 | </logentry> |
|
810 | </logentry> | |
811 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
811 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
812 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> |
|
812 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> | |
813 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
813 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
814 | <author email="other@place">A. N. Other</author> |
|
814 | <author email="other@place">A. N. Other</author> | |
815 | <date>1970-01-13T17:33:20+00:00</date> |
|
815 | <date>1970-01-13T17:33:20+00:00</date> | |
816 | <msg xml:space="preserve">other 1 |
|
816 | <msg xml:space="preserve">other 1 | |
817 | other 2 |
|
817 | other 2 | |
818 |
|
818 | |||
819 | other 3</msg> |
|
819 | other 3</msg> | |
820 | <paths> |
|
820 | <paths> | |
821 | <path action="A">b</path> |
|
821 | <path action="A">b</path> | |
822 | </paths> |
|
822 | </paths> | |
823 | <extra key="branch">default</extra> |
|
823 | <extra key="branch">default</extra> | |
824 | </logentry> |
|
824 | </logentry> | |
825 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
825 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
826 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
826 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
827 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
827 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
828 | <author email="user@hostname">User Name</author> |
|
828 | <author email="user@hostname">User Name</author> | |
829 | <date>1970-01-12T13:46:40+00:00</date> |
|
829 | <date>1970-01-12T13:46:40+00:00</date> | |
830 | <msg xml:space="preserve">line 1 |
|
830 | <msg xml:space="preserve">line 1 | |
831 | line 2</msg> |
|
831 | line 2</msg> | |
832 | <paths> |
|
832 | <paths> | |
833 | <path action="A">a</path> |
|
833 | <path action="A">a</path> | |
834 | </paths> |
|
834 | </paths> | |
835 | <extra key="branch">default</extra> |
|
835 | <extra key="branch">default</extra> | |
836 | </logentry> |
|
836 | </logentry> | |
837 | </log> |
|
837 | </log> | |
838 |
|
838 | |||
839 |
|
839 | |||
840 | Test JSON style: |
|
840 | Test JSON style: | |
841 |
|
841 | |||
842 | $ hg log -k nosuch -Tjson |
|
842 | $ hg log -k nosuch -Tjson | |
843 | [] |
|
843 | [] | |
844 |
|
844 | |||
845 | $ hg log -qr . -Tjson |
|
845 | $ hg log -qr . -Tjson | |
846 | [ |
|
846 | [ | |
847 | { |
|
847 | { | |
848 | "rev": 8, |
|
848 | "rev": 8, | |
849 | "node": "95c24699272ef57d062b8bccc32c878bf841784a" |
|
849 | "node": "95c24699272ef57d062b8bccc32c878bf841784a" | |
850 | } |
|
850 | } | |
851 | ] |
|
851 | ] | |
852 |
|
852 | |||
853 | $ hg log -vpr . -Tjson --stat |
|
853 | $ hg log -vpr . -Tjson --stat | |
854 | [ |
|
854 | [ | |
855 | { |
|
855 | { | |
856 | "rev": 8, |
|
856 | "rev": 8, | |
857 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
857 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
858 | "branch": "default", |
|
858 | "branch": "default", | |
859 | "phase": "draft", |
|
859 | "phase": "draft", | |
860 | "user": "test", |
|
860 | "user": "test", | |
861 | "date": [1577872860, 0], |
|
861 | "date": [1577872860, 0], | |
862 | "desc": "third", |
|
862 | "desc": "third", | |
863 | "bookmarks": [], |
|
863 | "bookmarks": [], | |
864 | "tags": ["tip"], |
|
864 | "tags": ["tip"], | |
865 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
865 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
866 | "files": ["fourth", "second", "third"], |
|
866 | "files": ["fourth", "second", "third"], | |
867 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", |
|
867 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", | |
868 | "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" |
|
868 | "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" | |
869 | } |
|
869 | } | |
870 | ] |
|
870 | ] | |
871 |
|
871 | |||
872 | honor --git but not format-breaking diffopts |
|
872 | honor --git but not format-breaking diffopts | |
873 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson |
|
873 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson | |
874 | [ |
|
874 | [ | |
875 | { |
|
875 | { | |
876 | "rev": 8, |
|
876 | "rev": 8, | |
877 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
877 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
878 | "branch": "default", |
|
878 | "branch": "default", | |
879 | "phase": "draft", |
|
879 | "phase": "draft", | |
880 | "user": "test", |
|
880 | "user": "test", | |
881 | "date": [1577872860, 0], |
|
881 | "date": [1577872860, 0], | |
882 | "desc": "third", |
|
882 | "desc": "third", | |
883 | "bookmarks": [], |
|
883 | "bookmarks": [], | |
884 | "tags": ["tip"], |
|
884 | "tags": ["tip"], | |
885 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
885 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
886 | "files": ["fourth", "second", "third"], |
|
886 | "files": ["fourth", "second", "third"], | |
887 | "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" |
|
887 | "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" | |
888 | } |
|
888 | } | |
889 | ] |
|
889 | ] | |
890 |
|
890 | |||
891 | $ hg log -T json |
|
891 | $ hg log -T json | |
892 | [ |
|
892 | [ | |
893 | { |
|
893 | { | |
894 | "rev": 8, |
|
894 | "rev": 8, | |
895 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
895 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
896 | "branch": "default", |
|
896 | "branch": "default", | |
897 | "phase": "draft", |
|
897 | "phase": "draft", | |
898 | "user": "test", |
|
898 | "user": "test", | |
899 | "date": [1577872860, 0], |
|
899 | "date": [1577872860, 0], | |
900 | "desc": "third", |
|
900 | "desc": "third", | |
901 | "bookmarks": [], |
|
901 | "bookmarks": [], | |
902 | "tags": ["tip"], |
|
902 | "tags": ["tip"], | |
903 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"] |
|
903 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"] | |
904 | }, |
|
904 | }, | |
905 | { |
|
905 | { | |
906 | "rev": 7, |
|
906 | "rev": 7, | |
907 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
907 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
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": "second", |
|
912 | "desc": "second", | |
913 | "bookmarks": [], |
|
913 | "bookmarks": [], | |
914 | "tags": [], |
|
914 | "tags": [], | |
915 | "parents": ["0000000000000000000000000000000000000000"] |
|
915 | "parents": ["0000000000000000000000000000000000000000"] | |
916 | }, |
|
916 | }, | |
917 | { |
|
917 | { | |
918 | "rev": 6, |
|
918 | "rev": 6, | |
919 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
919 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
920 | "branch": "default", |
|
920 | "branch": "default", | |
921 | "phase": "draft", |
|
921 | "phase": "draft", | |
922 | "user": "person", |
|
922 | "user": "person", | |
923 | "date": [1500001, 0], |
|
923 | "date": [1500001, 0], | |
924 | "desc": "merge", |
|
924 | "desc": "merge", | |
925 | "bookmarks": [], |
|
925 | "bookmarks": [], | |
926 | "tags": [], |
|
926 | "tags": [], | |
927 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"] |
|
927 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"] | |
928 | }, |
|
928 | }, | |
929 | { |
|
929 | { | |
930 | "rev": 5, |
|
930 | "rev": 5, | |
931 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
931 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
932 | "branch": "default", |
|
932 | "branch": "default", | |
933 | "phase": "draft", |
|
933 | "phase": "draft", | |
934 | "user": "person", |
|
934 | "user": "person", | |
935 | "date": [1500000, 0], |
|
935 | "date": [1500000, 0], | |
936 | "desc": "new head", |
|
936 | "desc": "new head", | |
937 | "bookmarks": [], |
|
937 | "bookmarks": [], | |
938 | "tags": [], |
|
938 | "tags": [], | |
939 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] |
|
939 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] | |
940 | }, |
|
940 | }, | |
941 | { |
|
941 | { | |
942 | "rev": 4, |
|
942 | "rev": 4, | |
943 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
943 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
944 | "branch": "foo", |
|
944 | "branch": "foo", | |
945 | "phase": "draft", |
|
945 | "phase": "draft", | |
946 | "user": "person", |
|
946 | "user": "person", | |
947 | "date": [1400000, 0], |
|
947 | "date": [1400000, 0], | |
948 | "desc": "new branch", |
|
948 | "desc": "new branch", | |
949 | "bookmarks": [], |
|
949 | "bookmarks": [], | |
950 | "tags": [], |
|
950 | "tags": [], | |
951 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] |
|
951 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] | |
952 | }, |
|
952 | }, | |
953 | { |
|
953 | { | |
954 | "rev": 3, |
|
954 | "rev": 3, | |
955 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
955 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
956 | "branch": "default", |
|
956 | "branch": "default", | |
957 | "phase": "draft", |
|
957 | "phase": "draft", | |
958 | "user": "person", |
|
958 | "user": "person", | |
959 | "date": [1300000, 0], |
|
959 | "date": [1300000, 0], | |
960 | "desc": "no user, no domain", |
|
960 | "desc": "no user, no domain", | |
961 | "bookmarks": [], |
|
961 | "bookmarks": [], | |
962 | "tags": [], |
|
962 | "tags": [], | |
963 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"] |
|
963 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"] | |
964 | }, |
|
964 | }, | |
965 | { |
|
965 | { | |
966 | "rev": 2, |
|
966 | "rev": 2, | |
967 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
967 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
968 | "branch": "default", |
|
968 | "branch": "default", | |
969 | "phase": "draft", |
|
969 | "phase": "draft", | |
970 | "user": "other@place", |
|
970 | "user": "other@place", | |
971 | "date": [1200000, 0], |
|
971 | "date": [1200000, 0], | |
972 | "desc": "no person", |
|
972 | "desc": "no person", | |
973 | "bookmarks": [], |
|
973 | "bookmarks": [], | |
974 | "tags": [], |
|
974 | "tags": [], | |
975 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"] |
|
975 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"] | |
976 | }, |
|
976 | }, | |
977 | { |
|
977 | { | |
978 | "rev": 1, |
|
978 | "rev": 1, | |
979 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
979 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
980 | "branch": "default", |
|
980 | "branch": "default", | |
981 | "phase": "draft", |
|
981 | "phase": "draft", | |
982 | "user": "A. N. Other <other@place>", |
|
982 | "user": "A. N. Other <other@place>", | |
983 | "date": [1100000, 0], |
|
983 | "date": [1100000, 0], | |
984 | "desc": "other 1\nother 2\n\nother 3", |
|
984 | "desc": "other 1\nother 2\n\nother 3", | |
985 | "bookmarks": [], |
|
985 | "bookmarks": [], | |
986 | "tags": [], |
|
986 | "tags": [], | |
987 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"] |
|
987 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"] | |
988 | }, |
|
988 | }, | |
989 | { |
|
989 | { | |
990 | "rev": 0, |
|
990 | "rev": 0, | |
991 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
991 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
992 | "branch": "default", |
|
992 | "branch": "default", | |
993 | "phase": "draft", |
|
993 | "phase": "draft", | |
994 | "user": "User Name <user@hostname>", |
|
994 | "user": "User Name <user@hostname>", | |
995 | "date": [1000000, 0], |
|
995 | "date": [1000000, 0], | |
996 | "desc": "line 1\nline 2", |
|
996 | "desc": "line 1\nline 2", | |
997 | "bookmarks": [], |
|
997 | "bookmarks": [], | |
998 | "tags": [], |
|
998 | "tags": [], | |
999 | "parents": ["0000000000000000000000000000000000000000"] |
|
999 | "parents": ["0000000000000000000000000000000000000000"] | |
1000 | } |
|
1000 | } | |
1001 | ] |
|
1001 | ] | |
1002 |
|
1002 | |||
1003 | $ hg heads -v -Tjson |
|
1003 | $ hg heads -v -Tjson | |
1004 | [ |
|
1004 | [ | |
1005 | { |
|
1005 | { | |
1006 | "rev": 8, |
|
1006 | "rev": 8, | |
1007 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
1007 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
1008 | "branch": "default", |
|
1008 | "branch": "default", | |
1009 | "phase": "draft", |
|
1009 | "phase": "draft", | |
1010 | "user": "test", |
|
1010 | "user": "test", | |
1011 | "date": [1577872860, 0], |
|
1011 | "date": [1577872860, 0], | |
1012 | "desc": "third", |
|
1012 | "desc": "third", | |
1013 | "bookmarks": [], |
|
1013 | "bookmarks": [], | |
1014 | "tags": ["tip"], |
|
1014 | "tags": ["tip"], | |
1015 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
1015 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
1016 | "files": ["fourth", "second", "third"] |
|
1016 | "files": ["fourth", "second", "third"] | |
1017 | }, |
|
1017 | }, | |
1018 | { |
|
1018 | { | |
1019 | "rev": 6, |
|
1019 | "rev": 6, | |
1020 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
1020 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
1021 | "branch": "default", |
|
1021 | "branch": "default", | |
1022 | "phase": "draft", |
|
1022 | "phase": "draft", | |
1023 | "user": "person", |
|
1023 | "user": "person", | |
1024 | "date": [1500001, 0], |
|
1024 | "date": [1500001, 0], | |
1025 | "desc": "merge", |
|
1025 | "desc": "merge", | |
1026 | "bookmarks": [], |
|
1026 | "bookmarks": [], | |
1027 | "tags": [], |
|
1027 | "tags": [], | |
1028 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
1028 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
1029 | "files": [] |
|
1029 | "files": [] | |
1030 | }, |
|
1030 | }, | |
1031 | { |
|
1031 | { | |
1032 | "rev": 4, |
|
1032 | "rev": 4, | |
1033 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
1033 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
1034 | "branch": "foo", |
|
1034 | "branch": "foo", | |
1035 | "phase": "draft", |
|
1035 | "phase": "draft", | |
1036 | "user": "person", |
|
1036 | "user": "person", | |
1037 | "date": [1400000, 0], |
|
1037 | "date": [1400000, 0], | |
1038 | "desc": "new branch", |
|
1038 | "desc": "new branch", | |
1039 | "bookmarks": [], |
|
1039 | "bookmarks": [], | |
1040 | "tags": [], |
|
1040 | "tags": [], | |
1041 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1041 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1042 | "files": [] |
|
1042 | "files": [] | |
1043 | } |
|
1043 | } | |
1044 | ] |
|
1044 | ] | |
1045 |
|
1045 | |||
1046 | $ hg log --debug -Tjson |
|
1046 | $ hg log --debug -Tjson | |
1047 | [ |
|
1047 | [ | |
1048 | { |
|
1048 | { | |
1049 | "rev": 8, |
|
1049 | "rev": 8, | |
1050 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
1050 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
1051 | "branch": "default", |
|
1051 | "branch": "default", | |
1052 | "phase": "draft", |
|
1052 | "phase": "draft", | |
1053 | "user": "test", |
|
1053 | "user": "test", | |
1054 | "date": [1577872860, 0], |
|
1054 | "date": [1577872860, 0], | |
1055 | "desc": "third", |
|
1055 | "desc": "third", | |
1056 | "bookmarks": [], |
|
1056 | "bookmarks": [], | |
1057 | "tags": ["tip"], |
|
1057 | "tags": ["tip"], | |
1058 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
1058 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
1059 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", |
|
1059 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", | |
1060 | "extra": {"branch": "default"}, |
|
1060 | "extra": {"branch": "default"}, | |
1061 | "modified": [], |
|
1061 | "modified": [], | |
1062 | "added": ["fourth", "third"], |
|
1062 | "added": ["fourth", "third"], | |
1063 | "removed": ["second"] |
|
1063 | "removed": ["second"] | |
1064 | }, |
|
1064 | }, | |
1065 | { |
|
1065 | { | |
1066 | "rev": 7, |
|
1066 | "rev": 7, | |
1067 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
1067 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
1068 | "branch": "default", |
|
1068 | "branch": "default", | |
1069 | "phase": "draft", |
|
1069 | "phase": "draft", | |
1070 | "user": "User Name <user@hostname>", |
|
1070 | "user": "User Name <user@hostname>", | |
1071 | "date": [1000000, 0], |
|
1071 | "date": [1000000, 0], | |
1072 | "desc": "second", |
|
1072 | "desc": "second", | |
1073 | "bookmarks": [], |
|
1073 | "bookmarks": [], | |
1074 | "tags": [], |
|
1074 | "tags": [], | |
1075 | "parents": ["0000000000000000000000000000000000000000"], |
|
1075 | "parents": ["0000000000000000000000000000000000000000"], | |
1076 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", |
|
1076 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", | |
1077 | "extra": {"branch": "default"}, |
|
1077 | "extra": {"branch": "default"}, | |
1078 | "modified": [], |
|
1078 | "modified": [], | |
1079 | "added": ["second"], |
|
1079 | "added": ["second"], | |
1080 | "removed": [] |
|
1080 | "removed": [] | |
1081 | }, |
|
1081 | }, | |
1082 | { |
|
1082 | { | |
1083 | "rev": 6, |
|
1083 | "rev": 6, | |
1084 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
1084 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
1085 | "branch": "default", |
|
1085 | "branch": "default", | |
1086 | "phase": "draft", |
|
1086 | "phase": "draft", | |
1087 | "user": "person", |
|
1087 | "user": "person", | |
1088 | "date": [1500001, 0], |
|
1088 | "date": [1500001, 0], | |
1089 | "desc": "merge", |
|
1089 | "desc": "merge", | |
1090 | "bookmarks": [], |
|
1090 | "bookmarks": [], | |
1091 | "tags": [], |
|
1091 | "tags": [], | |
1092 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
1092 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
1093 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1093 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1094 | "extra": {"branch": "default"}, |
|
1094 | "extra": {"branch": "default"}, | |
1095 | "modified": [], |
|
1095 | "modified": [], | |
1096 | "added": [], |
|
1096 | "added": [], | |
1097 | "removed": [] |
|
1097 | "removed": [] | |
1098 | }, |
|
1098 | }, | |
1099 | { |
|
1099 | { | |
1100 | "rev": 5, |
|
1100 | "rev": 5, | |
1101 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
1101 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
1102 | "branch": "default", |
|
1102 | "branch": "default", | |
1103 | "phase": "draft", |
|
1103 | "phase": "draft", | |
1104 | "user": "person", |
|
1104 | "user": "person", | |
1105 | "date": [1500000, 0], |
|
1105 | "date": [1500000, 0], | |
1106 | "desc": "new head", |
|
1106 | "desc": "new head", | |
1107 | "bookmarks": [], |
|
1107 | "bookmarks": [], | |
1108 | "tags": [], |
|
1108 | "tags": [], | |
1109 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1109 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1110 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1110 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1111 | "extra": {"branch": "default"}, |
|
1111 | "extra": {"branch": "default"}, | |
1112 | "modified": [], |
|
1112 | "modified": [], | |
1113 | "added": ["d"], |
|
1113 | "added": ["d"], | |
1114 | "removed": [] |
|
1114 | "removed": [] | |
1115 | }, |
|
1115 | }, | |
1116 | { |
|
1116 | { | |
1117 | "rev": 4, |
|
1117 | "rev": 4, | |
1118 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
1118 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
1119 | "branch": "foo", |
|
1119 | "branch": "foo", | |
1120 | "phase": "draft", |
|
1120 | "phase": "draft", | |
1121 | "user": "person", |
|
1121 | "user": "person", | |
1122 | "date": [1400000, 0], |
|
1122 | "date": [1400000, 0], | |
1123 | "desc": "new branch", |
|
1123 | "desc": "new branch", | |
1124 | "bookmarks": [], |
|
1124 | "bookmarks": [], | |
1125 | "tags": [], |
|
1125 | "tags": [], | |
1126 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1126 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1127 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1127 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1128 | "extra": {"branch": "foo"}, |
|
1128 | "extra": {"branch": "foo"}, | |
1129 | "modified": [], |
|
1129 | "modified": [], | |
1130 | "added": [], |
|
1130 | "added": [], | |
1131 | "removed": [] |
|
1131 | "removed": [] | |
1132 | }, |
|
1132 | }, | |
1133 | { |
|
1133 | { | |
1134 | "rev": 3, |
|
1134 | "rev": 3, | |
1135 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
1135 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
1136 | "branch": "default", |
|
1136 | "branch": "default", | |
1137 | "phase": "draft", |
|
1137 | "phase": "draft", | |
1138 | "user": "person", |
|
1138 | "user": "person", | |
1139 | "date": [1300000, 0], |
|
1139 | "date": [1300000, 0], | |
1140 | "desc": "no user, no domain", |
|
1140 | "desc": "no user, no domain", | |
1141 | "bookmarks": [], |
|
1141 | "bookmarks": [], | |
1142 | "tags": [], |
|
1142 | "tags": [], | |
1143 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
1143 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], | |
1144 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1144 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1145 | "extra": {"branch": "default"}, |
|
1145 | "extra": {"branch": "default"}, | |
1146 | "modified": ["c"], |
|
1146 | "modified": ["c"], | |
1147 | "added": [], |
|
1147 | "added": [], | |
1148 | "removed": [] |
|
1148 | "removed": [] | |
1149 | }, |
|
1149 | }, | |
1150 | { |
|
1150 | { | |
1151 | "rev": 2, |
|
1151 | "rev": 2, | |
1152 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
1152 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
1153 | "branch": "default", |
|
1153 | "branch": "default", | |
1154 | "phase": "draft", |
|
1154 | "phase": "draft", | |
1155 | "user": "other@place", |
|
1155 | "user": "other@place", | |
1156 | "date": [1200000, 0], |
|
1156 | "date": [1200000, 0], | |
1157 | "desc": "no person", |
|
1157 | "desc": "no person", | |
1158 | "bookmarks": [], |
|
1158 | "bookmarks": [], | |
1159 | "tags": [], |
|
1159 | "tags": [], | |
1160 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
1160 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], | |
1161 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", |
|
1161 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", | |
1162 | "extra": {"branch": "default"}, |
|
1162 | "extra": {"branch": "default"}, | |
1163 | "modified": [], |
|
1163 | "modified": [], | |
1164 | "added": ["c"], |
|
1164 | "added": ["c"], | |
1165 | "removed": [] |
|
1165 | "removed": [] | |
1166 | }, |
|
1166 | }, | |
1167 | { |
|
1167 | { | |
1168 | "rev": 1, |
|
1168 | "rev": 1, | |
1169 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
1169 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
1170 | "branch": "default", |
|
1170 | "branch": "default", | |
1171 | "phase": "draft", |
|
1171 | "phase": "draft", | |
1172 | "user": "A. N. Other <other@place>", |
|
1172 | "user": "A. N. Other <other@place>", | |
1173 | "date": [1100000, 0], |
|
1173 | "date": [1100000, 0], | |
1174 | "desc": "other 1\nother 2\n\nother 3", |
|
1174 | "desc": "other 1\nother 2\n\nother 3", | |
1175 | "bookmarks": [], |
|
1175 | "bookmarks": [], | |
1176 | "tags": [], |
|
1176 | "tags": [], | |
1177 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
1177 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], | |
1178 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", |
|
1178 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", | |
1179 | "extra": {"branch": "default"}, |
|
1179 | "extra": {"branch": "default"}, | |
1180 | "modified": [], |
|
1180 | "modified": [], | |
1181 | "added": ["b"], |
|
1181 | "added": ["b"], | |
1182 | "removed": [] |
|
1182 | "removed": [] | |
1183 | }, |
|
1183 | }, | |
1184 | { |
|
1184 | { | |
1185 | "rev": 0, |
|
1185 | "rev": 0, | |
1186 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
1186 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
1187 | "branch": "default", |
|
1187 | "branch": "default", | |
1188 | "phase": "draft", |
|
1188 | "phase": "draft", | |
1189 | "user": "User Name <user@hostname>", |
|
1189 | "user": "User Name <user@hostname>", | |
1190 | "date": [1000000, 0], |
|
1190 | "date": [1000000, 0], | |
1191 | "desc": "line 1\nline 2", |
|
1191 | "desc": "line 1\nline 2", | |
1192 | "bookmarks": [], |
|
1192 | "bookmarks": [], | |
1193 | "tags": [], |
|
1193 | "tags": [], | |
1194 | "parents": ["0000000000000000000000000000000000000000"], |
|
1194 | "parents": ["0000000000000000000000000000000000000000"], | |
1195 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", |
|
1195 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", | |
1196 | "extra": {"branch": "default"}, |
|
1196 | "extra": {"branch": "default"}, | |
1197 | "modified": [], |
|
1197 | "modified": [], | |
1198 | "added": ["a"], |
|
1198 | "added": ["a"], | |
1199 | "removed": [] |
|
1199 | "removed": [] | |
1200 | } |
|
1200 | } | |
1201 | ] |
|
1201 | ] | |
1202 |
|
1202 | |||
1203 | Error if style not readable: |
|
1203 | Error if style not readable: | |
1204 |
|
1204 | |||
1205 | #if unix-permissions no-root |
|
1205 | #if unix-permissions no-root | |
1206 | $ touch q |
|
1206 | $ touch q | |
1207 | $ chmod 0 q |
|
1207 | $ chmod 0 q | |
1208 | $ hg log --style ./q |
|
1208 | $ hg log --style ./q | |
1209 | abort: Permission denied: ./q |
|
1209 | abort: Permission denied: ./q | |
1210 | [255] |
|
1210 | [255] | |
1211 | #endif |
|
1211 | #endif | |
1212 |
|
1212 | |||
1213 | Error if no style: |
|
1213 | Error if no style: | |
1214 |
|
1214 | |||
1215 | $ hg log --style notexist |
|
1215 | $ hg log --style notexist | |
1216 | abort: style 'notexist' not found |
|
1216 | abort: style 'notexist' not found | |
1217 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
1217 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
1218 | [255] |
|
1218 | [255] | |
1219 |
|
1219 | |||
1220 | $ hg log -T list |
|
1220 | $ hg log -T list | |
1221 | available styles: bisect, changelog, compact, default, phases, show, status, xml |
|
1221 | available styles: bisect, changelog, compact, default, phases, show, status, xml | |
1222 | abort: specify a template |
|
1222 | abort: specify a template | |
1223 | [255] |
|
1223 | [255] | |
1224 |
|
1224 | |||
1225 | Error if style missing key: |
|
1225 | Error if style missing key: | |
1226 |
|
1226 | |||
1227 | $ echo 'q = q' > t |
|
1227 | $ echo 'q = q' > t | |
1228 | $ hg log --style ./t |
|
1228 | $ hg log --style ./t | |
1229 | abort: "changeset" not in template map |
|
1229 | abort: "changeset" not in template map | |
1230 | [255] |
|
1230 | [255] | |
1231 |
|
1231 | |||
1232 | Error if style missing value: |
|
1232 | Error if style missing value: | |
1233 |
|
1233 | |||
1234 | $ echo 'changeset =' > t |
|
1234 | $ echo 'changeset =' > t | |
1235 | $ hg log --style t |
|
1235 | $ hg log --style t | |
1236 | hg: parse error at t:1: missing value |
|
1236 | hg: parse error at t:1: missing value | |
1237 | [255] |
|
1237 | [255] | |
1238 |
|
1238 | |||
1239 | Error if include fails: |
|
1239 | Error if include fails: | |
1240 |
|
1240 | |||
1241 | $ echo 'changeset = q' >> t |
|
1241 | $ echo 'changeset = q' >> t | |
1242 | #if unix-permissions no-root |
|
1242 | #if unix-permissions no-root | |
1243 | $ hg log --style ./t |
|
1243 | $ hg log --style ./t | |
1244 | abort: template file ./q: Permission denied |
|
1244 | abort: template file ./q: Permission denied | |
1245 | [255] |
|
1245 | [255] | |
1246 | $ rm -f q |
|
1246 | $ rm -f q | |
1247 | #endif |
|
1247 | #endif | |
1248 |
|
1248 | |||
1249 | Include works: |
|
1249 | Include works: | |
1250 |
|
1250 | |||
1251 | $ echo '{rev}' > q |
|
1251 | $ echo '{rev}' > q | |
1252 | $ hg log --style ./t |
|
1252 | $ hg log --style ./t | |
1253 | 8 |
|
1253 | 8 | |
1254 | 7 |
|
1254 | 7 | |
1255 | 6 |
|
1255 | 6 | |
1256 | 5 |
|
1256 | 5 | |
1257 | 4 |
|
1257 | 4 | |
1258 | 3 |
|
1258 | 3 | |
1259 | 2 |
|
1259 | 2 | |
1260 | 1 |
|
1260 | 1 | |
1261 | 0 |
|
1261 | 0 | |
1262 |
|
1262 | |||
1263 | Check that recursive reference does not fall into RuntimeError (issue4758): |
|
1263 | Check that recursive reference does not fall into RuntimeError (issue4758): | |
1264 |
|
1264 | |||
1265 | common mistake: |
|
1265 | common mistake: | |
1266 |
|
1266 | |||
1267 | $ cat << EOF > issue4758 |
|
1267 | $ cat << EOF > issue4758 | |
1268 | > changeset = '{changeset}\n' |
|
1268 | > changeset = '{changeset}\n' | |
1269 | > EOF |
|
1269 | > EOF | |
1270 | $ hg log --style ./issue4758 |
|
1270 | $ hg log --style ./issue4758 | |
1271 | abort: recursive reference 'changeset' in template |
|
1271 | abort: recursive reference 'changeset' in template | |
1272 | [255] |
|
1272 | [255] | |
1273 |
|
1273 | |||
1274 | circular reference: |
|
1274 | circular reference: | |
1275 |
|
1275 | |||
1276 | $ cat << EOF > issue4758 |
|
1276 | $ cat << EOF > issue4758 | |
1277 | > changeset = '{foo}' |
|
1277 | > changeset = '{foo}' | |
1278 | > foo = '{changeset}' |
|
1278 | > foo = '{changeset}' | |
1279 | > EOF |
|
1279 | > EOF | |
1280 | $ hg log --style ./issue4758 |
|
1280 | $ hg log --style ./issue4758 | |
1281 | abort: recursive reference 'foo' in template |
|
1281 | abort: recursive reference 'foo' in template | |
1282 | [255] |
|
1282 | [255] | |
1283 |
|
1283 | |||
1284 | buildmap() -> gettemplate(), where no thunk was made: |
|
1284 | buildmap() -> gettemplate(), where no thunk was made: | |
1285 |
|
1285 | |||
1286 | $ cat << EOF > issue4758 |
|
1286 | $ cat << EOF > issue4758 | |
1287 | > changeset = '{files % changeset}\n' |
|
1287 | > changeset = '{files % changeset}\n' | |
1288 | > EOF |
|
1288 | > EOF | |
1289 | $ hg log --style ./issue4758 |
|
1289 | $ hg log --style ./issue4758 | |
1290 | abort: recursive reference 'changeset' in template |
|
1290 | abort: recursive reference 'changeset' in template | |
1291 | [255] |
|
1291 | [255] | |
1292 |
|
1292 | |||
1293 | not a recursion if a keyword of the same name exists: |
|
1293 | not a recursion if a keyword of the same name exists: | |
1294 |
|
1294 | |||
1295 | $ cat << EOF > issue4758 |
|
1295 | $ cat << EOF > issue4758 | |
1296 | > changeset = '{tags % rev}' |
|
1296 | > changeset = '{tags % rev}' | |
1297 | > rev = '{rev} {tag}\n' |
|
1297 | > rev = '{rev} {tag}\n' | |
1298 | > EOF |
|
1298 | > EOF | |
1299 | $ hg log --style ./issue4758 -r tip |
|
1299 | $ hg log --style ./issue4758 -r tip | |
1300 | 8 tip |
|
1300 | 8 tip | |
1301 |
|
1301 | |||
1302 | Check that {phase} works correctly on parents: |
|
1302 | Check that {phase} works correctly on parents: | |
1303 |
|
1303 | |||
1304 | $ cat << EOF > parentphase |
|
1304 | $ cat << EOF > parentphase | |
1305 | > changeset_debug = '{rev} ({phase}):{parents}\n' |
|
1305 | > changeset_debug = '{rev} ({phase}):{parents}\n' | |
1306 | > parent = ' {rev} ({phase})' |
|
1306 | > parent = ' {rev} ({phase})' | |
1307 | > EOF |
|
1307 | > EOF | |
1308 | $ hg phase -r 5 --public |
|
1308 | $ hg phase -r 5 --public | |
1309 | $ hg phase -r 7 --secret --force |
|
1309 | $ hg phase -r 7 --secret --force | |
1310 | $ hg log --debug -G --style ./parentphase |
|
1310 | $ hg log --debug -G --style ./parentphase | |
1311 | @ 8 (secret): 7 (secret) -1 (public) |
|
1311 | @ 8 (secret): 7 (secret) -1 (public) | |
1312 | | |
|
1312 | | | |
1313 | o 7 (secret): -1 (public) -1 (public) |
|
1313 | o 7 (secret): -1 (public) -1 (public) | |
1314 |
|
1314 | |||
1315 | o 6 (draft): 5 (public) 4 (draft) |
|
1315 | o 6 (draft): 5 (public) 4 (draft) | |
1316 | |\ |
|
1316 | |\ | |
1317 | | o 5 (public): 3 (public) -1 (public) |
|
1317 | | o 5 (public): 3 (public) -1 (public) | |
1318 | | | |
|
1318 | | | | |
1319 | o | 4 (draft): 3 (public) -1 (public) |
|
1319 | o | 4 (draft): 3 (public) -1 (public) | |
1320 | |/ |
|
1320 | |/ | |
1321 | o 3 (public): 2 (public) -1 (public) |
|
1321 | o 3 (public): 2 (public) -1 (public) | |
1322 | | |
|
1322 | | | |
1323 | o 2 (public): 1 (public) -1 (public) |
|
1323 | o 2 (public): 1 (public) -1 (public) | |
1324 | | |
|
1324 | | | |
1325 | o 1 (public): 0 (public) -1 (public) |
|
1325 | o 1 (public): 0 (public) -1 (public) | |
1326 | | |
|
1326 | | | |
1327 | o 0 (public): -1 (public) -1 (public) |
|
1327 | o 0 (public): -1 (public) -1 (public) | |
1328 |
|
1328 | |||
1329 |
|
1329 | |||
1330 | Missing non-standard names give no error (backward compatibility): |
|
1330 | Missing non-standard names give no error (backward compatibility): | |
1331 |
|
1331 | |||
1332 | $ echo "changeset = '{c}'" > t |
|
1332 | $ echo "changeset = '{c}'" > t | |
1333 | $ hg log --style ./t |
|
1333 | $ hg log --style ./t | |
1334 |
|
1334 | |||
1335 | Defining non-standard name works: |
|
1335 | Defining non-standard name works: | |
1336 |
|
1336 | |||
1337 | $ cat <<EOF > t |
|
1337 | $ cat <<EOF > t | |
1338 | > changeset = '{c}' |
|
1338 | > changeset = '{c}' | |
1339 | > c = q |
|
1339 | > c = q | |
1340 | > EOF |
|
1340 | > EOF | |
1341 | $ hg log --style ./t |
|
1341 | $ hg log --style ./t | |
1342 | 8 |
|
1342 | 8 | |
1343 | 7 |
|
1343 | 7 | |
1344 | 6 |
|
1344 | 6 | |
1345 | 5 |
|
1345 | 5 | |
1346 | 4 |
|
1346 | 4 | |
1347 | 3 |
|
1347 | 3 | |
1348 | 2 |
|
1348 | 2 | |
1349 | 1 |
|
1349 | 1 | |
1350 | 0 |
|
1350 | 0 | |
1351 |
|
1351 | |||
1352 | ui.style works: |
|
1352 | ui.style works: | |
1353 |
|
1353 | |||
1354 | $ echo '[ui]' > .hg/hgrc |
|
1354 | $ echo '[ui]' > .hg/hgrc | |
1355 | $ echo 'style = t' >> .hg/hgrc |
|
1355 | $ echo 'style = t' >> .hg/hgrc | |
1356 | $ hg log |
|
1356 | $ hg log | |
1357 | 8 |
|
1357 | 8 | |
1358 | 7 |
|
1358 | 7 | |
1359 | 6 |
|
1359 | 6 | |
1360 | 5 |
|
1360 | 5 | |
1361 | 4 |
|
1361 | 4 | |
1362 | 3 |
|
1362 | 3 | |
1363 | 2 |
|
1363 | 2 | |
1364 | 1 |
|
1364 | 1 | |
1365 | 0 |
|
1365 | 0 | |
1366 |
|
1366 | |||
1367 |
|
1367 | |||
1368 | Issue338: |
|
1368 | Issue338: | |
1369 |
|
1369 | |||
1370 | $ hg log --style=changelog > changelog |
|
1370 | $ hg log --style=changelog > changelog | |
1371 |
|
1371 | |||
1372 | $ cat changelog |
|
1372 | $ cat changelog | |
1373 | 2020-01-01 test <test> |
|
1373 | 2020-01-01 test <test> | |
1374 |
|
1374 | |||
1375 | * fourth, second, third: |
|
1375 | * fourth, second, third: | |
1376 | third |
|
1376 | third | |
1377 | [95c24699272e] [tip] |
|
1377 | [95c24699272e] [tip] | |
1378 |
|
1378 | |||
1379 | 1970-01-12 User Name <user@hostname> |
|
1379 | 1970-01-12 User Name <user@hostname> | |
1380 |
|
1380 | |||
1381 | * second: |
|
1381 | * second: | |
1382 | second |
|
1382 | second | |
1383 | [29114dbae42b] |
|
1383 | [29114dbae42b] | |
1384 |
|
1384 | |||
1385 | 1970-01-18 person <person> |
|
1385 | 1970-01-18 person <person> | |
1386 |
|
1386 | |||
1387 | * merge |
|
1387 | * merge | |
1388 | [d41e714fe50d] |
|
1388 | [d41e714fe50d] | |
1389 |
|
1389 | |||
1390 | * d: |
|
1390 | * d: | |
1391 | new head |
|
1391 | new head | |
1392 | [13207e5a10d9] |
|
1392 | [13207e5a10d9] | |
1393 |
|
1393 | |||
1394 | 1970-01-17 person <person> |
|
1394 | 1970-01-17 person <person> | |
1395 |
|
1395 | |||
1396 | * new branch |
|
1396 | * new branch | |
1397 | [bbe44766e73d] <foo> |
|
1397 | [bbe44766e73d] <foo> | |
1398 |
|
1398 | |||
1399 | 1970-01-16 person <person> |
|
1399 | 1970-01-16 person <person> | |
1400 |
|
1400 | |||
1401 | * c: |
|
1401 | * c: | |
1402 | no user, no domain |
|
1402 | no user, no domain | |
1403 | [10e46f2dcbf4] |
|
1403 | [10e46f2dcbf4] | |
1404 |
|
1404 | |||
1405 | 1970-01-14 other <other@place> |
|
1405 | 1970-01-14 other <other@place> | |
1406 |
|
1406 | |||
1407 | * c: |
|
1407 | * c: | |
1408 | no person |
|
1408 | no person | |
1409 | [97054abb4ab8] |
|
1409 | [97054abb4ab8] | |
1410 |
|
1410 | |||
1411 | 1970-01-13 A. N. Other <other@place> |
|
1411 | 1970-01-13 A. N. Other <other@place> | |
1412 |
|
1412 | |||
1413 | * b: |
|
1413 | * b: | |
1414 | other 1 other 2 |
|
1414 | other 1 other 2 | |
1415 |
|
1415 | |||
1416 | other 3 |
|
1416 | other 3 | |
1417 | [b608e9d1a3f0] |
|
1417 | [b608e9d1a3f0] | |
1418 |
|
1418 | |||
1419 | 1970-01-12 User Name <user@hostname> |
|
1419 | 1970-01-12 User Name <user@hostname> | |
1420 |
|
1420 | |||
1421 | * a: |
|
1421 | * a: | |
1422 | line 1 line 2 |
|
1422 | line 1 line 2 | |
1423 | [1e4e1b8f71e0] |
|
1423 | [1e4e1b8f71e0] | |
1424 |
|
1424 | |||
1425 |
|
1425 | |||
1426 | Issue2130: xml output for 'hg heads' is malformed |
|
1426 | Issue2130: xml output for 'hg heads' is malformed | |
1427 |
|
1427 | |||
1428 | $ hg heads --style changelog |
|
1428 | $ hg heads --style changelog | |
1429 | 2020-01-01 test <test> |
|
1429 | 2020-01-01 test <test> | |
1430 |
|
1430 | |||
1431 | * fourth, second, third: |
|
1431 | * fourth, second, third: | |
1432 | third |
|
1432 | third | |
1433 | [95c24699272e] [tip] |
|
1433 | [95c24699272e] [tip] | |
1434 |
|
1434 | |||
1435 | 1970-01-18 person <person> |
|
1435 | 1970-01-18 person <person> | |
1436 |
|
1436 | |||
1437 | * merge |
|
1437 | * merge | |
1438 | [d41e714fe50d] |
|
1438 | [d41e714fe50d] | |
1439 |
|
1439 | |||
1440 | 1970-01-17 person <person> |
|
1440 | 1970-01-17 person <person> | |
1441 |
|
1441 | |||
1442 | * new branch |
|
1442 | * new branch | |
1443 | [bbe44766e73d] <foo> |
|
1443 | [bbe44766e73d] <foo> | |
1444 |
|
1444 | |||
1445 |
|
1445 | |||
1446 | Keys work: |
|
1446 | Keys work: | |
1447 |
|
1447 | |||
1448 | $ for key in author branch branches date desc file_adds file_dels file_mods \ |
|
1448 | $ for key in author branch branches date desc file_adds file_dels file_mods \ | |
1449 | > file_copies file_copies_switch files \ |
|
1449 | > file_copies file_copies_switch files \ | |
1450 | > manifest node parents rev tags diffstat extras \ |
|
1450 | > manifest node parents rev tags diffstat extras \ | |
1451 | > p1rev p2rev p1node p2node; do |
|
1451 | > p1rev p2rev p1node p2node; do | |
1452 | > for mode in '' --verbose --debug; do |
|
1452 | > for mode in '' --verbose --debug; do | |
1453 | > hg log $mode --template "$key$mode: {$key}\n" |
|
1453 | > hg log $mode --template "$key$mode: {$key}\n" | |
1454 | > done |
|
1454 | > done | |
1455 | > done |
|
1455 | > done | |
1456 | author: test |
|
1456 | author: test | |
1457 | author: User Name <user@hostname> |
|
1457 | author: User Name <user@hostname> | |
1458 | author: person |
|
1458 | author: person | |
1459 | author: person |
|
1459 | author: person | |
1460 | author: person |
|
1460 | author: person | |
1461 | author: person |
|
1461 | author: person | |
1462 | author: other@place |
|
1462 | author: other@place | |
1463 | author: A. N. Other <other@place> |
|
1463 | author: A. N. Other <other@place> | |
1464 | author: User Name <user@hostname> |
|
1464 | author: User Name <user@hostname> | |
1465 | author--verbose: test |
|
1465 | author--verbose: test | |
1466 | author--verbose: User Name <user@hostname> |
|
1466 | author--verbose: User Name <user@hostname> | |
1467 | author--verbose: person |
|
1467 | author--verbose: person | |
1468 | author--verbose: person |
|
1468 | author--verbose: person | |
1469 | author--verbose: person |
|
1469 | author--verbose: person | |
1470 | author--verbose: person |
|
1470 | author--verbose: person | |
1471 | author--verbose: other@place |
|
1471 | author--verbose: other@place | |
1472 | author--verbose: A. N. Other <other@place> |
|
1472 | author--verbose: A. N. Other <other@place> | |
1473 | author--verbose: User Name <user@hostname> |
|
1473 | author--verbose: User Name <user@hostname> | |
1474 | author--debug: test |
|
1474 | author--debug: test | |
1475 | author--debug: User Name <user@hostname> |
|
1475 | author--debug: User Name <user@hostname> | |
1476 | author--debug: person |
|
1476 | author--debug: person | |
1477 | author--debug: person |
|
1477 | author--debug: person | |
1478 | author--debug: person |
|
1478 | author--debug: person | |
1479 | author--debug: person |
|
1479 | author--debug: person | |
1480 | author--debug: other@place |
|
1480 | author--debug: other@place | |
1481 | author--debug: A. N. Other <other@place> |
|
1481 | author--debug: A. N. Other <other@place> | |
1482 | author--debug: User Name <user@hostname> |
|
1482 | author--debug: User Name <user@hostname> | |
1483 | branch: default |
|
1483 | branch: default | |
1484 | branch: default |
|
1484 | branch: default | |
1485 | branch: default |
|
1485 | branch: default | |
1486 | branch: default |
|
1486 | branch: default | |
1487 | branch: foo |
|
1487 | branch: foo | |
1488 | branch: default |
|
1488 | branch: default | |
1489 | branch: default |
|
1489 | branch: default | |
1490 | branch: default |
|
1490 | branch: default | |
1491 | branch: default |
|
1491 | branch: default | |
1492 | branch--verbose: default |
|
1492 | branch--verbose: default | |
1493 | branch--verbose: default |
|
1493 | branch--verbose: default | |
1494 | branch--verbose: default |
|
1494 | branch--verbose: default | |
1495 | branch--verbose: default |
|
1495 | branch--verbose: default | |
1496 | branch--verbose: foo |
|
1496 | branch--verbose: foo | |
1497 | branch--verbose: default |
|
1497 | branch--verbose: default | |
1498 | branch--verbose: default |
|
1498 | branch--verbose: default | |
1499 | branch--verbose: default |
|
1499 | branch--verbose: default | |
1500 | branch--verbose: default |
|
1500 | branch--verbose: default | |
1501 | branch--debug: default |
|
1501 | branch--debug: default | |
1502 | branch--debug: default |
|
1502 | branch--debug: default | |
1503 | branch--debug: default |
|
1503 | branch--debug: default | |
1504 | branch--debug: default |
|
1504 | branch--debug: default | |
1505 | branch--debug: foo |
|
1505 | branch--debug: foo | |
1506 | branch--debug: default |
|
1506 | branch--debug: default | |
1507 | branch--debug: default |
|
1507 | branch--debug: default | |
1508 | branch--debug: default |
|
1508 | branch--debug: default | |
1509 | branch--debug: default |
|
1509 | branch--debug: default | |
1510 | branches: |
|
1510 | branches: | |
1511 | branches: |
|
1511 | branches: | |
1512 | branches: |
|
1512 | branches: | |
1513 | branches: |
|
1513 | branches: | |
1514 | branches: foo |
|
1514 | branches: foo | |
1515 | branches: |
|
1515 | branches: | |
1516 | branches: |
|
1516 | branches: | |
1517 | branches: |
|
1517 | branches: | |
1518 | branches: |
|
1518 | branches: | |
1519 | branches--verbose: |
|
1519 | branches--verbose: | |
1520 | branches--verbose: |
|
1520 | branches--verbose: | |
1521 | branches--verbose: |
|
1521 | branches--verbose: | |
1522 | branches--verbose: |
|
1522 | branches--verbose: | |
1523 | branches--verbose: foo |
|
1523 | branches--verbose: foo | |
1524 | branches--verbose: |
|
1524 | branches--verbose: | |
1525 | branches--verbose: |
|
1525 | branches--verbose: | |
1526 | branches--verbose: |
|
1526 | branches--verbose: | |
1527 | branches--verbose: |
|
1527 | branches--verbose: | |
1528 | branches--debug: |
|
1528 | branches--debug: | |
1529 | branches--debug: |
|
1529 | branches--debug: | |
1530 | branches--debug: |
|
1530 | branches--debug: | |
1531 | branches--debug: |
|
1531 | branches--debug: | |
1532 | branches--debug: foo |
|
1532 | branches--debug: foo | |
1533 | branches--debug: |
|
1533 | branches--debug: | |
1534 | branches--debug: |
|
1534 | branches--debug: | |
1535 | branches--debug: |
|
1535 | branches--debug: | |
1536 | branches--debug: |
|
1536 | branches--debug: | |
1537 | date: 1577872860.00 |
|
1537 | date: 1577872860.00 | |
1538 | date: 1000000.00 |
|
1538 | date: 1000000.00 | |
1539 | date: 1500001.00 |
|
1539 | date: 1500001.00 | |
1540 | date: 1500000.00 |
|
1540 | date: 1500000.00 | |
1541 | date: 1400000.00 |
|
1541 | date: 1400000.00 | |
1542 | date: 1300000.00 |
|
1542 | date: 1300000.00 | |
1543 | date: 1200000.00 |
|
1543 | date: 1200000.00 | |
1544 | date: 1100000.00 |
|
1544 | date: 1100000.00 | |
1545 | date: 1000000.00 |
|
1545 | date: 1000000.00 | |
1546 | date--verbose: 1577872860.00 |
|
1546 | date--verbose: 1577872860.00 | |
1547 | date--verbose: 1000000.00 |
|
1547 | date--verbose: 1000000.00 | |
1548 | date--verbose: 1500001.00 |
|
1548 | date--verbose: 1500001.00 | |
1549 | date--verbose: 1500000.00 |
|
1549 | date--verbose: 1500000.00 | |
1550 | date--verbose: 1400000.00 |
|
1550 | date--verbose: 1400000.00 | |
1551 | date--verbose: 1300000.00 |
|
1551 | date--verbose: 1300000.00 | |
1552 | date--verbose: 1200000.00 |
|
1552 | date--verbose: 1200000.00 | |
1553 | date--verbose: 1100000.00 |
|
1553 | date--verbose: 1100000.00 | |
1554 | date--verbose: 1000000.00 |
|
1554 | date--verbose: 1000000.00 | |
1555 | date--debug: 1577872860.00 |
|
1555 | date--debug: 1577872860.00 | |
1556 | date--debug: 1000000.00 |
|
1556 | date--debug: 1000000.00 | |
1557 | date--debug: 1500001.00 |
|
1557 | date--debug: 1500001.00 | |
1558 | date--debug: 1500000.00 |
|
1558 | date--debug: 1500000.00 | |
1559 | date--debug: 1400000.00 |
|
1559 | date--debug: 1400000.00 | |
1560 | date--debug: 1300000.00 |
|
1560 | date--debug: 1300000.00 | |
1561 | date--debug: 1200000.00 |
|
1561 | date--debug: 1200000.00 | |
1562 | date--debug: 1100000.00 |
|
1562 | date--debug: 1100000.00 | |
1563 | date--debug: 1000000.00 |
|
1563 | date--debug: 1000000.00 | |
1564 | desc: third |
|
1564 | desc: third | |
1565 | desc: second |
|
1565 | desc: second | |
1566 | desc: merge |
|
1566 | desc: merge | |
1567 | desc: new head |
|
1567 | desc: new head | |
1568 | desc: new branch |
|
1568 | desc: new branch | |
1569 | desc: no user, no domain |
|
1569 | desc: no user, no domain | |
1570 | desc: no person |
|
1570 | desc: no person | |
1571 | desc: other 1 |
|
1571 | desc: other 1 | |
1572 | other 2 |
|
1572 | other 2 | |
1573 |
|
1573 | |||
1574 | other 3 |
|
1574 | other 3 | |
1575 | desc: line 1 |
|
1575 | desc: line 1 | |
1576 | line 2 |
|
1576 | line 2 | |
1577 | desc--verbose: third |
|
1577 | desc--verbose: third | |
1578 | desc--verbose: second |
|
1578 | desc--verbose: second | |
1579 | desc--verbose: merge |
|
1579 | desc--verbose: merge | |
1580 | desc--verbose: new head |
|
1580 | desc--verbose: new head | |
1581 | desc--verbose: new branch |
|
1581 | desc--verbose: new branch | |
1582 | desc--verbose: no user, no domain |
|
1582 | desc--verbose: no user, no domain | |
1583 | desc--verbose: no person |
|
1583 | desc--verbose: no person | |
1584 | desc--verbose: other 1 |
|
1584 | desc--verbose: other 1 | |
1585 | other 2 |
|
1585 | other 2 | |
1586 |
|
1586 | |||
1587 | other 3 |
|
1587 | other 3 | |
1588 | desc--verbose: line 1 |
|
1588 | desc--verbose: line 1 | |
1589 | line 2 |
|
1589 | line 2 | |
1590 | desc--debug: third |
|
1590 | desc--debug: third | |
1591 | desc--debug: second |
|
1591 | desc--debug: second | |
1592 | desc--debug: merge |
|
1592 | desc--debug: merge | |
1593 | desc--debug: new head |
|
1593 | desc--debug: new head | |
1594 | desc--debug: new branch |
|
1594 | desc--debug: new branch | |
1595 | desc--debug: no user, no domain |
|
1595 | desc--debug: no user, no domain | |
1596 | desc--debug: no person |
|
1596 | desc--debug: no person | |
1597 | desc--debug: other 1 |
|
1597 | desc--debug: other 1 | |
1598 | other 2 |
|
1598 | other 2 | |
1599 |
|
1599 | |||
1600 | other 3 |
|
1600 | other 3 | |
1601 | desc--debug: line 1 |
|
1601 | desc--debug: line 1 | |
1602 | line 2 |
|
1602 | line 2 | |
1603 | file_adds: fourth third |
|
1603 | file_adds: fourth third | |
1604 | file_adds: second |
|
1604 | file_adds: second | |
1605 | file_adds: |
|
1605 | file_adds: | |
1606 | file_adds: d |
|
1606 | file_adds: d | |
1607 | file_adds: |
|
1607 | file_adds: | |
1608 | file_adds: |
|
1608 | file_adds: | |
1609 | file_adds: c |
|
1609 | file_adds: c | |
1610 | file_adds: b |
|
1610 | file_adds: b | |
1611 | file_adds: a |
|
1611 | file_adds: a | |
1612 | file_adds--verbose: fourth third |
|
1612 | file_adds--verbose: fourth third | |
1613 | file_adds--verbose: second |
|
1613 | file_adds--verbose: second | |
1614 | file_adds--verbose: |
|
1614 | file_adds--verbose: | |
1615 | file_adds--verbose: d |
|
1615 | file_adds--verbose: d | |
1616 | file_adds--verbose: |
|
1616 | file_adds--verbose: | |
1617 | file_adds--verbose: |
|
1617 | file_adds--verbose: | |
1618 | file_adds--verbose: c |
|
1618 | file_adds--verbose: c | |
1619 | file_adds--verbose: b |
|
1619 | file_adds--verbose: b | |
1620 | file_adds--verbose: a |
|
1620 | file_adds--verbose: a | |
1621 | file_adds--debug: fourth third |
|
1621 | file_adds--debug: fourth third | |
1622 | file_adds--debug: second |
|
1622 | file_adds--debug: second | |
1623 | file_adds--debug: |
|
1623 | file_adds--debug: | |
1624 | file_adds--debug: d |
|
1624 | file_adds--debug: d | |
1625 | file_adds--debug: |
|
1625 | file_adds--debug: | |
1626 | file_adds--debug: |
|
1626 | file_adds--debug: | |
1627 | file_adds--debug: c |
|
1627 | file_adds--debug: c | |
1628 | file_adds--debug: b |
|
1628 | file_adds--debug: b | |
1629 | file_adds--debug: a |
|
1629 | file_adds--debug: a | |
1630 | file_dels: second |
|
1630 | file_dels: second | |
1631 | file_dels: |
|
1631 | file_dels: | |
1632 | file_dels: |
|
1632 | file_dels: | |
1633 | file_dels: |
|
1633 | file_dels: | |
1634 | file_dels: |
|
1634 | file_dels: | |
1635 | file_dels: |
|
1635 | file_dels: | |
1636 | file_dels: |
|
1636 | file_dels: | |
1637 | file_dels: |
|
1637 | file_dels: | |
1638 | file_dels: |
|
1638 | file_dels: | |
1639 | file_dels--verbose: second |
|
1639 | file_dels--verbose: second | |
1640 | file_dels--verbose: |
|
1640 | file_dels--verbose: | |
1641 | file_dels--verbose: |
|
1641 | file_dels--verbose: | |
1642 | file_dels--verbose: |
|
1642 | file_dels--verbose: | |
1643 | file_dels--verbose: |
|
1643 | file_dels--verbose: | |
1644 | file_dels--verbose: |
|
1644 | file_dels--verbose: | |
1645 | file_dels--verbose: |
|
1645 | file_dels--verbose: | |
1646 | file_dels--verbose: |
|
1646 | file_dels--verbose: | |
1647 | file_dels--verbose: |
|
1647 | file_dels--verbose: | |
1648 | file_dels--debug: second |
|
1648 | file_dels--debug: second | |
1649 | file_dels--debug: |
|
1649 | file_dels--debug: | |
1650 | file_dels--debug: |
|
1650 | file_dels--debug: | |
1651 | file_dels--debug: |
|
1651 | file_dels--debug: | |
1652 | file_dels--debug: |
|
1652 | file_dels--debug: | |
1653 | file_dels--debug: |
|
1653 | file_dels--debug: | |
1654 | file_dels--debug: |
|
1654 | file_dels--debug: | |
1655 | file_dels--debug: |
|
1655 | file_dels--debug: | |
1656 | file_dels--debug: |
|
1656 | file_dels--debug: | |
1657 | file_mods: |
|
1657 | file_mods: | |
1658 | file_mods: |
|
1658 | file_mods: | |
1659 | file_mods: |
|
1659 | file_mods: | |
1660 | file_mods: |
|
1660 | file_mods: | |
1661 | file_mods: |
|
1661 | file_mods: | |
1662 | file_mods: c |
|
1662 | file_mods: c | |
1663 | file_mods: |
|
1663 | file_mods: | |
1664 | file_mods: |
|
1664 | file_mods: | |
1665 | file_mods: |
|
1665 | file_mods: | |
1666 | file_mods--verbose: |
|
1666 | file_mods--verbose: | |
1667 | file_mods--verbose: |
|
1667 | file_mods--verbose: | |
1668 | file_mods--verbose: |
|
1668 | file_mods--verbose: | |
1669 | file_mods--verbose: |
|
1669 | file_mods--verbose: | |
1670 | file_mods--verbose: |
|
1670 | file_mods--verbose: | |
1671 | file_mods--verbose: c |
|
1671 | file_mods--verbose: c | |
1672 | file_mods--verbose: |
|
1672 | file_mods--verbose: | |
1673 | file_mods--verbose: |
|
1673 | file_mods--verbose: | |
1674 | file_mods--verbose: |
|
1674 | file_mods--verbose: | |
1675 | file_mods--debug: |
|
1675 | file_mods--debug: | |
1676 | file_mods--debug: |
|
1676 | file_mods--debug: | |
1677 | file_mods--debug: |
|
1677 | file_mods--debug: | |
1678 | file_mods--debug: |
|
1678 | file_mods--debug: | |
1679 | file_mods--debug: |
|
1679 | file_mods--debug: | |
1680 | file_mods--debug: c |
|
1680 | file_mods--debug: c | |
1681 | file_mods--debug: |
|
1681 | file_mods--debug: | |
1682 | file_mods--debug: |
|
1682 | file_mods--debug: | |
1683 | file_mods--debug: |
|
1683 | file_mods--debug: | |
1684 | file_copies: fourth (second) |
|
1684 | file_copies: fourth (second) | |
1685 | file_copies: |
|
1685 | file_copies: | |
1686 | file_copies: |
|
1686 | file_copies: | |
1687 | file_copies: |
|
1687 | file_copies: | |
1688 | file_copies: |
|
1688 | file_copies: | |
1689 | file_copies: |
|
1689 | file_copies: | |
1690 | file_copies: |
|
1690 | file_copies: | |
1691 | file_copies: |
|
1691 | file_copies: | |
1692 | file_copies: |
|
1692 | file_copies: | |
1693 | file_copies--verbose: fourth (second) |
|
1693 | file_copies--verbose: fourth (second) | |
1694 | file_copies--verbose: |
|
1694 | file_copies--verbose: | |
1695 | file_copies--verbose: |
|
1695 | file_copies--verbose: | |
1696 | file_copies--verbose: |
|
1696 | file_copies--verbose: | |
1697 | file_copies--verbose: |
|
1697 | file_copies--verbose: | |
1698 | file_copies--verbose: |
|
1698 | file_copies--verbose: | |
1699 | file_copies--verbose: |
|
1699 | file_copies--verbose: | |
1700 | file_copies--verbose: |
|
1700 | file_copies--verbose: | |
1701 | file_copies--verbose: |
|
1701 | file_copies--verbose: | |
1702 | file_copies--debug: fourth (second) |
|
1702 | file_copies--debug: fourth (second) | |
1703 | file_copies--debug: |
|
1703 | file_copies--debug: | |
1704 | file_copies--debug: |
|
1704 | file_copies--debug: | |
1705 | file_copies--debug: |
|
1705 | file_copies--debug: | |
1706 | file_copies--debug: |
|
1706 | file_copies--debug: | |
1707 | file_copies--debug: |
|
1707 | file_copies--debug: | |
1708 | file_copies--debug: |
|
1708 | file_copies--debug: | |
1709 | file_copies--debug: |
|
1709 | file_copies--debug: | |
1710 | file_copies--debug: |
|
1710 | file_copies--debug: | |
1711 | file_copies_switch: |
|
1711 | file_copies_switch: | |
1712 | file_copies_switch: |
|
1712 | file_copies_switch: | |
1713 | file_copies_switch: |
|
1713 | file_copies_switch: | |
1714 | file_copies_switch: |
|
1714 | file_copies_switch: | |
1715 | file_copies_switch: |
|
1715 | file_copies_switch: | |
1716 | file_copies_switch: |
|
1716 | file_copies_switch: | |
1717 | file_copies_switch: |
|
1717 | file_copies_switch: | |
1718 | file_copies_switch: |
|
1718 | file_copies_switch: | |
1719 | file_copies_switch: |
|
1719 | file_copies_switch: | |
1720 | file_copies_switch--verbose: |
|
1720 | file_copies_switch--verbose: | |
1721 | file_copies_switch--verbose: |
|
1721 | file_copies_switch--verbose: | |
1722 | file_copies_switch--verbose: |
|
1722 | file_copies_switch--verbose: | |
1723 | file_copies_switch--verbose: |
|
1723 | file_copies_switch--verbose: | |
1724 | file_copies_switch--verbose: |
|
1724 | file_copies_switch--verbose: | |
1725 | file_copies_switch--verbose: |
|
1725 | file_copies_switch--verbose: | |
1726 | file_copies_switch--verbose: |
|
1726 | file_copies_switch--verbose: | |
1727 | file_copies_switch--verbose: |
|
1727 | file_copies_switch--verbose: | |
1728 | file_copies_switch--verbose: |
|
1728 | file_copies_switch--verbose: | |
1729 | file_copies_switch--debug: |
|
1729 | file_copies_switch--debug: | |
1730 | file_copies_switch--debug: |
|
1730 | file_copies_switch--debug: | |
1731 | file_copies_switch--debug: |
|
1731 | file_copies_switch--debug: | |
1732 | file_copies_switch--debug: |
|
1732 | file_copies_switch--debug: | |
1733 | file_copies_switch--debug: |
|
1733 | file_copies_switch--debug: | |
1734 | file_copies_switch--debug: |
|
1734 | file_copies_switch--debug: | |
1735 | file_copies_switch--debug: |
|
1735 | file_copies_switch--debug: | |
1736 | file_copies_switch--debug: |
|
1736 | file_copies_switch--debug: | |
1737 | file_copies_switch--debug: |
|
1737 | file_copies_switch--debug: | |
1738 | files: fourth second third |
|
1738 | files: fourth second third | |
1739 | files: second |
|
1739 | files: second | |
1740 | files: |
|
1740 | files: | |
1741 | files: d |
|
1741 | files: d | |
1742 | files: |
|
1742 | files: | |
1743 | files: c |
|
1743 | files: c | |
1744 | files: c |
|
1744 | files: c | |
1745 | files: b |
|
1745 | files: b | |
1746 | files: a |
|
1746 | files: a | |
1747 | files--verbose: fourth second third |
|
1747 | files--verbose: fourth second third | |
1748 | files--verbose: second |
|
1748 | files--verbose: second | |
1749 | files--verbose: |
|
1749 | files--verbose: | |
1750 | files--verbose: d |
|
1750 | files--verbose: d | |
1751 | files--verbose: |
|
1751 | files--verbose: | |
1752 | files--verbose: c |
|
1752 | files--verbose: c | |
1753 | files--verbose: c |
|
1753 | files--verbose: c | |
1754 | files--verbose: b |
|
1754 | files--verbose: b | |
1755 | files--verbose: a |
|
1755 | files--verbose: a | |
1756 | files--debug: fourth second third |
|
1756 | files--debug: fourth second third | |
1757 | files--debug: second |
|
1757 | files--debug: second | |
1758 | files--debug: |
|
1758 | files--debug: | |
1759 | files--debug: d |
|
1759 | files--debug: d | |
1760 | files--debug: |
|
1760 | files--debug: | |
1761 | files--debug: c |
|
1761 | files--debug: c | |
1762 | files--debug: c |
|
1762 | files--debug: c | |
1763 | files--debug: b |
|
1763 | files--debug: b | |
1764 | files--debug: a |
|
1764 | files--debug: a | |
1765 | manifest: 6:94961b75a2da |
|
1765 | manifest: 6:94961b75a2da | |
1766 | manifest: 5:f2dbc354b94e |
|
1766 | manifest: 5:f2dbc354b94e | |
1767 | manifest: 4:4dc3def4f9b4 |
|
1767 | manifest: 4:4dc3def4f9b4 | |
1768 | manifest: 4:4dc3def4f9b4 |
|
1768 | manifest: 4:4dc3def4f9b4 | |
1769 | manifest: 3:cb5a1327723b |
|
1769 | manifest: 3:cb5a1327723b | |
1770 | manifest: 3:cb5a1327723b |
|
1770 | manifest: 3:cb5a1327723b | |
1771 | manifest: 2:6e0e82995c35 |
|
1771 | manifest: 2:6e0e82995c35 | |
1772 | manifest: 1:4e8d705b1e53 |
|
1772 | manifest: 1:4e8d705b1e53 | |
1773 | manifest: 0:a0c8bcbbb45c |
|
1773 | manifest: 0:a0c8bcbbb45c | |
1774 | manifest--verbose: 6:94961b75a2da |
|
1774 | manifest--verbose: 6:94961b75a2da | |
1775 | manifest--verbose: 5:f2dbc354b94e |
|
1775 | manifest--verbose: 5:f2dbc354b94e | |
1776 | manifest--verbose: 4:4dc3def4f9b4 |
|
1776 | manifest--verbose: 4:4dc3def4f9b4 | |
1777 | manifest--verbose: 4:4dc3def4f9b4 |
|
1777 | manifest--verbose: 4:4dc3def4f9b4 | |
1778 | manifest--verbose: 3:cb5a1327723b |
|
1778 | manifest--verbose: 3:cb5a1327723b | |
1779 | manifest--verbose: 3:cb5a1327723b |
|
1779 | manifest--verbose: 3:cb5a1327723b | |
1780 | manifest--verbose: 2:6e0e82995c35 |
|
1780 | manifest--verbose: 2:6e0e82995c35 | |
1781 | manifest--verbose: 1:4e8d705b1e53 |
|
1781 | manifest--verbose: 1:4e8d705b1e53 | |
1782 | manifest--verbose: 0:a0c8bcbbb45c |
|
1782 | manifest--verbose: 0:a0c8bcbbb45c | |
1783 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 |
|
1783 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 | |
1784 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf |
|
1784 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf | |
1785 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
1785 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1786 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
1786 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1787 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1787 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1788 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1788 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1789 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
1789 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
1790 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
1790 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
1791 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
1791 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
1792 | node: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1792 | node: 95c24699272ef57d062b8bccc32c878bf841784a | |
1793 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1793 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1794 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1794 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1795 | node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1795 | node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1796 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1796 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1797 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1797 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1798 | node: 97054abb4ab824450e9164180baf491ae0078465 |
|
1798 | node: 97054abb4ab824450e9164180baf491ae0078465 | |
1799 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1799 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1800 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1800 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1801 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1801 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a | |
1802 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1802 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1803 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1803 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1804 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1804 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1805 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1805 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1806 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1806 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1807 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
1807 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
1808 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1808 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1809 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1809 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1810 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1810 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a | |
1811 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1811 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1812 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1812 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1813 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1813 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1814 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1814 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1815 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1815 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1816 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
1816 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
1817 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1817 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1818 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1818 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1819 | parents: |
|
1819 | parents: | |
1820 | parents: -1:000000000000 |
|
1820 | parents: -1:000000000000 | |
1821 | parents: 5:13207e5a10d9 4:bbe44766e73d |
|
1821 | parents: 5:13207e5a10d9 4:bbe44766e73d | |
1822 | parents: 3:10e46f2dcbf4 |
|
1822 | parents: 3:10e46f2dcbf4 | |
1823 | parents: |
|
1823 | parents: | |
1824 | parents: |
|
1824 | parents: | |
1825 | parents: |
|
1825 | parents: | |
1826 | parents: |
|
1826 | parents: | |
1827 | parents: |
|
1827 | parents: | |
1828 | parents--verbose: |
|
1828 | parents--verbose: | |
1829 | parents--verbose: -1:000000000000 |
|
1829 | parents--verbose: -1:000000000000 | |
1830 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d |
|
1830 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d | |
1831 | parents--verbose: 3:10e46f2dcbf4 |
|
1831 | parents--verbose: 3:10e46f2dcbf4 | |
1832 | parents--verbose: |
|
1832 | parents--verbose: | |
1833 | parents--verbose: |
|
1833 | parents--verbose: | |
1834 | parents--verbose: |
|
1834 | parents--verbose: | |
1835 | parents--verbose: |
|
1835 | parents--verbose: | |
1836 | parents--verbose: |
|
1836 | parents--verbose: | |
1837 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 |
|
1837 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 | |
1838 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
1838 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1839 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1839 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1840 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
1840 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1841 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
1841 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1842 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 |
|
1842 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 | |
1843 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 |
|
1843 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 | |
1844 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 |
|
1844 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 | |
1845 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
1845 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1846 | rev: 8 |
|
1846 | rev: 8 | |
1847 | rev: 7 |
|
1847 | rev: 7 | |
1848 | rev: 6 |
|
1848 | rev: 6 | |
1849 | rev: 5 |
|
1849 | rev: 5 | |
1850 | rev: 4 |
|
1850 | rev: 4 | |
1851 | rev: 3 |
|
1851 | rev: 3 | |
1852 | rev: 2 |
|
1852 | rev: 2 | |
1853 | rev: 1 |
|
1853 | rev: 1 | |
1854 | rev: 0 |
|
1854 | rev: 0 | |
1855 | rev--verbose: 8 |
|
1855 | rev--verbose: 8 | |
1856 | rev--verbose: 7 |
|
1856 | rev--verbose: 7 | |
1857 | rev--verbose: 6 |
|
1857 | rev--verbose: 6 | |
1858 | rev--verbose: 5 |
|
1858 | rev--verbose: 5 | |
1859 | rev--verbose: 4 |
|
1859 | rev--verbose: 4 | |
1860 | rev--verbose: 3 |
|
1860 | rev--verbose: 3 | |
1861 | rev--verbose: 2 |
|
1861 | rev--verbose: 2 | |
1862 | rev--verbose: 1 |
|
1862 | rev--verbose: 1 | |
1863 | rev--verbose: 0 |
|
1863 | rev--verbose: 0 | |
1864 | rev--debug: 8 |
|
1864 | rev--debug: 8 | |
1865 | rev--debug: 7 |
|
1865 | rev--debug: 7 | |
1866 | rev--debug: 6 |
|
1866 | rev--debug: 6 | |
1867 | rev--debug: 5 |
|
1867 | rev--debug: 5 | |
1868 | rev--debug: 4 |
|
1868 | rev--debug: 4 | |
1869 | rev--debug: 3 |
|
1869 | rev--debug: 3 | |
1870 | rev--debug: 2 |
|
1870 | rev--debug: 2 | |
1871 | rev--debug: 1 |
|
1871 | rev--debug: 1 | |
1872 | rev--debug: 0 |
|
1872 | rev--debug: 0 | |
1873 | tags: tip |
|
1873 | tags: tip | |
1874 | tags: |
|
1874 | tags: | |
1875 | tags: |
|
1875 | tags: | |
1876 | tags: |
|
1876 | tags: | |
1877 | tags: |
|
1877 | tags: | |
1878 | tags: |
|
1878 | tags: | |
1879 | tags: |
|
1879 | tags: | |
1880 | tags: |
|
1880 | tags: | |
1881 | tags: |
|
1881 | tags: | |
1882 | tags--verbose: tip |
|
1882 | tags--verbose: tip | |
1883 | tags--verbose: |
|
1883 | tags--verbose: | |
1884 | tags--verbose: |
|
1884 | tags--verbose: | |
1885 | tags--verbose: |
|
1885 | tags--verbose: | |
1886 | tags--verbose: |
|
1886 | tags--verbose: | |
1887 | tags--verbose: |
|
1887 | tags--verbose: | |
1888 | tags--verbose: |
|
1888 | tags--verbose: | |
1889 | tags--verbose: |
|
1889 | tags--verbose: | |
1890 | tags--verbose: |
|
1890 | tags--verbose: | |
1891 | tags--debug: tip |
|
1891 | tags--debug: tip | |
1892 | tags--debug: |
|
1892 | tags--debug: | |
1893 | tags--debug: |
|
1893 | tags--debug: | |
1894 | tags--debug: |
|
1894 | tags--debug: | |
1895 | tags--debug: |
|
1895 | tags--debug: | |
1896 | tags--debug: |
|
1896 | tags--debug: | |
1897 | tags--debug: |
|
1897 | tags--debug: | |
1898 | tags--debug: |
|
1898 | tags--debug: | |
1899 | tags--debug: |
|
1899 | tags--debug: | |
1900 | diffstat: 3: +2/-1 |
|
1900 | diffstat: 3: +2/-1 | |
1901 | diffstat: 1: +1/-0 |
|
1901 | diffstat: 1: +1/-0 | |
1902 | diffstat: 0: +0/-0 |
|
1902 | diffstat: 0: +0/-0 | |
1903 | diffstat: 1: +1/-0 |
|
1903 | diffstat: 1: +1/-0 | |
1904 | diffstat: 0: +0/-0 |
|
1904 | diffstat: 0: +0/-0 | |
1905 | diffstat: 1: +1/-0 |
|
1905 | diffstat: 1: +1/-0 | |
1906 | diffstat: 1: +4/-0 |
|
1906 | diffstat: 1: +4/-0 | |
1907 | diffstat: 1: +2/-0 |
|
1907 | diffstat: 1: +2/-0 | |
1908 | diffstat: 1: +1/-0 |
|
1908 | diffstat: 1: +1/-0 | |
1909 | diffstat--verbose: 3: +2/-1 |
|
1909 | diffstat--verbose: 3: +2/-1 | |
1910 | diffstat--verbose: 1: +1/-0 |
|
1910 | diffstat--verbose: 1: +1/-0 | |
1911 | diffstat--verbose: 0: +0/-0 |
|
1911 | diffstat--verbose: 0: +0/-0 | |
1912 | diffstat--verbose: 1: +1/-0 |
|
1912 | diffstat--verbose: 1: +1/-0 | |
1913 | diffstat--verbose: 0: +0/-0 |
|
1913 | diffstat--verbose: 0: +0/-0 | |
1914 | diffstat--verbose: 1: +1/-0 |
|
1914 | diffstat--verbose: 1: +1/-0 | |
1915 | diffstat--verbose: 1: +4/-0 |
|
1915 | diffstat--verbose: 1: +4/-0 | |
1916 | diffstat--verbose: 1: +2/-0 |
|
1916 | diffstat--verbose: 1: +2/-0 | |
1917 | diffstat--verbose: 1: +1/-0 |
|
1917 | diffstat--verbose: 1: +1/-0 | |
1918 | diffstat--debug: 3: +2/-1 |
|
1918 | diffstat--debug: 3: +2/-1 | |
1919 | diffstat--debug: 1: +1/-0 |
|
1919 | diffstat--debug: 1: +1/-0 | |
1920 | diffstat--debug: 0: +0/-0 |
|
1920 | diffstat--debug: 0: +0/-0 | |
1921 | diffstat--debug: 1: +1/-0 |
|
1921 | diffstat--debug: 1: +1/-0 | |
1922 | diffstat--debug: 0: +0/-0 |
|
1922 | diffstat--debug: 0: +0/-0 | |
1923 | diffstat--debug: 1: +1/-0 |
|
1923 | diffstat--debug: 1: +1/-0 | |
1924 | diffstat--debug: 1: +4/-0 |
|
1924 | diffstat--debug: 1: +4/-0 | |
1925 | diffstat--debug: 1: +2/-0 |
|
1925 | diffstat--debug: 1: +2/-0 | |
1926 | diffstat--debug: 1: +1/-0 |
|
1926 | diffstat--debug: 1: +1/-0 | |
1927 | extras: branch=default |
|
1927 | extras: branch=default | |
1928 | extras: branch=default |
|
1928 | extras: branch=default | |
1929 | extras: branch=default |
|
1929 | extras: branch=default | |
1930 | extras: branch=default |
|
1930 | extras: branch=default | |
1931 | extras: branch=foo |
|
1931 | extras: branch=foo | |
1932 | extras: branch=default |
|
1932 | extras: branch=default | |
1933 | extras: branch=default |
|
1933 | extras: branch=default | |
1934 | extras: branch=default |
|
1934 | extras: branch=default | |
1935 | extras: branch=default |
|
1935 | extras: branch=default | |
1936 | extras--verbose: branch=default |
|
1936 | extras--verbose: branch=default | |
1937 | extras--verbose: branch=default |
|
1937 | extras--verbose: branch=default | |
1938 | extras--verbose: branch=default |
|
1938 | extras--verbose: branch=default | |
1939 | extras--verbose: branch=default |
|
1939 | extras--verbose: branch=default | |
1940 | extras--verbose: branch=foo |
|
1940 | extras--verbose: branch=foo | |
1941 | extras--verbose: branch=default |
|
1941 | extras--verbose: branch=default | |
1942 | extras--verbose: branch=default |
|
1942 | extras--verbose: branch=default | |
1943 | extras--verbose: branch=default |
|
1943 | extras--verbose: branch=default | |
1944 | extras--verbose: branch=default |
|
1944 | extras--verbose: branch=default | |
1945 | extras--debug: branch=default |
|
1945 | extras--debug: branch=default | |
1946 | extras--debug: branch=default |
|
1946 | extras--debug: branch=default | |
1947 | extras--debug: branch=default |
|
1947 | extras--debug: branch=default | |
1948 | extras--debug: branch=default |
|
1948 | extras--debug: branch=default | |
1949 | extras--debug: branch=foo |
|
1949 | extras--debug: branch=foo | |
1950 | extras--debug: branch=default |
|
1950 | extras--debug: branch=default | |
1951 | extras--debug: branch=default |
|
1951 | extras--debug: branch=default | |
1952 | extras--debug: branch=default |
|
1952 | extras--debug: branch=default | |
1953 | extras--debug: branch=default |
|
1953 | extras--debug: branch=default | |
1954 | p1rev: 7 |
|
1954 | p1rev: 7 | |
1955 | p1rev: -1 |
|
1955 | p1rev: -1 | |
1956 | p1rev: 5 |
|
1956 | p1rev: 5 | |
1957 | p1rev: 3 |
|
1957 | p1rev: 3 | |
1958 | p1rev: 3 |
|
1958 | p1rev: 3 | |
1959 | p1rev: 2 |
|
1959 | p1rev: 2 | |
1960 | p1rev: 1 |
|
1960 | p1rev: 1 | |
1961 | p1rev: 0 |
|
1961 | p1rev: 0 | |
1962 | p1rev: -1 |
|
1962 | p1rev: -1 | |
1963 | p1rev--verbose: 7 |
|
1963 | p1rev--verbose: 7 | |
1964 | p1rev--verbose: -1 |
|
1964 | p1rev--verbose: -1 | |
1965 | p1rev--verbose: 5 |
|
1965 | p1rev--verbose: 5 | |
1966 | p1rev--verbose: 3 |
|
1966 | p1rev--verbose: 3 | |
1967 | p1rev--verbose: 3 |
|
1967 | p1rev--verbose: 3 | |
1968 | p1rev--verbose: 2 |
|
1968 | p1rev--verbose: 2 | |
1969 | p1rev--verbose: 1 |
|
1969 | p1rev--verbose: 1 | |
1970 | p1rev--verbose: 0 |
|
1970 | p1rev--verbose: 0 | |
1971 | p1rev--verbose: -1 |
|
1971 | p1rev--verbose: -1 | |
1972 | p1rev--debug: 7 |
|
1972 | p1rev--debug: 7 | |
1973 | p1rev--debug: -1 |
|
1973 | p1rev--debug: -1 | |
1974 | p1rev--debug: 5 |
|
1974 | p1rev--debug: 5 | |
1975 | p1rev--debug: 3 |
|
1975 | p1rev--debug: 3 | |
1976 | p1rev--debug: 3 |
|
1976 | p1rev--debug: 3 | |
1977 | p1rev--debug: 2 |
|
1977 | p1rev--debug: 2 | |
1978 | p1rev--debug: 1 |
|
1978 | p1rev--debug: 1 | |
1979 | p1rev--debug: 0 |
|
1979 | p1rev--debug: 0 | |
1980 | p1rev--debug: -1 |
|
1980 | p1rev--debug: -1 | |
1981 | p2rev: -1 |
|
1981 | p2rev: -1 | |
1982 | p2rev: -1 |
|
1982 | p2rev: -1 | |
1983 | p2rev: 4 |
|
1983 | p2rev: 4 | |
1984 | p2rev: -1 |
|
1984 | p2rev: -1 | |
1985 | p2rev: -1 |
|
1985 | p2rev: -1 | |
1986 | p2rev: -1 |
|
1986 | p2rev: -1 | |
1987 | p2rev: -1 |
|
1987 | p2rev: -1 | |
1988 | p2rev: -1 |
|
1988 | p2rev: -1 | |
1989 | p2rev: -1 |
|
1989 | p2rev: -1 | |
1990 | p2rev--verbose: -1 |
|
1990 | p2rev--verbose: -1 | |
1991 | p2rev--verbose: -1 |
|
1991 | p2rev--verbose: -1 | |
1992 | p2rev--verbose: 4 |
|
1992 | p2rev--verbose: 4 | |
1993 | p2rev--verbose: -1 |
|
1993 | p2rev--verbose: -1 | |
1994 | p2rev--verbose: -1 |
|
1994 | p2rev--verbose: -1 | |
1995 | p2rev--verbose: -1 |
|
1995 | p2rev--verbose: -1 | |
1996 | p2rev--verbose: -1 |
|
1996 | p2rev--verbose: -1 | |
1997 | p2rev--verbose: -1 |
|
1997 | p2rev--verbose: -1 | |
1998 | p2rev--verbose: -1 |
|
1998 | p2rev--verbose: -1 | |
1999 | p2rev--debug: -1 |
|
1999 | p2rev--debug: -1 | |
2000 | p2rev--debug: -1 |
|
2000 | p2rev--debug: -1 | |
2001 | p2rev--debug: 4 |
|
2001 | p2rev--debug: 4 | |
2002 | p2rev--debug: -1 |
|
2002 | p2rev--debug: -1 | |
2003 | p2rev--debug: -1 |
|
2003 | p2rev--debug: -1 | |
2004 | p2rev--debug: -1 |
|
2004 | p2rev--debug: -1 | |
2005 | p2rev--debug: -1 |
|
2005 | p2rev--debug: -1 | |
2006 | p2rev--debug: -1 |
|
2006 | p2rev--debug: -1 | |
2007 | p2rev--debug: -1 |
|
2007 | p2rev--debug: -1 | |
2008 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
2008 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
2009 | p1node: 0000000000000000000000000000000000000000 |
|
2009 | p1node: 0000000000000000000000000000000000000000 | |
2010 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
2010 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
2011 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2011 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2012 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2012 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2013 | p1node: 97054abb4ab824450e9164180baf491ae0078465 |
|
2013 | p1node: 97054abb4ab824450e9164180baf491ae0078465 | |
2014 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2014 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2015 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2015 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2016 | p1node: 0000000000000000000000000000000000000000 |
|
2016 | p1node: 0000000000000000000000000000000000000000 | |
2017 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
2017 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
2018 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
2018 | p1node--verbose: 0000000000000000000000000000000000000000 | |
2019 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
2019 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
2020 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2020 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2021 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2021 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2022 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
2022 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
2023 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2023 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2024 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2024 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2025 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
2025 | p1node--verbose: 0000000000000000000000000000000000000000 | |
2026 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
2026 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
2027 | p1node--debug: 0000000000000000000000000000000000000000 |
|
2027 | p1node--debug: 0000000000000000000000000000000000000000 | |
2028 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
2028 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
2029 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2029 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2030 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2030 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2031 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
2031 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
2032 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2032 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2033 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2033 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2034 | p1node--debug: 0000000000000000000000000000000000000000 |
|
2034 | p1node--debug: 0000000000000000000000000000000000000000 | |
2035 | p2node: 0000000000000000000000000000000000000000 |
|
2035 | p2node: 0000000000000000000000000000000000000000 | |
2036 | p2node: 0000000000000000000000000000000000000000 |
|
2036 | p2node: 0000000000000000000000000000000000000000 | |
2037 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2037 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2038 | p2node: 0000000000000000000000000000000000000000 |
|
2038 | p2node: 0000000000000000000000000000000000000000 | |
2039 | p2node: 0000000000000000000000000000000000000000 |
|
2039 | p2node: 0000000000000000000000000000000000000000 | |
2040 | p2node: 0000000000000000000000000000000000000000 |
|
2040 | p2node: 0000000000000000000000000000000000000000 | |
2041 | p2node: 0000000000000000000000000000000000000000 |
|
2041 | p2node: 0000000000000000000000000000000000000000 | |
2042 | p2node: 0000000000000000000000000000000000000000 |
|
2042 | p2node: 0000000000000000000000000000000000000000 | |
2043 | p2node: 0000000000000000000000000000000000000000 |
|
2043 | p2node: 0000000000000000000000000000000000000000 | |
2044 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2044 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2045 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2045 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2046 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2046 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2047 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2047 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2048 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2048 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2049 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2049 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2050 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2050 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2051 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2051 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2052 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2052 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2053 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2053 | p2node--debug: 0000000000000000000000000000000000000000 | |
2054 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2054 | p2node--debug: 0000000000000000000000000000000000000000 | |
2055 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2055 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2056 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2056 | p2node--debug: 0000000000000000000000000000000000000000 | |
2057 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2057 | p2node--debug: 0000000000000000000000000000000000000000 | |
2058 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2058 | p2node--debug: 0000000000000000000000000000000000000000 | |
2059 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2059 | p2node--debug: 0000000000000000000000000000000000000000 | |
2060 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2060 | p2node--debug: 0000000000000000000000000000000000000000 | |
2061 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2061 | p2node--debug: 0000000000000000000000000000000000000000 | |
2062 |
|
2062 | |||
2063 | Filters work: |
|
2063 | Filters work: | |
2064 |
|
2064 | |||
2065 | $ hg log --template '{author|domain}\n' |
|
2065 | $ hg log --template '{author|domain}\n' | |
2066 |
|
2066 | |||
2067 | hostname |
|
2067 | hostname | |
2068 |
|
2068 | |||
2069 |
|
2069 | |||
2070 |
|
2070 | |||
2071 |
|
2071 | |||
2072 | place |
|
2072 | place | |
2073 | place |
|
2073 | place | |
2074 | hostname |
|
2074 | hostname | |
2075 |
|
2075 | |||
2076 | $ hg log --template '{author|person}\n' |
|
2076 | $ hg log --template '{author|person}\n' | |
2077 | test |
|
2077 | test | |
2078 | User Name |
|
2078 | User Name | |
2079 | person |
|
2079 | person | |
2080 | person |
|
2080 | person | |
2081 | person |
|
2081 | person | |
2082 | person |
|
2082 | person | |
2083 | other |
|
2083 | other | |
2084 | A. N. Other |
|
2084 | A. N. Other | |
2085 | User Name |
|
2085 | User Name | |
2086 |
|
2086 | |||
2087 | $ hg log --template '{author|user}\n' |
|
2087 | $ hg log --template '{author|user}\n' | |
2088 | test |
|
2088 | test | |
2089 | user |
|
2089 | user | |
2090 | person |
|
2090 | person | |
2091 | person |
|
2091 | person | |
2092 | person |
|
2092 | person | |
2093 | person |
|
2093 | person | |
2094 | other |
|
2094 | other | |
2095 | other |
|
2095 | other | |
2096 | user |
|
2096 | user | |
2097 |
|
2097 | |||
2098 | $ hg log --template '{date|date}\n' |
|
2098 | $ hg log --template '{date|date}\n' | |
2099 | Wed Jan 01 10:01:00 2020 +0000 |
|
2099 | Wed Jan 01 10:01:00 2020 +0000 | |
2100 | Mon Jan 12 13:46:40 1970 +0000 |
|
2100 | Mon Jan 12 13:46:40 1970 +0000 | |
2101 | Sun Jan 18 08:40:01 1970 +0000 |
|
2101 | Sun Jan 18 08:40:01 1970 +0000 | |
2102 | Sun Jan 18 08:40:00 1970 +0000 |
|
2102 | Sun Jan 18 08:40:00 1970 +0000 | |
2103 | Sat Jan 17 04:53:20 1970 +0000 |
|
2103 | Sat Jan 17 04:53:20 1970 +0000 | |
2104 | Fri Jan 16 01:06:40 1970 +0000 |
|
2104 | Fri Jan 16 01:06:40 1970 +0000 | |
2105 | Wed Jan 14 21:20:00 1970 +0000 |
|
2105 | Wed Jan 14 21:20:00 1970 +0000 | |
2106 | Tue Jan 13 17:33:20 1970 +0000 |
|
2106 | Tue Jan 13 17:33:20 1970 +0000 | |
2107 | Mon Jan 12 13:46:40 1970 +0000 |
|
2107 | Mon Jan 12 13:46:40 1970 +0000 | |
2108 |
|
2108 | |||
2109 | $ hg log --template '{date|isodate}\n' |
|
2109 | $ hg log --template '{date|isodate}\n' | |
2110 | 2020-01-01 10:01 +0000 |
|
2110 | 2020-01-01 10:01 +0000 | |
2111 | 1970-01-12 13:46 +0000 |
|
2111 | 1970-01-12 13:46 +0000 | |
2112 | 1970-01-18 08:40 +0000 |
|
2112 | 1970-01-18 08:40 +0000 | |
2113 | 1970-01-18 08:40 +0000 |
|
2113 | 1970-01-18 08:40 +0000 | |
2114 | 1970-01-17 04:53 +0000 |
|
2114 | 1970-01-17 04:53 +0000 | |
2115 | 1970-01-16 01:06 +0000 |
|
2115 | 1970-01-16 01:06 +0000 | |
2116 | 1970-01-14 21:20 +0000 |
|
2116 | 1970-01-14 21:20 +0000 | |
2117 | 1970-01-13 17:33 +0000 |
|
2117 | 1970-01-13 17:33 +0000 | |
2118 | 1970-01-12 13:46 +0000 |
|
2118 | 1970-01-12 13:46 +0000 | |
2119 |
|
2119 | |||
2120 | $ hg log --template '{date|isodatesec}\n' |
|
2120 | $ hg log --template '{date|isodatesec}\n' | |
2121 | 2020-01-01 10:01:00 +0000 |
|
2121 | 2020-01-01 10:01:00 +0000 | |
2122 | 1970-01-12 13:46:40 +0000 |
|
2122 | 1970-01-12 13:46:40 +0000 | |
2123 | 1970-01-18 08:40:01 +0000 |
|
2123 | 1970-01-18 08:40:01 +0000 | |
2124 | 1970-01-18 08:40:00 +0000 |
|
2124 | 1970-01-18 08:40:00 +0000 | |
2125 | 1970-01-17 04:53:20 +0000 |
|
2125 | 1970-01-17 04:53:20 +0000 | |
2126 | 1970-01-16 01:06:40 +0000 |
|
2126 | 1970-01-16 01:06:40 +0000 | |
2127 | 1970-01-14 21:20:00 +0000 |
|
2127 | 1970-01-14 21:20:00 +0000 | |
2128 | 1970-01-13 17:33:20 +0000 |
|
2128 | 1970-01-13 17:33:20 +0000 | |
2129 | 1970-01-12 13:46:40 +0000 |
|
2129 | 1970-01-12 13:46:40 +0000 | |
2130 |
|
2130 | |||
2131 | $ hg log --template '{date|rfc822date}\n' |
|
2131 | $ hg log --template '{date|rfc822date}\n' | |
2132 | Wed, 01 Jan 2020 10:01:00 +0000 |
|
2132 | Wed, 01 Jan 2020 10:01:00 +0000 | |
2133 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
2133 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2134 | Sun, 18 Jan 1970 08:40:01 +0000 |
|
2134 | Sun, 18 Jan 1970 08:40:01 +0000 | |
2135 | Sun, 18 Jan 1970 08:40:00 +0000 |
|
2135 | Sun, 18 Jan 1970 08:40:00 +0000 | |
2136 | Sat, 17 Jan 1970 04:53:20 +0000 |
|
2136 | Sat, 17 Jan 1970 04:53:20 +0000 | |
2137 | Fri, 16 Jan 1970 01:06:40 +0000 |
|
2137 | Fri, 16 Jan 1970 01:06:40 +0000 | |
2138 | Wed, 14 Jan 1970 21:20:00 +0000 |
|
2138 | Wed, 14 Jan 1970 21:20:00 +0000 | |
2139 | Tue, 13 Jan 1970 17:33:20 +0000 |
|
2139 | Tue, 13 Jan 1970 17:33:20 +0000 | |
2140 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
2140 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2141 |
|
2141 | |||
2142 | $ hg log --template '{desc|firstline}\n' |
|
2142 | $ hg log --template '{desc|firstline}\n' | |
2143 | third |
|
2143 | third | |
2144 | second |
|
2144 | second | |
2145 | merge |
|
2145 | merge | |
2146 | new head |
|
2146 | new head | |
2147 | new branch |
|
2147 | new branch | |
2148 | no user, no domain |
|
2148 | no user, no domain | |
2149 | no person |
|
2149 | no person | |
2150 | other 1 |
|
2150 | other 1 | |
2151 | line 1 |
|
2151 | line 1 | |
2152 |
|
2152 | |||
2153 | $ hg log --template '{node|short}\n' |
|
2153 | $ hg log --template '{node|short}\n' | |
2154 | 95c24699272e |
|
2154 | 95c24699272e | |
2155 | 29114dbae42b |
|
2155 | 29114dbae42b | |
2156 | d41e714fe50d |
|
2156 | d41e714fe50d | |
2157 | 13207e5a10d9 |
|
2157 | 13207e5a10d9 | |
2158 | bbe44766e73d |
|
2158 | bbe44766e73d | |
2159 | 10e46f2dcbf4 |
|
2159 | 10e46f2dcbf4 | |
2160 | 97054abb4ab8 |
|
2160 | 97054abb4ab8 | |
2161 | b608e9d1a3f0 |
|
2161 | b608e9d1a3f0 | |
2162 | 1e4e1b8f71e0 |
|
2162 | 1e4e1b8f71e0 | |
2163 |
|
2163 | |||
2164 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' |
|
2164 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' | |
2165 | <changeset author="test"/> |
|
2165 | <changeset author="test"/> | |
2166 | <changeset author="User Name <user@hostname>"/> |
|
2166 | <changeset author="User Name <user@hostname>"/> | |
2167 | <changeset author="person"/> |
|
2167 | <changeset author="person"/> | |
2168 | <changeset author="person"/> |
|
2168 | <changeset author="person"/> | |
2169 | <changeset author="person"/> |
|
2169 | <changeset author="person"/> | |
2170 | <changeset author="person"/> |
|
2170 | <changeset author="person"/> | |
2171 | <changeset author="other@place"/> |
|
2171 | <changeset author="other@place"/> | |
2172 | <changeset author="A. N. Other <other@place>"/> |
|
2172 | <changeset author="A. N. Other <other@place>"/> | |
2173 | <changeset author="User Name <user@hostname>"/> |
|
2173 | <changeset author="User Name <user@hostname>"/> | |
2174 |
|
2174 | |||
2175 | $ hg log --template '{rev}: {children}\n' |
|
2175 | $ hg log --template '{rev}: {children}\n' | |
2176 | 8: |
|
2176 | 8: | |
2177 | 7: 8:95c24699272e |
|
2177 | 7: 8:95c24699272e | |
2178 | 6: |
|
2178 | 6: | |
2179 | 5: 6:d41e714fe50d |
|
2179 | 5: 6:d41e714fe50d | |
2180 | 4: 6:d41e714fe50d |
|
2180 | 4: 6:d41e714fe50d | |
2181 | 3: 4:bbe44766e73d 5:13207e5a10d9 |
|
2181 | 3: 4:bbe44766e73d 5:13207e5a10d9 | |
2182 | 2: 3:10e46f2dcbf4 |
|
2182 | 2: 3:10e46f2dcbf4 | |
2183 | 1: 2:97054abb4ab8 |
|
2183 | 1: 2:97054abb4ab8 | |
2184 | 0: 1:b608e9d1a3f0 |
|
2184 | 0: 1:b608e9d1a3f0 | |
2185 |
|
2185 | |||
2186 | Formatnode filter works: |
|
2186 | Formatnode filter works: | |
2187 |
|
2187 | |||
2188 | $ hg -q log -r 0 --template '{node|formatnode}\n' |
|
2188 | $ hg -q log -r 0 --template '{node|formatnode}\n' | |
2189 | 1e4e1b8f71e0 |
|
2189 | 1e4e1b8f71e0 | |
2190 |
|
2190 | |||
2191 | $ hg log -r 0 --template '{node|formatnode}\n' |
|
2191 | $ hg log -r 0 --template '{node|formatnode}\n' | |
2192 | 1e4e1b8f71e0 |
|
2192 | 1e4e1b8f71e0 | |
2193 |
|
2193 | |||
2194 | $ hg -v log -r 0 --template '{node|formatnode}\n' |
|
2194 | $ hg -v log -r 0 --template '{node|formatnode}\n' | |
2195 | 1e4e1b8f71e0 |
|
2195 | 1e4e1b8f71e0 | |
2196 |
|
2196 | |||
2197 | $ hg --debug log -r 0 --template '{node|formatnode}\n' |
|
2197 | $ hg --debug log -r 0 --template '{node|formatnode}\n' | |
2198 | 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2198 | 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2199 |
|
2199 | |||
2200 | Age filter: |
|
2200 | Age filter: | |
2201 |
|
2201 | |||
2202 | $ hg init unstable-hash |
|
2202 | $ hg init unstable-hash | |
2203 | $ cd unstable-hash |
|
2203 | $ cd unstable-hash | |
2204 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 |
|
2204 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 | |
2205 |
|
2205 | |||
2206 | >>> from __future__ import absolute_import |
|
2206 | >>> from __future__ import absolute_import | |
2207 | >>> import datetime |
|
2207 | >>> import datetime | |
2208 | >>> fp = open('a', 'w') |
|
2208 | >>> fp = open('a', 'w') | |
2209 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) |
|
2209 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) | |
2210 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) |
|
2210 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) | |
2211 | >>> fp.close() |
|
2211 | >>> fp.close() | |
2212 | $ hg add a |
|
2212 | $ hg add a | |
2213 | $ hg commit -m future -d "`cat a`" |
|
2213 | $ hg commit -m future -d "`cat a`" | |
2214 |
|
2214 | |||
2215 | $ hg log -l1 --template '{date|age}\n' |
|
2215 | $ hg log -l1 --template '{date|age}\n' | |
2216 | 7 years from now |
|
2216 | 7 years from now | |
2217 |
|
2217 | |||
2218 | $ cd .. |
|
2218 | $ cd .. | |
2219 | $ rm -rf unstable-hash |
|
2219 | $ rm -rf unstable-hash | |
2220 |
|
2220 | |||
|
2221 | Filename filters: | |||
|
2222 | ||||
|
2223 | $ hg debugtemplate '{"foo/bar"|basename}|{"foo/"|basename}|{"foo"|basename}|\n' | |||
|
2224 | bar||foo| | |||
|
2225 | ||||
2221 | Add a dummy commit to make up for the instability of the above: |
|
2226 | Add a dummy commit to make up for the instability of the above: | |
2222 |
|
2227 | |||
2223 | $ echo a > a |
|
2228 | $ echo a > a | |
2224 | $ hg add a |
|
2229 | $ hg add a | |
2225 | $ hg ci -m future |
|
2230 | $ hg ci -m future | |
2226 |
|
2231 | |||
2227 | Count filter: |
|
2232 | Count filter: | |
2228 |
|
2233 | |||
2229 | $ hg log -l1 --template '{node|count} {node|short|count}\n' |
|
2234 | $ hg log -l1 --template '{node|count} {node|short|count}\n' | |
2230 | 40 12 |
|
2235 | 40 12 | |
2231 |
|
2236 | |||
2232 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' |
|
2237 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' | |
2233 | 0 1 4 |
|
2238 | 0 1 4 | |
2234 |
|
2239 | |||
2235 | $ hg log -G --template '{rev}: children: {children|count}, \ |
|
2240 | $ hg log -G --template '{rev}: children: {children|count}, \ | |
2236 | > tags: {tags|count}, file_adds: {file_adds|count}, \ |
|
2241 | > tags: {tags|count}, file_adds: {file_adds|count}, \ | |
2237 | > ancestors: {revset("ancestors(%s)", rev)|count}' |
|
2242 | > ancestors: {revset("ancestors(%s)", rev)|count}' | |
2238 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 |
|
2243 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 | |
2239 | | |
|
2244 | | | |
2240 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 |
|
2245 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 | |
2241 | | |
|
2246 | | | |
2242 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
2247 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2243 |
|
2248 | |||
2244 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 |
|
2249 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 | |
2245 | |\ |
|
2250 | |\ | |
2246 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 |
|
2251 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 | |
2247 | | | |
|
2252 | | | | |
2248 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 |
|
2253 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 | |
2249 | |/ |
|
2254 | |/ | |
2250 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 |
|
2255 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 | |
2251 | | |
|
2256 | | | |
2252 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 |
|
2257 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 | |
2253 | | |
|
2258 | | | |
2254 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 |
|
2259 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 | |
2255 | | |
|
2260 | | | |
2256 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
2261 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2257 |
|
2262 | |||
2258 |
|
2263 | |||
2259 | Upper/lower filters: |
|
2264 | Upper/lower filters: | |
2260 |
|
2265 | |||
2261 | $ hg log -r0 --template '{branch|upper}\n' |
|
2266 | $ hg log -r0 --template '{branch|upper}\n' | |
2262 | DEFAULT |
|
2267 | DEFAULT | |
2263 | $ hg log -r0 --template '{author|lower}\n' |
|
2268 | $ hg log -r0 --template '{author|lower}\n' | |
2264 | user name <user@hostname> |
|
2269 | user name <user@hostname> | |
2265 | $ hg log -r0 --template '{date|upper}\n' |
|
2270 | $ hg log -r0 --template '{date|upper}\n' | |
2266 | abort: template filter 'upper' is not compatible with keyword 'date' |
|
2271 | abort: template filter 'upper' is not compatible with keyword 'date' | |
2267 | [255] |
|
2272 | [255] | |
2268 |
|
2273 | |||
2269 | Add a commit that does all possible modifications at once |
|
2274 | Add a commit that does all possible modifications at once | |
2270 |
|
2275 | |||
2271 | $ echo modify >> third |
|
2276 | $ echo modify >> third | |
2272 | $ touch b |
|
2277 | $ touch b | |
2273 | $ hg add b |
|
2278 | $ hg add b | |
2274 | $ hg mv fourth fifth |
|
2279 | $ hg mv fourth fifth | |
2275 | $ hg rm a |
|
2280 | $ hg rm a | |
2276 | $ hg ci -m "Modify, add, remove, rename" |
|
2281 | $ hg ci -m "Modify, add, remove, rename" | |
2277 |
|
2282 | |||
2278 | Check the status template |
|
2283 | Check the status template | |
2279 |
|
2284 | |||
2280 | $ cat <<EOF >> $HGRCPATH |
|
2285 | $ cat <<EOF >> $HGRCPATH | |
2281 | > [extensions] |
|
2286 | > [extensions] | |
2282 | > color= |
|
2287 | > color= | |
2283 | > EOF |
|
2288 | > EOF | |
2284 |
|
2289 | |||
2285 | $ hg log -T status -r 10 |
|
2290 | $ hg log -T status -r 10 | |
2286 | changeset: 10:0f9759ec227a |
|
2291 | changeset: 10:0f9759ec227a | |
2287 | tag: tip |
|
2292 | tag: tip | |
2288 | user: test |
|
2293 | user: test | |
2289 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2294 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2290 | summary: Modify, add, remove, rename |
|
2295 | summary: Modify, add, remove, rename | |
2291 | files: |
|
2296 | files: | |
2292 | M third |
|
2297 | M third | |
2293 | A b |
|
2298 | A b | |
2294 | A fifth |
|
2299 | A fifth | |
2295 | R a |
|
2300 | R a | |
2296 | R fourth |
|
2301 | R fourth | |
2297 |
|
2302 | |||
2298 | $ hg log -T status -C -r 10 |
|
2303 | $ hg log -T status -C -r 10 | |
2299 | changeset: 10:0f9759ec227a |
|
2304 | changeset: 10:0f9759ec227a | |
2300 | tag: tip |
|
2305 | tag: tip | |
2301 | user: test |
|
2306 | user: test | |
2302 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2307 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2303 | summary: Modify, add, remove, rename |
|
2308 | summary: Modify, add, remove, rename | |
2304 | files: |
|
2309 | files: | |
2305 | M third |
|
2310 | M third | |
2306 | A b |
|
2311 | A b | |
2307 | A fifth |
|
2312 | A fifth | |
2308 | fourth |
|
2313 | fourth | |
2309 | R a |
|
2314 | R a | |
2310 | R fourth |
|
2315 | R fourth | |
2311 |
|
2316 | |||
2312 | $ hg log -T status -C -r 10 -v |
|
2317 | $ hg log -T status -C -r 10 -v | |
2313 | changeset: 10:0f9759ec227a |
|
2318 | changeset: 10:0f9759ec227a | |
2314 | tag: tip |
|
2319 | tag: tip | |
2315 | user: test |
|
2320 | user: test | |
2316 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2321 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2317 | description: |
|
2322 | description: | |
2318 | Modify, add, remove, rename |
|
2323 | Modify, add, remove, rename | |
2319 |
|
2324 | |||
2320 | files: |
|
2325 | files: | |
2321 | M third |
|
2326 | M third | |
2322 | A b |
|
2327 | A b | |
2323 | A fifth |
|
2328 | A fifth | |
2324 | fourth |
|
2329 | fourth | |
2325 | R a |
|
2330 | R a | |
2326 | R fourth |
|
2331 | R fourth | |
2327 |
|
2332 | |||
2328 | $ hg log -T status -C -r 10 --debug |
|
2333 | $ hg log -T status -C -r 10 --debug | |
2329 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c |
|
2334 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c | |
2330 | tag: tip |
|
2335 | tag: tip | |
2331 | phase: secret |
|
2336 | phase: secret | |
2332 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 |
|
2337 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 | |
2333 | parent: -1:0000000000000000000000000000000000000000 |
|
2338 | parent: -1:0000000000000000000000000000000000000000 | |
2334 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 |
|
2339 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 | |
2335 | user: test |
|
2340 | user: test | |
2336 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2341 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2337 | extra: branch=default |
|
2342 | extra: branch=default | |
2338 | description: |
|
2343 | description: | |
2339 | Modify, add, remove, rename |
|
2344 | Modify, add, remove, rename | |
2340 |
|
2345 | |||
2341 | files: |
|
2346 | files: | |
2342 | M third |
|
2347 | M third | |
2343 | A b |
|
2348 | A b | |
2344 | A fifth |
|
2349 | A fifth | |
2345 | fourth |
|
2350 | fourth | |
2346 | R a |
|
2351 | R a | |
2347 | R fourth |
|
2352 | R fourth | |
2348 |
|
2353 | |||
2349 | $ hg log -T status -C -r 10 --quiet |
|
2354 | $ hg log -T status -C -r 10 --quiet | |
2350 | 10:0f9759ec227a |
|
2355 | 10:0f9759ec227a | |
2351 | $ hg --color=debug log -T status -r 10 |
|
2356 | $ hg --color=debug log -T status -r 10 | |
2352 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2357 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2353 | [log.tag|tag: tip] |
|
2358 | [log.tag|tag: tip] | |
2354 | [log.user|user: test] |
|
2359 | [log.user|user: test] | |
2355 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2360 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2356 | [log.summary|summary: Modify, add, remove, rename] |
|
2361 | [log.summary|summary: Modify, add, remove, rename] | |
2357 | [ui.note log.files|files:] |
|
2362 | [ui.note log.files|files:] | |
2358 | [status.modified|M third] |
|
2363 | [status.modified|M third] | |
2359 | [status.added|A b] |
|
2364 | [status.added|A b] | |
2360 | [status.added|A fifth] |
|
2365 | [status.added|A fifth] | |
2361 | [status.removed|R a] |
|
2366 | [status.removed|R a] | |
2362 | [status.removed|R fourth] |
|
2367 | [status.removed|R fourth] | |
2363 |
|
2368 | |||
2364 | $ hg --color=debug log -T status -C -r 10 |
|
2369 | $ hg --color=debug log -T status -C -r 10 | |
2365 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2370 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2366 | [log.tag|tag: tip] |
|
2371 | [log.tag|tag: tip] | |
2367 | [log.user|user: test] |
|
2372 | [log.user|user: test] | |
2368 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2373 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2369 | [log.summary|summary: Modify, add, remove, rename] |
|
2374 | [log.summary|summary: Modify, add, remove, rename] | |
2370 | [ui.note log.files|files:] |
|
2375 | [ui.note log.files|files:] | |
2371 | [status.modified|M third] |
|
2376 | [status.modified|M third] | |
2372 | [status.added|A b] |
|
2377 | [status.added|A b] | |
2373 | [status.added|A fifth] |
|
2378 | [status.added|A fifth] | |
2374 | [status.copied| fourth] |
|
2379 | [status.copied| fourth] | |
2375 | [status.removed|R a] |
|
2380 | [status.removed|R a] | |
2376 | [status.removed|R fourth] |
|
2381 | [status.removed|R fourth] | |
2377 |
|
2382 | |||
2378 | $ hg --color=debug log -T status -C -r 10 -v |
|
2383 | $ hg --color=debug log -T status -C -r 10 -v | |
2379 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2384 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2380 | [log.tag|tag: tip] |
|
2385 | [log.tag|tag: tip] | |
2381 | [log.user|user: test] |
|
2386 | [log.user|user: test] | |
2382 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2387 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2383 | [ui.note log.description|description:] |
|
2388 | [ui.note log.description|description:] | |
2384 | [ui.note log.description|Modify, add, remove, rename] |
|
2389 | [ui.note log.description|Modify, add, remove, rename] | |
2385 |
|
2390 | |||
2386 | [ui.note log.files|files:] |
|
2391 | [ui.note log.files|files:] | |
2387 | [status.modified|M third] |
|
2392 | [status.modified|M third] | |
2388 | [status.added|A b] |
|
2393 | [status.added|A b] | |
2389 | [status.added|A fifth] |
|
2394 | [status.added|A fifth] | |
2390 | [status.copied| fourth] |
|
2395 | [status.copied| fourth] | |
2391 | [status.removed|R a] |
|
2396 | [status.removed|R a] | |
2392 | [status.removed|R fourth] |
|
2397 | [status.removed|R fourth] | |
2393 |
|
2398 | |||
2394 | $ hg --color=debug log -T status -C -r 10 --debug |
|
2399 | $ hg --color=debug log -T status -C -r 10 --debug | |
2395 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] |
|
2400 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] | |
2396 | [log.tag|tag: tip] |
|
2401 | [log.tag|tag: tip] | |
2397 | [log.phase|phase: secret] |
|
2402 | [log.phase|phase: secret] | |
2398 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] |
|
2403 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] | |
2399 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2404 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2400 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] |
|
2405 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] | |
2401 | [log.user|user: test] |
|
2406 | [log.user|user: test] | |
2402 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2407 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2403 | [ui.debug log.extra|extra: branch=default] |
|
2408 | [ui.debug log.extra|extra: branch=default] | |
2404 | [ui.note log.description|description:] |
|
2409 | [ui.note log.description|description:] | |
2405 | [ui.note log.description|Modify, add, remove, rename] |
|
2410 | [ui.note log.description|Modify, add, remove, rename] | |
2406 |
|
2411 | |||
2407 | [ui.note log.files|files:] |
|
2412 | [ui.note log.files|files:] | |
2408 | [status.modified|M third] |
|
2413 | [status.modified|M third] | |
2409 | [status.added|A b] |
|
2414 | [status.added|A b] | |
2410 | [status.added|A fifth] |
|
2415 | [status.added|A fifth] | |
2411 | [status.copied| fourth] |
|
2416 | [status.copied| fourth] | |
2412 | [status.removed|R a] |
|
2417 | [status.removed|R a] | |
2413 | [status.removed|R fourth] |
|
2418 | [status.removed|R fourth] | |
2414 |
|
2419 | |||
2415 | $ hg --color=debug log -T status -C -r 10 --quiet |
|
2420 | $ hg --color=debug log -T status -C -r 10 --quiet | |
2416 | [log.node|10:0f9759ec227a] |
|
2421 | [log.node|10:0f9759ec227a] | |
2417 |
|
2422 | |||
2418 | Check the bisect template |
|
2423 | Check the bisect template | |
2419 |
|
2424 | |||
2420 | $ hg bisect -g 1 |
|
2425 | $ hg bisect -g 1 | |
2421 | $ hg bisect -b 3 --noupdate |
|
2426 | $ hg bisect -b 3 --noupdate | |
2422 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) |
|
2427 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) | |
2423 | $ hg log -T bisect -r 0:4 |
|
2428 | $ hg log -T bisect -r 0:4 | |
2424 | changeset: 0:1e4e1b8f71e0 |
|
2429 | changeset: 0:1e4e1b8f71e0 | |
2425 | bisect: good (implicit) |
|
2430 | bisect: good (implicit) | |
2426 | user: User Name <user@hostname> |
|
2431 | user: User Name <user@hostname> | |
2427 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2432 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2428 | summary: line 1 |
|
2433 | summary: line 1 | |
2429 |
|
2434 | |||
2430 | changeset: 1:b608e9d1a3f0 |
|
2435 | changeset: 1:b608e9d1a3f0 | |
2431 | bisect: good |
|
2436 | bisect: good | |
2432 | user: A. N. Other <other@place> |
|
2437 | user: A. N. Other <other@place> | |
2433 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2438 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2434 | summary: other 1 |
|
2439 | summary: other 1 | |
2435 |
|
2440 | |||
2436 | changeset: 2:97054abb4ab8 |
|
2441 | changeset: 2:97054abb4ab8 | |
2437 | bisect: untested |
|
2442 | bisect: untested | |
2438 | user: other@place |
|
2443 | user: other@place | |
2439 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2444 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2440 | summary: no person |
|
2445 | summary: no person | |
2441 |
|
2446 | |||
2442 | changeset: 3:10e46f2dcbf4 |
|
2447 | changeset: 3:10e46f2dcbf4 | |
2443 | bisect: bad |
|
2448 | bisect: bad | |
2444 | user: person |
|
2449 | user: person | |
2445 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2450 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2446 | summary: no user, no domain |
|
2451 | summary: no user, no domain | |
2447 |
|
2452 | |||
2448 | changeset: 4:bbe44766e73d |
|
2453 | changeset: 4:bbe44766e73d | |
2449 | bisect: bad (implicit) |
|
2454 | bisect: bad (implicit) | |
2450 | branch: foo |
|
2455 | branch: foo | |
2451 | user: person |
|
2456 | user: person | |
2452 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2457 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2453 | summary: new branch |
|
2458 | summary: new branch | |
2454 |
|
2459 | |||
2455 | $ hg log --debug -T bisect -r 0:4 |
|
2460 | $ hg log --debug -T bisect -r 0:4 | |
2456 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2461 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2457 | bisect: good (implicit) |
|
2462 | bisect: good (implicit) | |
2458 | phase: public |
|
2463 | phase: public | |
2459 | parent: -1:0000000000000000000000000000000000000000 |
|
2464 | parent: -1:0000000000000000000000000000000000000000 | |
2460 | parent: -1:0000000000000000000000000000000000000000 |
|
2465 | parent: -1:0000000000000000000000000000000000000000 | |
2461 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
2466 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
2462 | user: User Name <user@hostname> |
|
2467 | user: User Name <user@hostname> | |
2463 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2468 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2464 | files+: a |
|
2469 | files+: a | |
2465 | extra: branch=default |
|
2470 | extra: branch=default | |
2466 | description: |
|
2471 | description: | |
2467 | line 1 |
|
2472 | line 1 | |
2468 | line 2 |
|
2473 | line 2 | |
2469 |
|
2474 | |||
2470 |
|
2475 | |||
2471 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2476 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2472 | bisect: good |
|
2477 | bisect: good | |
2473 | phase: public |
|
2478 | phase: public | |
2474 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2479 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2475 | parent: -1:0000000000000000000000000000000000000000 |
|
2480 | parent: -1:0000000000000000000000000000000000000000 | |
2476 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
2481 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
2477 | user: A. N. Other <other@place> |
|
2482 | user: A. N. Other <other@place> | |
2478 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2483 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2479 | files+: b |
|
2484 | files+: b | |
2480 | extra: branch=default |
|
2485 | extra: branch=default | |
2481 | description: |
|
2486 | description: | |
2482 | other 1 |
|
2487 | other 1 | |
2483 | other 2 |
|
2488 | other 2 | |
2484 |
|
2489 | |||
2485 | other 3 |
|
2490 | other 3 | |
2486 |
|
2491 | |||
2487 |
|
2492 | |||
2488 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
2493 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2489 | bisect: untested |
|
2494 | bisect: untested | |
2490 | phase: public |
|
2495 | phase: public | |
2491 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2496 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2492 | parent: -1:0000000000000000000000000000000000000000 |
|
2497 | parent: -1:0000000000000000000000000000000000000000 | |
2493 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
2498 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
2494 | user: other@place |
|
2499 | user: other@place | |
2495 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2500 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2496 | files+: c |
|
2501 | files+: c | |
2497 | extra: branch=default |
|
2502 | extra: branch=default | |
2498 | description: |
|
2503 | description: | |
2499 | no person |
|
2504 | no person | |
2500 |
|
2505 | |||
2501 |
|
2506 | |||
2502 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2507 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2503 | bisect: bad |
|
2508 | bisect: bad | |
2504 | phase: public |
|
2509 | phase: public | |
2505 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
2510 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2506 | parent: -1:0000000000000000000000000000000000000000 |
|
2511 | parent: -1:0000000000000000000000000000000000000000 | |
2507 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
2512 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2508 | user: person |
|
2513 | user: person | |
2509 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2514 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2510 | files: c |
|
2515 | files: c | |
2511 | extra: branch=default |
|
2516 | extra: branch=default | |
2512 | description: |
|
2517 | description: | |
2513 | no user, no domain |
|
2518 | no user, no domain | |
2514 |
|
2519 | |||
2515 |
|
2520 | |||
2516 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2521 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2517 | bisect: bad (implicit) |
|
2522 | bisect: bad (implicit) | |
2518 | branch: foo |
|
2523 | branch: foo | |
2519 | phase: draft |
|
2524 | phase: draft | |
2520 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2525 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2521 | parent: -1:0000000000000000000000000000000000000000 |
|
2526 | parent: -1:0000000000000000000000000000000000000000 | |
2522 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
2527 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2523 | user: person |
|
2528 | user: person | |
2524 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2529 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2525 | extra: branch=foo |
|
2530 | extra: branch=foo | |
2526 | description: |
|
2531 | description: | |
2527 | new branch |
|
2532 | new branch | |
2528 |
|
2533 | |||
2529 |
|
2534 | |||
2530 | $ hg log -v -T bisect -r 0:4 |
|
2535 | $ hg log -v -T bisect -r 0:4 | |
2531 | changeset: 0:1e4e1b8f71e0 |
|
2536 | changeset: 0:1e4e1b8f71e0 | |
2532 | bisect: good (implicit) |
|
2537 | bisect: good (implicit) | |
2533 | user: User Name <user@hostname> |
|
2538 | user: User Name <user@hostname> | |
2534 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2539 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2535 | files: a |
|
2540 | files: a | |
2536 | description: |
|
2541 | description: | |
2537 | line 1 |
|
2542 | line 1 | |
2538 | line 2 |
|
2543 | line 2 | |
2539 |
|
2544 | |||
2540 |
|
2545 | |||
2541 | changeset: 1:b608e9d1a3f0 |
|
2546 | changeset: 1:b608e9d1a3f0 | |
2542 | bisect: good |
|
2547 | bisect: good | |
2543 | user: A. N. Other <other@place> |
|
2548 | user: A. N. Other <other@place> | |
2544 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2549 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2545 | files: b |
|
2550 | files: b | |
2546 | description: |
|
2551 | description: | |
2547 | other 1 |
|
2552 | other 1 | |
2548 | other 2 |
|
2553 | other 2 | |
2549 |
|
2554 | |||
2550 | other 3 |
|
2555 | other 3 | |
2551 |
|
2556 | |||
2552 |
|
2557 | |||
2553 | changeset: 2:97054abb4ab8 |
|
2558 | changeset: 2:97054abb4ab8 | |
2554 | bisect: untested |
|
2559 | bisect: untested | |
2555 | user: other@place |
|
2560 | user: other@place | |
2556 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2561 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2557 | files: c |
|
2562 | files: c | |
2558 | description: |
|
2563 | description: | |
2559 | no person |
|
2564 | no person | |
2560 |
|
2565 | |||
2561 |
|
2566 | |||
2562 | changeset: 3:10e46f2dcbf4 |
|
2567 | changeset: 3:10e46f2dcbf4 | |
2563 | bisect: bad |
|
2568 | bisect: bad | |
2564 | user: person |
|
2569 | user: person | |
2565 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2570 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2566 | files: c |
|
2571 | files: c | |
2567 | description: |
|
2572 | description: | |
2568 | no user, no domain |
|
2573 | no user, no domain | |
2569 |
|
2574 | |||
2570 |
|
2575 | |||
2571 | changeset: 4:bbe44766e73d |
|
2576 | changeset: 4:bbe44766e73d | |
2572 | bisect: bad (implicit) |
|
2577 | bisect: bad (implicit) | |
2573 | branch: foo |
|
2578 | branch: foo | |
2574 | user: person |
|
2579 | user: person | |
2575 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2580 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2576 | description: |
|
2581 | description: | |
2577 | new branch |
|
2582 | new branch | |
2578 |
|
2583 | |||
2579 |
|
2584 | |||
2580 | $ hg --color=debug log -T bisect -r 0:4 |
|
2585 | $ hg --color=debug log -T bisect -r 0:4 | |
2581 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
2586 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2582 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2587 | [log.bisect bisect.good|bisect: good (implicit)] | |
2583 | [log.user|user: User Name <user@hostname>] |
|
2588 | [log.user|user: User Name <user@hostname>] | |
2584 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2589 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2585 | [log.summary|summary: line 1] |
|
2590 | [log.summary|summary: line 1] | |
2586 |
|
2591 | |||
2587 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
2592 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2588 | [log.bisect bisect.good|bisect: good] |
|
2593 | [log.bisect bisect.good|bisect: good] | |
2589 | [log.user|user: A. N. Other <other@place>] |
|
2594 | [log.user|user: A. N. Other <other@place>] | |
2590 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2595 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2591 | [log.summary|summary: other 1] |
|
2596 | [log.summary|summary: other 1] | |
2592 |
|
2597 | |||
2593 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
2598 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2594 | [log.bisect bisect.untested|bisect: untested] |
|
2599 | [log.bisect bisect.untested|bisect: untested] | |
2595 | [log.user|user: other@place] |
|
2600 | [log.user|user: other@place] | |
2596 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2601 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2597 | [log.summary|summary: no person] |
|
2602 | [log.summary|summary: no person] | |
2598 |
|
2603 | |||
2599 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
2604 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2600 | [log.bisect bisect.bad|bisect: bad] |
|
2605 | [log.bisect bisect.bad|bisect: bad] | |
2601 | [log.user|user: person] |
|
2606 | [log.user|user: person] | |
2602 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2607 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2603 | [log.summary|summary: no user, no domain] |
|
2608 | [log.summary|summary: no user, no domain] | |
2604 |
|
2609 | |||
2605 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
2610 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2606 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2611 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2607 | [log.branch|branch: foo] |
|
2612 | [log.branch|branch: foo] | |
2608 | [log.user|user: person] |
|
2613 | [log.user|user: person] | |
2609 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2614 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2610 | [log.summary|summary: new branch] |
|
2615 | [log.summary|summary: new branch] | |
2611 |
|
2616 | |||
2612 | $ hg --color=debug log --debug -T bisect -r 0:4 |
|
2617 | $ hg --color=debug log --debug -T bisect -r 0:4 | |
2613 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
2618 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2614 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2619 | [log.bisect bisect.good|bisect: good (implicit)] | |
2615 | [log.phase|phase: public] |
|
2620 | [log.phase|phase: public] | |
2616 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2621 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2617 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2622 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2618 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] |
|
2623 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] | |
2619 | [log.user|user: User Name <user@hostname>] |
|
2624 | [log.user|user: User Name <user@hostname>] | |
2620 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2625 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2621 | [ui.debug log.files|files+: a] |
|
2626 | [ui.debug log.files|files+: a] | |
2622 | [ui.debug log.extra|extra: branch=default] |
|
2627 | [ui.debug log.extra|extra: branch=default] | |
2623 | [ui.note log.description|description:] |
|
2628 | [ui.note log.description|description:] | |
2624 | [ui.note log.description|line 1 |
|
2629 | [ui.note log.description|line 1 | |
2625 | line 2] |
|
2630 | line 2] | |
2626 |
|
2631 | |||
2627 |
|
2632 | |||
2628 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
2633 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2629 | [log.bisect bisect.good|bisect: good] |
|
2634 | [log.bisect bisect.good|bisect: good] | |
2630 | [log.phase|phase: public] |
|
2635 | [log.phase|phase: public] | |
2631 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
2636 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2632 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2637 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2633 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] |
|
2638 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] | |
2634 | [log.user|user: A. N. Other <other@place>] |
|
2639 | [log.user|user: A. N. Other <other@place>] | |
2635 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2640 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2636 | [ui.debug log.files|files+: b] |
|
2641 | [ui.debug log.files|files+: b] | |
2637 | [ui.debug log.extra|extra: branch=default] |
|
2642 | [ui.debug log.extra|extra: branch=default] | |
2638 | [ui.note log.description|description:] |
|
2643 | [ui.note log.description|description:] | |
2639 | [ui.note log.description|other 1 |
|
2644 | [ui.note log.description|other 1 | |
2640 | other 2 |
|
2645 | other 2 | |
2641 |
|
2646 | |||
2642 | other 3] |
|
2647 | other 3] | |
2643 |
|
2648 | |||
2644 |
|
2649 | |||
2645 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
2650 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2646 | [log.bisect bisect.untested|bisect: untested] |
|
2651 | [log.bisect bisect.untested|bisect: untested] | |
2647 | [log.phase|phase: public] |
|
2652 | [log.phase|phase: public] | |
2648 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
2653 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2649 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2654 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2650 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] |
|
2655 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] | |
2651 | [log.user|user: other@place] |
|
2656 | [log.user|user: other@place] | |
2652 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2657 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2653 | [ui.debug log.files|files+: c] |
|
2658 | [ui.debug log.files|files+: c] | |
2654 | [ui.debug log.extra|extra: branch=default] |
|
2659 | [ui.debug log.extra|extra: branch=default] | |
2655 | [ui.note log.description|description:] |
|
2660 | [ui.note log.description|description:] | |
2656 | [ui.note log.description|no person] |
|
2661 | [ui.note log.description|no person] | |
2657 |
|
2662 | |||
2658 |
|
2663 | |||
2659 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
2664 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2660 | [log.bisect bisect.bad|bisect: bad] |
|
2665 | [log.bisect bisect.bad|bisect: bad] | |
2661 | [log.phase|phase: public] |
|
2666 | [log.phase|phase: public] | |
2662 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
2667 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2663 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2668 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2664 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
2669 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2665 | [log.user|user: person] |
|
2670 | [log.user|user: person] | |
2666 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2671 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2667 | [ui.debug log.files|files: c] |
|
2672 | [ui.debug log.files|files: c] | |
2668 | [ui.debug log.extra|extra: branch=default] |
|
2673 | [ui.debug log.extra|extra: branch=default] | |
2669 | [ui.note log.description|description:] |
|
2674 | [ui.note log.description|description:] | |
2670 | [ui.note log.description|no user, no domain] |
|
2675 | [ui.note log.description|no user, no domain] | |
2671 |
|
2676 | |||
2672 |
|
2677 | |||
2673 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] |
|
2678 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] | |
2674 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2679 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2675 | [log.branch|branch: foo] |
|
2680 | [log.branch|branch: foo] | |
2676 | [log.phase|phase: draft] |
|
2681 | [log.phase|phase: draft] | |
2677 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
2682 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2678 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2683 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2679 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
2684 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2680 | [log.user|user: person] |
|
2685 | [log.user|user: person] | |
2681 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2686 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2682 | [ui.debug log.extra|extra: branch=foo] |
|
2687 | [ui.debug log.extra|extra: branch=foo] | |
2683 | [ui.note log.description|description:] |
|
2688 | [ui.note log.description|description:] | |
2684 | [ui.note log.description|new branch] |
|
2689 | [ui.note log.description|new branch] | |
2685 |
|
2690 | |||
2686 |
|
2691 | |||
2687 | $ hg --color=debug log -v -T bisect -r 0:4 |
|
2692 | $ hg --color=debug log -v -T bisect -r 0:4 | |
2688 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
2693 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2689 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2694 | [log.bisect bisect.good|bisect: good (implicit)] | |
2690 | [log.user|user: User Name <user@hostname>] |
|
2695 | [log.user|user: User Name <user@hostname>] | |
2691 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2696 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2692 | [ui.note log.files|files: a] |
|
2697 | [ui.note log.files|files: a] | |
2693 | [ui.note log.description|description:] |
|
2698 | [ui.note log.description|description:] | |
2694 | [ui.note log.description|line 1 |
|
2699 | [ui.note log.description|line 1 | |
2695 | line 2] |
|
2700 | line 2] | |
2696 |
|
2701 | |||
2697 |
|
2702 | |||
2698 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
2703 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2699 | [log.bisect bisect.good|bisect: good] |
|
2704 | [log.bisect bisect.good|bisect: good] | |
2700 | [log.user|user: A. N. Other <other@place>] |
|
2705 | [log.user|user: A. N. Other <other@place>] | |
2701 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2706 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2702 | [ui.note log.files|files: b] |
|
2707 | [ui.note log.files|files: b] | |
2703 | [ui.note log.description|description:] |
|
2708 | [ui.note log.description|description:] | |
2704 | [ui.note log.description|other 1 |
|
2709 | [ui.note log.description|other 1 | |
2705 | other 2 |
|
2710 | other 2 | |
2706 |
|
2711 | |||
2707 | other 3] |
|
2712 | other 3] | |
2708 |
|
2713 | |||
2709 |
|
2714 | |||
2710 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
2715 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2711 | [log.bisect bisect.untested|bisect: untested] |
|
2716 | [log.bisect bisect.untested|bisect: untested] | |
2712 | [log.user|user: other@place] |
|
2717 | [log.user|user: other@place] | |
2713 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2718 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2714 | [ui.note log.files|files: c] |
|
2719 | [ui.note log.files|files: c] | |
2715 | [ui.note log.description|description:] |
|
2720 | [ui.note log.description|description:] | |
2716 | [ui.note log.description|no person] |
|
2721 | [ui.note log.description|no person] | |
2717 |
|
2722 | |||
2718 |
|
2723 | |||
2719 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
2724 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2720 | [log.bisect bisect.bad|bisect: bad] |
|
2725 | [log.bisect bisect.bad|bisect: bad] | |
2721 | [log.user|user: person] |
|
2726 | [log.user|user: person] | |
2722 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2727 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2723 | [ui.note log.files|files: c] |
|
2728 | [ui.note log.files|files: c] | |
2724 | [ui.note log.description|description:] |
|
2729 | [ui.note log.description|description:] | |
2725 | [ui.note log.description|no user, no domain] |
|
2730 | [ui.note log.description|no user, no domain] | |
2726 |
|
2731 | |||
2727 |
|
2732 | |||
2728 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
2733 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2729 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2734 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2730 | [log.branch|branch: foo] |
|
2735 | [log.branch|branch: foo] | |
2731 | [log.user|user: person] |
|
2736 | [log.user|user: person] | |
2732 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2737 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2733 | [ui.note log.description|description:] |
|
2738 | [ui.note log.description|description:] | |
2734 | [ui.note log.description|new branch] |
|
2739 | [ui.note log.description|new branch] | |
2735 |
|
2740 | |||
2736 |
|
2741 | |||
2737 | $ hg bisect --reset |
|
2742 | $ hg bisect --reset | |
2738 |
|
2743 | |||
2739 | Error on syntax: |
|
2744 | Error on syntax: | |
2740 |
|
2745 | |||
2741 | $ echo 'x = "f' >> t |
|
2746 | $ echo 'x = "f' >> t | |
2742 | $ hg log |
|
2747 | $ hg log | |
2743 | hg: parse error at t:3: unmatched quotes |
|
2748 | hg: parse error at t:3: unmatched quotes | |
2744 | [255] |
|
2749 | [255] | |
2745 |
|
2750 | |||
2746 | $ hg log -T '{date' |
|
2751 | $ hg log -T '{date' | |
2747 | hg: parse error at 1: unterminated template expansion |
|
2752 | hg: parse error at 1: unterminated template expansion | |
2748 | [255] |
|
2753 | [255] | |
2749 |
|
2754 | |||
2750 | Behind the scenes, this will throw TypeError |
|
2755 | Behind the scenes, this will throw TypeError | |
2751 |
|
2756 | |||
2752 | $ hg log -l 3 --template '{date|obfuscate}\n' |
|
2757 | $ hg log -l 3 --template '{date|obfuscate}\n' | |
2753 | abort: template filter 'obfuscate' is not compatible with keyword 'date' |
|
2758 | abort: template filter 'obfuscate' is not compatible with keyword 'date' | |
2754 | [255] |
|
2759 | [255] | |
2755 |
|
2760 | |||
2756 | Behind the scenes, this will throw a ValueError |
|
2761 | Behind the scenes, this will throw a ValueError | |
2757 |
|
2762 | |||
2758 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' |
|
2763 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' | |
2759 | abort: template filter 'shortdate' is not compatible with keyword 'desc' |
|
2764 | abort: template filter 'shortdate' is not compatible with keyword 'desc' | |
2760 | [255] |
|
2765 | [255] | |
2761 |
|
2766 | |||
2762 | Behind the scenes, this will throw AttributeError |
|
2767 | Behind the scenes, this will throw AttributeError | |
2763 |
|
2768 | |||
2764 | $ hg log -l 3 --template 'line: {date|escape}\n' |
|
2769 | $ hg log -l 3 --template 'line: {date|escape}\n' | |
2765 | abort: template filter 'escape' is not compatible with keyword 'date' |
|
2770 | abort: template filter 'escape' is not compatible with keyword 'date' | |
2766 | [255] |
|
2771 | [255] | |
2767 |
|
2772 | |||
2768 | $ hg log -l 3 --template 'line: {extras|localdate}\n' |
|
2773 | $ hg log -l 3 --template 'line: {extras|localdate}\n' | |
2769 | hg: parse error: localdate expects a date information |
|
2774 | hg: parse error: localdate expects a date information | |
2770 | [255] |
|
2775 | [255] | |
2771 |
|
2776 | |||
2772 | Behind the scenes, this will throw ValueError |
|
2777 | Behind the scenes, this will throw ValueError | |
2773 |
|
2778 | |||
2774 | $ hg tip --template '{author|email|date}\n' |
|
2779 | $ hg tip --template '{author|email|date}\n' | |
2775 | hg: parse error: date expects a date information |
|
2780 | hg: parse error: date expects a date information | |
2776 | [255] |
|
2781 | [255] | |
2777 |
|
2782 | |||
2778 | $ hg tip -T '{author|email|shortdate}\n' |
|
2783 | $ hg tip -T '{author|email|shortdate}\n' | |
2779 | abort: template filter 'shortdate' is not compatible with keyword 'author' |
|
2784 | abort: template filter 'shortdate' is not compatible with keyword 'author' | |
2780 | [255] |
|
2785 | [255] | |
2781 |
|
2786 | |||
2782 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' |
|
2787 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' | |
2783 | abort: incompatible use of template filter 'shortdate' |
|
2788 | abort: incompatible use of template filter 'shortdate' | |
2784 | [255] |
|
2789 | [255] | |
2785 |
|
2790 | |||
2786 | Error in nested template: |
|
2791 | Error in nested template: | |
2787 |
|
2792 | |||
2788 | $ hg log -T '{"date' |
|
2793 | $ hg log -T '{"date' | |
2789 | hg: parse error at 2: unterminated string |
|
2794 | hg: parse error at 2: unterminated string | |
2790 | [255] |
|
2795 | [255] | |
2791 |
|
2796 | |||
2792 | $ hg log -T '{"foo{date|?}"}' |
|
2797 | $ hg log -T '{"foo{date|?}"}' | |
2793 | hg: parse error at 11: syntax error |
|
2798 | hg: parse error at 11: syntax error | |
2794 | [255] |
|
2799 | [255] | |
2795 |
|
2800 | |||
2796 | Thrown an error if a template function doesn't exist |
|
2801 | Thrown an error if a template function doesn't exist | |
2797 |
|
2802 | |||
2798 | $ hg tip --template '{foo()}\n' |
|
2803 | $ hg tip --template '{foo()}\n' | |
2799 | hg: parse error: unknown function 'foo' |
|
2804 | hg: parse error: unknown function 'foo' | |
2800 | [255] |
|
2805 | [255] | |
2801 |
|
2806 | |||
2802 | Pass generator object created by template function to filter |
|
2807 | Pass generator object created by template function to filter | |
2803 |
|
2808 | |||
2804 | $ hg log -l 1 --template '{if(author, author)|user}\n' |
|
2809 | $ hg log -l 1 --template '{if(author, author)|user}\n' | |
2805 | test |
|
2810 | test | |
2806 |
|
2811 | |||
2807 | Test index keyword: |
|
2812 | Test index keyword: | |
2808 |
|
2813 | |||
2809 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' |
|
2814 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' | |
2810 | 10 0:a 1:b 2:fifth 3:fourth 4:third |
|
2815 | 10 0:a 1:b 2:fifth 3:fourth 4:third | |
2811 | 11 0:a |
|
2816 | 11 0:a | |
2812 |
|
2817 | |||
2813 | $ hg branches -T '{index} {branch}\n' |
|
2818 | $ hg branches -T '{index} {branch}\n' | |
2814 | 0 default |
|
2819 | 0 default | |
2815 | 1 foo |
|
2820 | 1 foo | |
2816 |
|
2821 | |||
2817 | Test diff function: |
|
2822 | Test diff function: | |
2818 |
|
2823 | |||
2819 | $ hg diff -c 8 |
|
2824 | $ hg diff -c 8 | |
2820 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2825 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2821 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2826 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2822 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2827 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2823 | @@ -0,0 +1,1 @@ |
|
2828 | @@ -0,0 +1,1 @@ | |
2824 | +second |
|
2829 | +second | |
2825 | diff -r 29114dbae42b -r 95c24699272e second |
|
2830 | diff -r 29114dbae42b -r 95c24699272e second | |
2826 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2831 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2827 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2832 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2828 | @@ -1,1 +0,0 @@ |
|
2833 | @@ -1,1 +0,0 @@ | |
2829 | -second |
|
2834 | -second | |
2830 | diff -r 29114dbae42b -r 95c24699272e third |
|
2835 | diff -r 29114dbae42b -r 95c24699272e third | |
2831 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2836 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2832 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2837 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2833 | @@ -0,0 +1,1 @@ |
|
2838 | @@ -0,0 +1,1 @@ | |
2834 | +third |
|
2839 | +third | |
2835 |
|
2840 | |||
2836 | $ hg log -r 8 -T "{diff()}" |
|
2841 | $ hg log -r 8 -T "{diff()}" | |
2837 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2842 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2838 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2843 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2839 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2844 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2840 | @@ -0,0 +1,1 @@ |
|
2845 | @@ -0,0 +1,1 @@ | |
2841 | +second |
|
2846 | +second | |
2842 | diff -r 29114dbae42b -r 95c24699272e second |
|
2847 | diff -r 29114dbae42b -r 95c24699272e second | |
2843 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2848 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2844 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2849 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2845 | @@ -1,1 +0,0 @@ |
|
2850 | @@ -1,1 +0,0 @@ | |
2846 | -second |
|
2851 | -second | |
2847 | diff -r 29114dbae42b -r 95c24699272e third |
|
2852 | diff -r 29114dbae42b -r 95c24699272e third | |
2848 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2853 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2849 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2854 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2850 | @@ -0,0 +1,1 @@ |
|
2855 | @@ -0,0 +1,1 @@ | |
2851 | +third |
|
2856 | +third | |
2852 |
|
2857 | |||
2853 | $ hg log -r 8 -T "{diff('glob:f*')}" |
|
2858 | $ hg log -r 8 -T "{diff('glob:f*')}" | |
2854 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2859 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2855 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2860 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2856 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2861 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2857 | @@ -0,0 +1,1 @@ |
|
2862 | @@ -0,0 +1,1 @@ | |
2858 | +second |
|
2863 | +second | |
2859 |
|
2864 | |||
2860 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" |
|
2865 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" | |
2861 | diff -r 29114dbae42b -r 95c24699272e second |
|
2866 | diff -r 29114dbae42b -r 95c24699272e second | |
2862 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2867 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2863 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2868 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2864 | @@ -1,1 +0,0 @@ |
|
2869 | @@ -1,1 +0,0 @@ | |
2865 | -second |
|
2870 | -second | |
2866 | diff -r 29114dbae42b -r 95c24699272e third |
|
2871 | diff -r 29114dbae42b -r 95c24699272e third | |
2867 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2872 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2868 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2873 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2869 | @@ -0,0 +1,1 @@ |
|
2874 | @@ -0,0 +1,1 @@ | |
2870 | +third |
|
2875 | +third | |
2871 |
|
2876 | |||
2872 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" |
|
2877 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" | |
2873 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2878 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2874 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2879 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2875 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2880 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2876 | @@ -0,0 +1,1 @@ |
|
2881 | @@ -0,0 +1,1 @@ | |
2877 | +second |
|
2882 | +second | |
2878 |
|
2883 | |||
2879 | $ cd .. |
|
2884 | $ cd .. | |
2880 |
|
2885 | |||
2881 |
|
2886 | |||
2882 | latesttag: |
|
2887 | latesttag: | |
2883 |
|
2888 | |||
2884 | $ hg init latesttag |
|
2889 | $ hg init latesttag | |
2885 | $ cd latesttag |
|
2890 | $ cd latesttag | |
2886 |
|
2891 | |||
2887 | $ echo a > file |
|
2892 | $ echo a > file | |
2888 | $ hg ci -Am a -d '0 0' |
|
2893 | $ hg ci -Am a -d '0 0' | |
2889 | adding file |
|
2894 | adding file | |
2890 |
|
2895 | |||
2891 | $ echo b >> file |
|
2896 | $ echo b >> file | |
2892 | $ hg ci -m b -d '1 0' |
|
2897 | $ hg ci -m b -d '1 0' | |
2893 |
|
2898 | |||
2894 | $ echo c >> head1 |
|
2899 | $ echo c >> head1 | |
2895 | $ hg ci -Am h1c -d '2 0' |
|
2900 | $ hg ci -Am h1c -d '2 0' | |
2896 | adding head1 |
|
2901 | adding head1 | |
2897 |
|
2902 | |||
2898 | $ hg update -q 1 |
|
2903 | $ hg update -q 1 | |
2899 | $ echo d >> head2 |
|
2904 | $ echo d >> head2 | |
2900 | $ hg ci -Am h2d -d '3 0' |
|
2905 | $ hg ci -Am h2d -d '3 0' | |
2901 | adding head2 |
|
2906 | adding head2 | |
2902 | created new head |
|
2907 | created new head | |
2903 |
|
2908 | |||
2904 | $ echo e >> head2 |
|
2909 | $ echo e >> head2 | |
2905 | $ hg ci -m h2e -d '4 0' |
|
2910 | $ hg ci -m h2e -d '4 0' | |
2906 |
|
2911 | |||
2907 | $ hg merge -q |
|
2912 | $ hg merge -q | |
2908 | $ hg ci -m merge -d '5 -3600' |
|
2913 | $ hg ci -m merge -d '5 -3600' | |
2909 |
|
2914 | |||
2910 | No tag set: |
|
2915 | No tag set: | |
2911 |
|
2916 | |||
2912 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2917 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2913 | @ 5: null+5 |
|
2918 | @ 5: null+5 | |
2914 | |\ |
|
2919 | |\ | |
2915 | | o 4: null+4 |
|
2920 | | o 4: null+4 | |
2916 | | | |
|
2921 | | | | |
2917 | | o 3: null+3 |
|
2922 | | o 3: null+3 | |
2918 | | | |
|
2923 | | | | |
2919 | o | 2: null+3 |
|
2924 | o | 2: null+3 | |
2920 | |/ |
|
2925 | |/ | |
2921 | o 1: null+2 |
|
2926 | o 1: null+2 | |
2922 | | |
|
2927 | | | |
2923 | o 0: null+1 |
|
2928 | o 0: null+1 | |
2924 |
|
2929 | |||
2925 |
|
2930 | |||
2926 | One common tag: longest path wins for {latesttagdistance}: |
|
2931 | One common tag: longest path wins for {latesttagdistance}: | |
2927 |
|
2932 | |||
2928 | $ hg tag -r 1 -m t1 -d '6 0' t1 |
|
2933 | $ hg tag -r 1 -m t1 -d '6 0' t1 | |
2929 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2934 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2930 | @ 6: t1+4 |
|
2935 | @ 6: t1+4 | |
2931 | | |
|
2936 | | | |
2932 | o 5: t1+3 |
|
2937 | o 5: t1+3 | |
2933 | |\ |
|
2938 | |\ | |
2934 | | o 4: t1+2 |
|
2939 | | o 4: t1+2 | |
2935 | | | |
|
2940 | | | | |
2936 | | o 3: t1+1 |
|
2941 | | o 3: t1+1 | |
2937 | | | |
|
2942 | | | | |
2938 | o | 2: t1+1 |
|
2943 | o | 2: t1+1 | |
2939 | |/ |
|
2944 | |/ | |
2940 | o 1: t1+0 |
|
2945 | o 1: t1+0 | |
2941 | | |
|
2946 | | | |
2942 | o 0: null+1 |
|
2947 | o 0: null+1 | |
2943 |
|
2948 | |||
2944 |
|
2949 | |||
2945 | One ancestor tag: closest wins: |
|
2950 | One ancestor tag: closest wins: | |
2946 |
|
2951 | |||
2947 | $ hg tag -r 2 -m t2 -d '7 0' t2 |
|
2952 | $ hg tag -r 2 -m t2 -d '7 0' t2 | |
2948 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2953 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2949 | @ 7: t2+3 |
|
2954 | @ 7: t2+3 | |
2950 | | |
|
2955 | | | |
2951 | o 6: t2+2 |
|
2956 | o 6: t2+2 | |
2952 | | |
|
2957 | | | |
2953 | o 5: t2+1 |
|
2958 | o 5: t2+1 | |
2954 | |\ |
|
2959 | |\ | |
2955 | | o 4: t1+2 |
|
2960 | | o 4: t1+2 | |
2956 | | | |
|
2961 | | | | |
2957 | | o 3: t1+1 |
|
2962 | | o 3: t1+1 | |
2958 | | | |
|
2963 | | | | |
2959 | o | 2: t2+0 |
|
2964 | o | 2: t2+0 | |
2960 | |/ |
|
2965 | |/ | |
2961 | o 1: t1+0 |
|
2966 | o 1: t1+0 | |
2962 | | |
|
2967 | | | |
2963 | o 0: null+1 |
|
2968 | o 0: null+1 | |
2964 |
|
2969 | |||
2965 |
|
2970 | |||
2966 | Two branch tags: more recent wins if same number of changes: |
|
2971 | Two branch tags: more recent wins if same number of changes: | |
2967 |
|
2972 | |||
2968 | $ hg tag -r 3 -m t3 -d '8 0' t3 |
|
2973 | $ hg tag -r 3 -m t3 -d '8 0' t3 | |
2969 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2974 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2970 | @ 8: t3+5 |
|
2975 | @ 8: t3+5 | |
2971 | | |
|
2976 | | | |
2972 | o 7: t3+4 |
|
2977 | o 7: t3+4 | |
2973 | | |
|
2978 | | | |
2974 | o 6: t3+3 |
|
2979 | o 6: t3+3 | |
2975 | | |
|
2980 | | | |
2976 | o 5: t3+2 |
|
2981 | o 5: t3+2 | |
2977 | |\ |
|
2982 | |\ | |
2978 | | o 4: t3+1 |
|
2983 | | o 4: t3+1 | |
2979 | | | |
|
2984 | | | | |
2980 | | o 3: t3+0 |
|
2985 | | o 3: t3+0 | |
2981 | | | |
|
2986 | | | | |
2982 | o | 2: t2+0 |
|
2987 | o | 2: t2+0 | |
2983 | |/ |
|
2988 | |/ | |
2984 | o 1: t1+0 |
|
2989 | o 1: t1+0 | |
2985 | | |
|
2990 | | | |
2986 | o 0: null+1 |
|
2991 | o 0: null+1 | |
2987 |
|
2992 | |||
2988 |
|
2993 | |||
2989 | Two branch tags: fewest changes wins: |
|
2994 | Two branch tags: fewest changes wins: | |
2990 |
|
2995 | |||
2991 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter |
|
2996 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter | |
2992 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
2997 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |
2993 | @ 9: t4+5,6 |
|
2998 | @ 9: t4+5,6 | |
2994 | | |
|
2999 | | | |
2995 | o 8: t4+4,5 |
|
3000 | o 8: t4+4,5 | |
2996 | | |
|
3001 | | | |
2997 | o 7: t4+3,4 |
|
3002 | o 7: t4+3,4 | |
2998 | | |
|
3003 | | | |
2999 | o 6: t4+2,3 |
|
3004 | o 6: t4+2,3 | |
3000 | | |
|
3005 | | | |
3001 | o 5: t4+1,2 |
|
3006 | o 5: t4+1,2 | |
3002 | |\ |
|
3007 | |\ | |
3003 | | o 4: t4+0,0 |
|
3008 | | o 4: t4+0,0 | |
3004 | | | |
|
3009 | | | | |
3005 | | o 3: t3+0,0 |
|
3010 | | o 3: t3+0,0 | |
3006 | | | |
|
3011 | | | | |
3007 | o | 2: t2+0,0 |
|
3012 | o | 2: t2+0,0 | |
3008 | |/ |
|
3013 | |/ | |
3009 | o 1: t1+0,0 |
|
3014 | o 1: t1+0,0 | |
3010 | | |
|
3015 | | | |
3011 | o 0: null+1,1 |
|
3016 | o 0: null+1,1 | |
3012 |
|
3017 | |||
3013 |
|
3018 | |||
3014 | Merged tag overrides: |
|
3019 | Merged tag overrides: | |
3015 |
|
3020 | |||
3016 | $ hg tag -r 5 -m t5 -d '9 0' t5 |
|
3021 | $ hg tag -r 5 -m t5 -d '9 0' t5 | |
3017 | $ hg tag -r 3 -m at3 -d '10 0' at3 |
|
3022 | $ hg tag -r 3 -m at3 -d '10 0' at3 | |
3018 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
3023 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
3019 | @ 11: t5+6 |
|
3024 | @ 11: t5+6 | |
3020 | | |
|
3025 | | | |
3021 | o 10: t5+5 |
|
3026 | o 10: t5+5 | |
3022 | | |
|
3027 | | | |
3023 | o 9: t5+4 |
|
3028 | o 9: t5+4 | |
3024 | | |
|
3029 | | | |
3025 | o 8: t5+3 |
|
3030 | o 8: t5+3 | |
3026 | | |
|
3031 | | | |
3027 | o 7: t5+2 |
|
3032 | o 7: t5+2 | |
3028 | | |
|
3033 | | | |
3029 | o 6: t5+1 |
|
3034 | o 6: t5+1 | |
3030 | | |
|
3035 | | | |
3031 | o 5: t5+0 |
|
3036 | o 5: t5+0 | |
3032 | |\ |
|
3037 | |\ | |
3033 | | o 4: t4+0 |
|
3038 | | o 4: t4+0 | |
3034 | | | |
|
3039 | | | | |
3035 | | o 3: at3:t3+0 |
|
3040 | | o 3: at3:t3+0 | |
3036 | | | |
|
3041 | | | | |
3037 | o | 2: t2+0 |
|
3042 | o | 2: t2+0 | |
3038 | |/ |
|
3043 | |/ | |
3039 | o 1: t1+0 |
|
3044 | o 1: t1+0 | |
3040 | | |
|
3045 | | | |
3041 | o 0: null+1 |
|
3046 | o 0: null+1 | |
3042 |
|
3047 | |||
3043 |
|
3048 | |||
3044 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
3049 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |
3045 | @ 11: t5+6,6 |
|
3050 | @ 11: t5+6,6 | |
3046 | | |
|
3051 | | | |
3047 | o 10: t5+5,5 |
|
3052 | o 10: t5+5,5 | |
3048 | | |
|
3053 | | | |
3049 | o 9: t5+4,4 |
|
3054 | o 9: t5+4,4 | |
3050 | | |
|
3055 | | | |
3051 | o 8: t5+3,3 |
|
3056 | o 8: t5+3,3 | |
3052 | | |
|
3057 | | | |
3053 | o 7: t5+2,2 |
|
3058 | o 7: t5+2,2 | |
3054 | | |
|
3059 | | | |
3055 | o 6: t5+1,1 |
|
3060 | o 6: t5+1,1 | |
3056 | | |
|
3061 | | | |
3057 | o 5: t5+0,0 |
|
3062 | o 5: t5+0,0 | |
3058 | |\ |
|
3063 | |\ | |
3059 | | o 4: t4+0,0 |
|
3064 | | o 4: t4+0,0 | |
3060 | | | |
|
3065 | | | | |
3061 | | o 3: at3+0,0 t3+0,0 |
|
3066 | | o 3: at3+0,0 t3+0,0 | |
3062 | | | |
|
3067 | | | | |
3063 | o | 2: t2+0,0 |
|
3068 | o | 2: t2+0,0 | |
3064 | |/ |
|
3069 | |/ | |
3065 | o 1: t1+0,0 |
|
3070 | o 1: t1+0,0 | |
3066 | | |
|
3071 | | | |
3067 | o 0: null+1,1 |
|
3072 | o 0: null+1,1 | |
3068 |
|
3073 | |||
3069 |
|
3074 | |||
3070 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" |
|
3075 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" | |
3071 | @ 11: t3, C: 9, D: 8 |
|
3076 | @ 11: t3, C: 9, D: 8 | |
3072 | | |
|
3077 | | | |
3073 | o 10: t3, C: 8, D: 7 |
|
3078 | o 10: t3, C: 8, D: 7 | |
3074 | | |
|
3079 | | | |
3075 | o 9: t3, C: 7, D: 6 |
|
3080 | o 9: t3, C: 7, D: 6 | |
3076 | | |
|
3081 | | | |
3077 | o 8: t3, C: 6, D: 5 |
|
3082 | o 8: t3, C: 6, D: 5 | |
3078 | | |
|
3083 | | | |
3079 | o 7: t3, C: 5, D: 4 |
|
3084 | o 7: t3, C: 5, D: 4 | |
3080 | | |
|
3085 | | | |
3081 | o 6: t3, C: 4, D: 3 |
|
3086 | o 6: t3, C: 4, D: 3 | |
3082 | | |
|
3087 | | | |
3083 | o 5: t3, C: 3, D: 2 |
|
3088 | o 5: t3, C: 3, D: 2 | |
3084 | |\ |
|
3089 | |\ | |
3085 | | o 4: t3, C: 1, D: 1 |
|
3090 | | o 4: t3, C: 1, D: 1 | |
3086 | | | |
|
3091 | | | | |
3087 | | o 3: t3, C: 0, D: 0 |
|
3092 | | o 3: t3, C: 0, D: 0 | |
3088 | | | |
|
3093 | | | | |
3089 | o | 2: t1, C: 1, D: 1 |
|
3094 | o | 2: t1, C: 1, D: 1 | |
3090 | |/ |
|
3095 | |/ | |
3091 | o 1: t1, C: 0, D: 0 |
|
3096 | o 1: t1, C: 0, D: 0 | |
3092 | | |
|
3097 | | | |
3093 | o 0: null, C: 1, D: 1 |
|
3098 | o 0: null, C: 1, D: 1 | |
3094 |
|
3099 | |||
3095 |
|
3100 | |||
3096 | $ cd .. |
|
3101 | $ cd .. | |
3097 |
|
3102 | |||
3098 |
|
3103 | |||
3099 | Style path expansion: issue1948 - ui.style option doesn't work on OSX |
|
3104 | Style path expansion: issue1948 - ui.style option doesn't work on OSX | |
3100 | if it is a relative path |
|
3105 | if it is a relative path | |
3101 |
|
3106 | |||
3102 | $ mkdir -p home/styles |
|
3107 | $ mkdir -p home/styles | |
3103 |
|
3108 | |||
3104 | $ cat > home/styles/teststyle <<EOF |
|
3109 | $ cat > home/styles/teststyle <<EOF | |
3105 | > changeset = 'test {rev}:{node|short}\n' |
|
3110 | > changeset = 'test {rev}:{node|short}\n' | |
3106 | > EOF |
|
3111 | > EOF | |
3107 |
|
3112 | |||
3108 | $ HOME=`pwd`/home; export HOME |
|
3113 | $ HOME=`pwd`/home; export HOME | |
3109 |
|
3114 | |||
3110 | $ cat > latesttag/.hg/hgrc <<EOF |
|
3115 | $ cat > latesttag/.hg/hgrc <<EOF | |
3111 | > [ui] |
|
3116 | > [ui] | |
3112 | > style = ~/styles/teststyle |
|
3117 | > style = ~/styles/teststyle | |
3113 | > EOF |
|
3118 | > EOF | |
3114 |
|
3119 | |||
3115 | $ hg -R latesttag tip |
|
3120 | $ hg -R latesttag tip | |
3116 | test 11:97e5943b523a |
|
3121 | test 11:97e5943b523a | |
3117 |
|
3122 | |||
3118 | Test recursive showlist template (issue1989): |
|
3123 | Test recursive showlist template (issue1989): | |
3119 |
|
3124 | |||
3120 | $ cat > style1989 <<EOF |
|
3125 | $ cat > style1989 <<EOF | |
3121 | > changeset = '{file_mods}{manifest}{extras}' |
|
3126 | > changeset = '{file_mods}{manifest}{extras}' | |
3122 | > file_mod = 'M|{author|person}\n' |
|
3127 | > file_mod = 'M|{author|person}\n' | |
3123 | > manifest = '{rev},{author}\n' |
|
3128 | > manifest = '{rev},{author}\n' | |
3124 | > extra = '{key}: {author}\n' |
|
3129 | > extra = '{key}: {author}\n' | |
3125 | > EOF |
|
3130 | > EOF | |
3126 |
|
3131 | |||
3127 | $ hg -R latesttag log -r tip --style=style1989 |
|
3132 | $ hg -R latesttag log -r tip --style=style1989 | |
3128 | M|test |
|
3133 | M|test | |
3129 | 11,test |
|
3134 | 11,test | |
3130 | branch: test |
|
3135 | branch: test | |
3131 |
|
3136 | |||
3132 | Test new-style inline templating: |
|
3137 | Test new-style inline templating: | |
3133 |
|
3138 | |||
3134 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
|
3139 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' | |
3135 | modified files: .hgtags |
|
3140 | modified files: .hgtags | |
3136 |
|
3141 | |||
3137 |
|
3142 | |||
3138 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' |
|
3143 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' | |
3139 | hg: parse error: keyword 'rev' is not iterable |
|
3144 | hg: parse error: keyword 'rev' is not iterable | |
3140 | [255] |
|
3145 | [255] | |
3141 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' |
|
3146 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' | |
3142 | hg: parse error: None is not iterable |
|
3147 | hg: parse error: None is not iterable | |
3143 | [255] |
|
3148 | [255] | |
3144 |
|
3149 | |||
3145 | Test new-style inline templating of non-list/dict type: |
|
3150 | Test new-style inline templating of non-list/dict type: | |
3146 |
|
3151 | |||
3147 | $ hg log -R latesttag -r tip -T '{manifest}\n' |
|
3152 | $ hg log -R latesttag -r tip -T '{manifest}\n' | |
3148 | 11:2bc6e9006ce2 |
|
3153 | 11:2bc6e9006ce2 | |
3149 | $ hg log -R latesttag -r tip -T 'string length: {manifest|count}\n' |
|
3154 | $ hg log -R latesttag -r tip -T 'string length: {manifest|count}\n' | |
3150 | string length: 15 |
|
3155 | string length: 15 | |
3151 | $ hg log -R latesttag -r tip -T '{manifest % "{rev}:{node}"}\n' |
|
3156 | $ hg log -R latesttag -r tip -T '{manifest % "{rev}:{node}"}\n' | |
3152 | 11:2bc6e9006ce29882383a22d39fd1f4e66dd3e2fc |
|
3157 | 11:2bc6e9006ce29882383a22d39fd1f4e66dd3e2fc | |
3153 |
|
3158 | |||
3154 | $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}' |
|
3159 | $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}' | |
3155 | branch: default |
|
3160 | branch: default | |
3156 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' |
|
3161 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' | |
3157 | hg: parse error: None is not iterable |
|
3162 | hg: parse error: None is not iterable | |
3158 | [255] |
|
3163 | [255] | |
3159 | $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' |
|
3164 | $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' | |
3160 | branch: default |
|
3165 | branch: default | |
3161 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}' |
|
3166 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}' | |
3162 | 0:ce3cec86e6c2 |
|
3167 | 0:ce3cec86e6c2 | |
3163 | $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}' |
|
3168 | $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}' | |
3164 | 9:fbc7cd862e9c |
|
3169 | 9:fbc7cd862e9c | |
3165 |
|
3170 | |||
3166 | Test manifest/get() can be join()-ed as before, though it's silly: |
|
3171 | Test manifest/get() can be join()-ed as before, though it's silly: | |
3167 |
|
3172 | |||
3168 | $ hg log -R latesttag -r tip -T '{join(manifest, "")}\n' |
|
3173 | $ hg log -R latesttag -r tip -T '{join(manifest, "")}\n' | |
3169 | 11:2bc6e9006ce2 |
|
3174 | 11:2bc6e9006ce2 | |
3170 | $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), "")}\n' |
|
3175 | $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), "")}\n' | |
3171 | default |
|
3176 | default | |
3172 |
|
3177 | |||
3173 | Test min/max of integers |
|
3178 | Test min/max of integers | |
3174 |
|
3179 | |||
3175 | $ hg log -R latesttag -l1 -T '{min(revset("9:10"))}\n' |
|
3180 | $ hg log -R latesttag -l1 -T '{min(revset("9:10"))}\n' | |
3176 | 9 |
|
3181 | 9 | |
3177 | $ hg log -R latesttag -l1 -T '{max(revset("9:10"))}\n' |
|
3182 | $ hg log -R latesttag -l1 -T '{max(revset("9:10"))}\n' | |
3178 | 10 |
|
3183 | 10 | |
3179 |
|
3184 | |||
3180 | Test dot operator precedence: |
|
3185 | Test dot operator precedence: | |
3181 |
|
3186 | |||
3182 | $ hg debugtemplate -R latesttag -r0 -v '{manifest.node|short}\n' |
|
3187 | $ hg debugtemplate -R latesttag -r0 -v '{manifest.node|short}\n' | |
3183 | (template |
|
3188 | (template | |
3184 | (| |
|
3189 | (| | |
3185 | (. |
|
3190 | (. | |
3186 | (symbol 'manifest') |
|
3191 | (symbol 'manifest') | |
3187 | (symbol 'node')) |
|
3192 | (symbol 'node')) | |
3188 | (symbol 'short')) |
|
3193 | (symbol 'short')) | |
3189 | (string '\n')) |
|
3194 | (string '\n')) | |
3190 | 89f4071fec70 |
|
3195 | 89f4071fec70 | |
3191 |
|
3196 | |||
3192 | (the following examples are invalid, but seem natural in parsing POV) |
|
3197 | (the following examples are invalid, but seem natural in parsing POV) | |
3193 |
|
3198 | |||
3194 | $ hg debugtemplate -R latesttag -r0 -v '{foo|bar.baz}\n' 2> /dev/null |
|
3199 | $ hg debugtemplate -R latesttag -r0 -v '{foo|bar.baz}\n' 2> /dev/null | |
3195 | (template |
|
3200 | (template | |
3196 | (| |
|
3201 | (| | |
3197 | (symbol 'foo') |
|
3202 | (symbol 'foo') | |
3198 | (. |
|
3203 | (. | |
3199 | (symbol 'bar') |
|
3204 | (symbol 'bar') | |
3200 | (symbol 'baz'))) |
|
3205 | (symbol 'baz'))) | |
3201 | (string '\n')) |
|
3206 | (string '\n')) | |
3202 | [255] |
|
3207 | [255] | |
3203 | $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null |
|
3208 | $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null | |
3204 | (template |
|
3209 | (template | |
3205 | (. |
|
3210 | (. | |
3206 | (symbol 'foo') |
|
3211 | (symbol 'foo') | |
3207 | (func |
|
3212 | (func | |
3208 | (symbol 'bar') |
|
3213 | (symbol 'bar') | |
3209 | None)) |
|
3214 | None)) | |
3210 | (string '\n')) |
|
3215 | (string '\n')) | |
3211 | [255] |
|
3216 | [255] | |
3212 |
|
3217 | |||
3213 | Test evaluation of dot operator: |
|
3218 | Test evaluation of dot operator: | |
3214 |
|
3219 | |||
3215 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")).node}\n' |
|
3220 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")).node}\n' | |
3216 | ce3cec86e6c26bd9bdfc590a6b92abc9680f1796 |
|
3221 | ce3cec86e6c26bd9bdfc590a6b92abc9680f1796 | |
3217 | $ hg log -R latesttag -r0 -T '{extras.branch}\n' |
|
3222 | $ hg log -R latesttag -r0 -T '{extras.branch}\n' | |
3218 | default |
|
3223 | default | |
3219 |
|
3224 | |||
3220 | $ hg log -R latesttag -l1 -T '{author.invalid}\n' |
|
3225 | $ hg log -R latesttag -l1 -T '{author.invalid}\n' | |
3221 | hg: parse error: keyword 'author' has no member |
|
3226 | hg: parse error: keyword 'author' has no member | |
3222 | [255] |
|
3227 | [255] | |
3223 | $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n' |
|
3228 | $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n' | |
3224 | hg: parse error: 'a' has no member |
|
3229 | hg: parse error: 'a' has no member | |
3225 | [255] |
|
3230 | [255] | |
3226 |
|
3231 | |||
3227 | Test the sub function of templating for expansion: |
|
3232 | Test the sub function of templating for expansion: | |
3228 |
|
3233 | |||
3229 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' |
|
3234 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' | |
3230 | xx |
|
3235 | xx | |
3231 |
|
3236 | |||
3232 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' |
|
3237 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' | |
3233 | hg: parse error: sub got an invalid pattern: [ |
|
3238 | hg: parse error: sub got an invalid pattern: [ | |
3234 | [255] |
|
3239 | [255] | |
3235 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' |
|
3240 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' | |
3236 | hg: parse error: sub got an invalid replacement: \1 |
|
3241 | hg: parse error: sub got an invalid replacement: \1 | |
3237 | [255] |
|
3242 | [255] | |
3238 |
|
3243 | |||
3239 | Test the strip function with chars specified: |
|
3244 | Test the strip function with chars specified: | |
3240 |
|
3245 | |||
3241 | $ hg log -R latesttag --template '{desc}\n' |
|
3246 | $ hg log -R latesttag --template '{desc}\n' | |
3242 | at3 |
|
3247 | at3 | |
3243 | t5 |
|
3248 | t5 | |
3244 | t4 |
|
3249 | t4 | |
3245 | t3 |
|
3250 | t3 | |
3246 | t2 |
|
3251 | t2 | |
3247 | t1 |
|
3252 | t1 | |
3248 | merge |
|
3253 | merge | |
3249 | h2e |
|
3254 | h2e | |
3250 | h2d |
|
3255 | h2d | |
3251 | h1c |
|
3256 | h1c | |
3252 | b |
|
3257 | b | |
3253 | a |
|
3258 | a | |
3254 |
|
3259 | |||
3255 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' |
|
3260 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' | |
3256 | at3 |
|
3261 | at3 | |
3257 | 5 |
|
3262 | 5 | |
3258 | 4 |
|
3263 | 4 | |
3259 | 3 |
|
3264 | 3 | |
3260 | 2 |
|
3265 | 2 | |
3261 | 1 |
|
3266 | 1 | |
3262 | merg |
|
3267 | merg | |
3263 | h2 |
|
3268 | h2 | |
3264 | h2d |
|
3269 | h2d | |
3265 | h1c |
|
3270 | h1c | |
3266 | b |
|
3271 | b | |
3267 | a |
|
3272 | a | |
3268 |
|
3273 | |||
3269 | Test date format: |
|
3274 | Test date format: | |
3270 |
|
3275 | |||
3271 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' |
|
3276 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' | |
3272 | date: 70 01 01 10 +0000 |
|
3277 | date: 70 01 01 10 +0000 | |
3273 | date: 70 01 01 09 +0000 |
|
3278 | date: 70 01 01 09 +0000 | |
3274 | date: 70 01 01 04 +0000 |
|
3279 | date: 70 01 01 04 +0000 | |
3275 | date: 70 01 01 08 +0000 |
|
3280 | date: 70 01 01 08 +0000 | |
3276 | date: 70 01 01 07 +0000 |
|
3281 | date: 70 01 01 07 +0000 | |
3277 | date: 70 01 01 06 +0000 |
|
3282 | date: 70 01 01 06 +0000 | |
3278 | date: 70 01 01 05 +0100 |
|
3283 | date: 70 01 01 05 +0100 | |
3279 | date: 70 01 01 04 +0000 |
|
3284 | date: 70 01 01 04 +0000 | |
3280 | date: 70 01 01 03 +0000 |
|
3285 | date: 70 01 01 03 +0000 | |
3281 | date: 70 01 01 02 +0000 |
|
3286 | date: 70 01 01 02 +0000 | |
3282 | date: 70 01 01 01 +0000 |
|
3287 | date: 70 01 01 01 +0000 | |
3283 | date: 70 01 01 00 +0000 |
|
3288 | date: 70 01 01 00 +0000 | |
3284 |
|
3289 | |||
3285 | Test invalid date: |
|
3290 | Test invalid date: | |
3286 |
|
3291 | |||
3287 | $ hg log -R latesttag -T '{date(rev)}\n' |
|
3292 | $ hg log -R latesttag -T '{date(rev)}\n' | |
3288 | hg: parse error: date expects a date information |
|
3293 | hg: parse error: date expects a date information | |
3289 | [255] |
|
3294 | [255] | |
3290 |
|
3295 | |||
3291 | Test integer literal: |
|
3296 | Test integer literal: | |
3292 |
|
3297 | |||
3293 | $ hg debugtemplate -v '{(0)}\n' |
|
3298 | $ hg debugtemplate -v '{(0)}\n' | |
3294 | (template |
|
3299 | (template | |
3295 | (group |
|
3300 | (group | |
3296 | (integer '0')) |
|
3301 | (integer '0')) | |
3297 | (string '\n')) |
|
3302 | (string '\n')) | |
3298 | 0 |
|
3303 | 0 | |
3299 | $ hg debugtemplate -v '{(123)}\n' |
|
3304 | $ hg debugtemplate -v '{(123)}\n' | |
3300 | (template |
|
3305 | (template | |
3301 | (group |
|
3306 | (group | |
3302 | (integer '123')) |
|
3307 | (integer '123')) | |
3303 | (string '\n')) |
|
3308 | (string '\n')) | |
3304 | 123 |
|
3309 | 123 | |
3305 | $ hg debugtemplate -v '{(-4)}\n' |
|
3310 | $ hg debugtemplate -v '{(-4)}\n' | |
3306 | (template |
|
3311 | (template | |
3307 | (group |
|
3312 | (group | |
3308 | (negate |
|
3313 | (negate | |
3309 | (integer '4'))) |
|
3314 | (integer '4'))) | |
3310 | (string '\n')) |
|
3315 | (string '\n')) | |
3311 | -4 |
|
3316 | -4 | |
3312 | $ hg debugtemplate '{(-)}\n' |
|
3317 | $ hg debugtemplate '{(-)}\n' | |
3313 | hg: parse error at 3: not a prefix: ) |
|
3318 | hg: parse error at 3: not a prefix: ) | |
3314 | [255] |
|
3319 | [255] | |
3315 | $ hg debugtemplate '{(-a)}\n' |
|
3320 | $ hg debugtemplate '{(-a)}\n' | |
3316 | hg: parse error: negation needs an integer argument |
|
3321 | hg: parse error: negation needs an integer argument | |
3317 | [255] |
|
3322 | [255] | |
3318 |
|
3323 | |||
3319 | top-level integer literal is interpreted as symbol (i.e. variable name): |
|
3324 | top-level integer literal is interpreted as symbol (i.e. variable name): | |
3320 |
|
3325 | |||
3321 | $ hg debugtemplate -D 1=one -v '{1}\n' |
|
3326 | $ hg debugtemplate -D 1=one -v '{1}\n' | |
3322 | (template |
|
3327 | (template | |
3323 | (integer '1') |
|
3328 | (integer '1') | |
3324 | (string '\n')) |
|
3329 | (string '\n')) | |
3325 | one |
|
3330 | one | |
3326 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' |
|
3331 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' | |
3327 | (template |
|
3332 | (template | |
3328 | (func |
|
3333 | (func | |
3329 | (symbol 'if') |
|
3334 | (symbol 'if') | |
3330 | (list |
|
3335 | (list | |
3331 | (string 't') |
|
3336 | (string 't') | |
3332 | (template |
|
3337 | (template | |
3333 | (integer '1')))) |
|
3338 | (integer '1')))) | |
3334 | (string '\n')) |
|
3339 | (string '\n')) | |
3335 | one |
|
3340 | one | |
3336 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' |
|
3341 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' | |
3337 | (template |
|
3342 | (template | |
3338 | (| |
|
3343 | (| | |
3339 | (integer '1') |
|
3344 | (integer '1') | |
3340 | (symbol 'stringify')) |
|
3345 | (symbol 'stringify')) | |
3341 | (string '\n')) |
|
3346 | (string '\n')) | |
3342 | one |
|
3347 | one | |
3343 |
|
3348 | |||
3344 | unless explicit symbol is expected: |
|
3349 | unless explicit symbol is expected: | |
3345 |
|
3350 | |||
3346 | $ hg log -Ra -r0 -T '{desc|1}\n' |
|
3351 | $ hg log -Ra -r0 -T '{desc|1}\n' | |
3347 | hg: parse error: expected a symbol, got 'integer' |
|
3352 | hg: parse error: expected a symbol, got 'integer' | |
3348 | [255] |
|
3353 | [255] | |
3349 | $ hg log -Ra -r0 -T '{1()}\n' |
|
3354 | $ hg log -Ra -r0 -T '{1()}\n' | |
3350 | hg: parse error: expected a symbol, got 'integer' |
|
3355 | hg: parse error: expected a symbol, got 'integer' | |
3351 | [255] |
|
3356 | [255] | |
3352 |
|
3357 | |||
3353 | Test string literal: |
|
3358 | Test string literal: | |
3354 |
|
3359 | |||
3355 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' |
|
3360 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' | |
3356 | (template |
|
3361 | (template | |
3357 | (string 'string with no template fragment') |
|
3362 | (string 'string with no template fragment') | |
3358 | (string '\n')) |
|
3363 | (string '\n')) | |
3359 | string with no template fragment |
|
3364 | string with no template fragment | |
3360 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' |
|
3365 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' | |
3361 | (template |
|
3366 | (template | |
3362 | (template |
|
3367 | (template | |
3363 | (string 'template: ') |
|
3368 | (string 'template: ') | |
3364 | (symbol 'rev')) |
|
3369 | (symbol 'rev')) | |
3365 | (string '\n')) |
|
3370 | (string '\n')) | |
3366 | template: 0 |
|
3371 | template: 0 | |
3367 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' |
|
3372 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' | |
3368 | (template |
|
3373 | (template | |
3369 | (string 'rawstring: {rev}') |
|
3374 | (string 'rawstring: {rev}') | |
3370 | (string '\n')) |
|
3375 | (string '\n')) | |
3371 | rawstring: {rev} |
|
3376 | rawstring: {rev} | |
3372 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' |
|
3377 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' | |
3373 | (template |
|
3378 | (template | |
3374 | (% |
|
3379 | (% | |
3375 | (symbol 'files') |
|
3380 | (symbol 'files') | |
3376 | (string 'rawstring: {file}')) |
|
3381 | (string 'rawstring: {file}')) | |
3377 | (string '\n')) |
|
3382 | (string '\n')) | |
3378 | rawstring: {file} |
|
3383 | rawstring: {file} | |
3379 |
|
3384 | |||
3380 | Test string escaping: |
|
3385 | Test string escaping: | |
3381 |
|
3386 | |||
3382 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3387 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3383 | > |
|
3388 | > | |
3384 | <>\n<[> |
|
3389 | <>\n<[> | |
3385 | <>\n<]> |
|
3390 | <>\n<]> | |
3386 | <>\n< |
|
3391 | <>\n< | |
3387 |
|
3392 | |||
3388 | $ hg log -R latesttag -r 0 \ |
|
3393 | $ hg log -R latesttag -r 0 \ | |
3389 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3394 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3390 | > |
|
3395 | > | |
3391 | <>\n<[> |
|
3396 | <>\n<[> | |
3392 | <>\n<]> |
|
3397 | <>\n<]> | |
3393 | <>\n< |
|
3398 | <>\n< | |
3394 |
|
3399 | |||
3395 | $ hg log -R latesttag -r 0 -T esc \ |
|
3400 | $ hg log -R latesttag -r 0 -T esc \ | |
3396 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3401 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3397 | > |
|
3402 | > | |
3398 | <>\n<[> |
|
3403 | <>\n<[> | |
3399 | <>\n<]> |
|
3404 | <>\n<]> | |
3400 | <>\n< |
|
3405 | <>\n< | |
3401 |
|
3406 | |||
3402 | $ cat <<'EOF' > esctmpl |
|
3407 | $ cat <<'EOF' > esctmpl | |
3403 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3408 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3404 | > EOF |
|
3409 | > EOF | |
3405 | $ hg log -R latesttag -r 0 --style ./esctmpl |
|
3410 | $ hg log -R latesttag -r 0 --style ./esctmpl | |
3406 | > |
|
3411 | > | |
3407 | <>\n<[> |
|
3412 | <>\n<[> | |
3408 | <>\n<]> |
|
3413 | <>\n<]> | |
3409 | <>\n< |
|
3414 | <>\n< | |
3410 |
|
3415 | |||
3411 | Test string escaping of quotes: |
|
3416 | Test string escaping of quotes: | |
3412 |
|
3417 | |||
3413 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
3418 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3414 | " |
|
3419 | " | |
3415 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
3420 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3416 | \" |
|
3421 | \" | |
3417 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
3422 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3418 | \" |
|
3423 | \" | |
3419 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
3424 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3420 | \\\" |
|
3425 | \\\" | |
3421 |
|
3426 | |||
3422 |
|
3427 | |||
3423 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
3428 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3424 | " |
|
3429 | " | |
3425 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
3430 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3426 | \" |
|
3431 | \" | |
3427 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
3432 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3428 | \" |
|
3433 | \" | |
3429 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
3434 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3430 | \\\" |
|
3435 | \\\" | |
3431 |
|
3436 | |||
3432 | Test exception in quoted template. single backslash before quotation mark is |
|
3437 | Test exception in quoted template. single backslash before quotation mark is | |
3433 | stripped before parsing: |
|
3438 | stripped before parsing: | |
3434 |
|
3439 | |||
3435 | $ cat <<'EOF' > escquotetmpl |
|
3440 | $ cat <<'EOF' > escquotetmpl | |
3436 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" |
|
3441 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" | |
3437 | > EOF |
|
3442 | > EOF | |
3438 | $ cd latesttag |
|
3443 | $ cd latesttag | |
3439 | $ hg log -r 2 --style ../escquotetmpl |
|
3444 | $ hg log -r 2 --style ../escquotetmpl | |
3440 | " \" \" \\" head1 |
|
3445 | " \" \" \\" head1 | |
3441 |
|
3446 | |||
3442 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' |
|
3447 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' | |
3443 | valid |
|
3448 | valid | |
3444 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" |
|
3449 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" | |
3445 | valid |
|
3450 | valid | |
3446 |
|
3451 | |||
3447 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested |
|
3452 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested | |
3448 | _evalifliteral() templates (issue4733): |
|
3453 | _evalifliteral() templates (issue4733): | |
3449 |
|
3454 | |||
3450 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' |
|
3455 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' | |
3451 | "2 |
|
3456 | "2 | |
3452 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' |
|
3457 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' | |
3453 | "2 |
|
3458 | "2 | |
3454 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' |
|
3459 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' | |
3455 | "2 |
|
3460 | "2 | |
3456 |
|
3461 | |||
3457 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' |
|
3462 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' | |
3458 | \" |
|
3463 | \" | |
3459 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' |
|
3464 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' | |
3460 | \" |
|
3465 | \" | |
3461 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
3466 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3462 | \" |
|
3467 | \" | |
3463 |
|
3468 | |||
3464 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' |
|
3469 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' | |
3465 | \\\" |
|
3470 | \\\" | |
3466 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' |
|
3471 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' | |
3467 | \\\" |
|
3472 | \\\" | |
3468 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
3473 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3469 | \\\" |
|
3474 | \\\" | |
3470 |
|
3475 | |||
3471 | escaped single quotes and errors: |
|
3476 | escaped single quotes and errors: | |
3472 |
|
3477 | |||
3473 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' |
|
3478 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' | |
3474 | foo |
|
3479 | foo | |
3475 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' |
|
3480 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' | |
3476 | foo |
|
3481 | foo | |
3477 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' |
|
3482 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' | |
3478 | hg: parse error at 21: unterminated string |
|
3483 | hg: parse error at 21: unterminated string | |
3479 | [255] |
|
3484 | [255] | |
3480 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' |
|
3485 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' | |
3481 | hg: parse error: trailing \ in string |
|
3486 | hg: parse error: trailing \ in string | |
3482 | [255] |
|
3487 | [255] | |
3483 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' |
|
3488 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' | |
3484 | hg: parse error: trailing \ in string |
|
3489 | hg: parse error: trailing \ in string | |
3485 | [255] |
|
3490 | [255] | |
3486 |
|
3491 | |||
3487 | $ cd .. |
|
3492 | $ cd .. | |
3488 |
|
3493 | |||
3489 | Test leading backslashes: |
|
3494 | Test leading backslashes: | |
3490 |
|
3495 | |||
3491 | $ cd latesttag |
|
3496 | $ cd latesttag | |
3492 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' |
|
3497 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' | |
3493 | {rev} {file} |
|
3498 | {rev} {file} | |
3494 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' |
|
3499 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' | |
3495 | \2 \head1 |
|
3500 | \2 \head1 | |
3496 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' |
|
3501 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' | |
3497 | \{rev} \{file} |
|
3502 | \{rev} \{file} | |
3498 | $ cd .. |
|
3503 | $ cd .. | |
3499 |
|
3504 | |||
3500 | Test leading backslashes in "if" expression (issue4714): |
|
3505 | Test leading backslashes in "if" expression (issue4714): | |
3501 |
|
3506 | |||
3502 | $ cd latesttag |
|
3507 | $ cd latesttag | |
3503 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' |
|
3508 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' | |
3504 | {rev} \{rev} |
|
3509 | {rev} \{rev} | |
3505 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' |
|
3510 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' | |
3506 | \2 \\{rev} |
|
3511 | \2 \\{rev} | |
3507 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' |
|
3512 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' | |
3508 | \{rev} \\\{rev} |
|
3513 | \{rev} \\\{rev} | |
3509 | $ cd .. |
|
3514 | $ cd .. | |
3510 |
|
3515 | |||
3511 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) |
|
3516 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) | |
3512 |
|
3517 | |||
3513 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' |
|
3518 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' | |
3514 | \x6e |
|
3519 | \x6e | |
3515 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' |
|
3520 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' | |
3516 | \x5c\x786e |
|
3521 | \x5c\x786e | |
3517 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' |
|
3522 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' | |
3518 | \x6e |
|
3523 | \x6e | |
3519 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' |
|
3524 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' | |
3520 | \x5c\x786e |
|
3525 | \x5c\x786e | |
3521 |
|
3526 | |||
3522 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' |
|
3527 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' | |
3523 | \x6e |
|
3528 | \x6e | |
3524 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' |
|
3529 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' | |
3525 | \x5c\x786e |
|
3530 | \x5c\x786e | |
3526 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' |
|
3531 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' | |
3527 | \x6e |
|
3532 | \x6e | |
3528 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' |
|
3533 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' | |
3529 | \x5c\x786e |
|
3534 | \x5c\x786e | |
3530 |
|
3535 | |||
3531 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' |
|
3536 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' | |
3532 | fourth |
|
3537 | fourth | |
3533 | second |
|
3538 | second | |
3534 | third |
|
3539 | third | |
3535 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' |
|
3540 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' | |
3536 | fourth\nsecond\nthird |
|
3541 | fourth\nsecond\nthird | |
3537 |
|
3542 | |||
3538 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' |
|
3543 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' | |
3539 | <p> |
|
3544 | <p> | |
3540 | 1st |
|
3545 | 1st | |
3541 | </p> |
|
3546 | </p> | |
3542 | <p> |
|
3547 | <p> | |
3543 | 2nd |
|
3548 | 2nd | |
3544 | </p> |
|
3549 | </p> | |
3545 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' |
|
3550 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' | |
3546 | <p> |
|
3551 | <p> | |
3547 | 1st\n\n2nd |
|
3552 | 1st\n\n2nd | |
3548 | </p> |
|
3553 | </p> | |
3549 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' |
|
3554 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' | |
3550 | 1st |
|
3555 | 1st | |
3551 |
|
3556 | |||
3552 | 2nd |
|
3557 | 2nd | |
3553 |
|
3558 | |||
3554 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' |
|
3559 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' | |
3555 | o perso |
|
3560 | o perso | |
3556 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' |
|
3561 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' | |
3557 | no person |
|
3562 | no person | |
3558 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' |
|
3563 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' | |
3559 | o perso |
|
3564 | o perso | |
3560 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' |
|
3565 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' | |
3561 | no perso |
|
3566 | no perso | |
3562 |
|
3567 | |||
3563 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' |
|
3568 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' | |
3564 | -o perso- |
|
3569 | -o perso- | |
3565 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' |
|
3570 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' | |
3566 | no person |
|
3571 | no person | |
3567 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' |
|
3572 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' | |
3568 | \x2do perso\x2d |
|
3573 | \x2do perso\x2d | |
3569 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' |
|
3574 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' | |
3570 | -o perso- |
|
3575 | -o perso- | |
3571 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' |
|
3576 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' | |
3572 | \x2do perso\x6e |
|
3577 | \x2do perso\x6e | |
3573 |
|
3578 | |||
3574 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' |
|
3579 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' | |
3575 | fourth |
|
3580 | fourth | |
3576 | second |
|
3581 | second | |
3577 | third |
|
3582 | third | |
3578 |
|
3583 | |||
3579 | Test string escaping in nested expression: |
|
3584 | Test string escaping in nested expression: | |
3580 |
|
3585 | |||
3581 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' |
|
3586 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' | |
3582 | fourth\x6esecond\x6ethird |
|
3587 | fourth\x6esecond\x6ethird | |
3583 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' |
|
3588 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' | |
3584 | fourth\x6esecond\x6ethird |
|
3589 | fourth\x6esecond\x6ethird | |
3585 |
|
3590 | |||
3586 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' |
|
3591 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' | |
3587 | fourth\x6esecond\x6ethird |
|
3592 | fourth\x6esecond\x6ethird | |
3588 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' |
|
3593 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' | |
3589 | fourth\x5c\x786esecond\x5c\x786ethird |
|
3594 | fourth\x5c\x786esecond\x5c\x786ethird | |
3590 |
|
3595 | |||
3591 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' |
|
3596 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' | |
3592 | 3:\x6eo user, \x6eo domai\x6e |
|
3597 | 3:\x6eo user, \x6eo domai\x6e | |
3593 | 4:\x5c\x786eew bra\x5c\x786ech |
|
3598 | 4:\x5c\x786eew bra\x5c\x786ech | |
3594 |
|
3599 | |||
3595 | Test quotes in nested expression are evaluated just like a $(command) |
|
3600 | Test quotes in nested expression are evaluated just like a $(command) | |
3596 | substitution in POSIX shells: |
|
3601 | substitution in POSIX shells: | |
3597 |
|
3602 | |||
3598 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' |
|
3603 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' | |
3599 | 8:95c24699272e |
|
3604 | 8:95c24699272e | |
3600 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' |
|
3605 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' | |
3601 | {8} "95c24699272e" |
|
3606 | {8} "95c24699272e" | |
3602 |
|
3607 | |||
3603 | Test recursive evaluation: |
|
3608 | Test recursive evaluation: | |
3604 |
|
3609 | |||
3605 | $ hg init r |
|
3610 | $ hg init r | |
3606 | $ cd r |
|
3611 | $ cd r | |
3607 | $ echo a > a |
|
3612 | $ echo a > a | |
3608 | $ hg ci -Am '{rev}' |
|
3613 | $ hg ci -Am '{rev}' | |
3609 | adding a |
|
3614 | adding a | |
3610 | $ hg log -r 0 --template '{if(rev, desc)}\n' |
|
3615 | $ hg log -r 0 --template '{if(rev, desc)}\n' | |
3611 | {rev} |
|
3616 | {rev} | |
3612 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' |
|
3617 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' | |
3613 | test 0 |
|
3618 | test 0 | |
3614 |
|
3619 | |||
3615 | $ hg branch -q 'text.{rev}' |
|
3620 | $ hg branch -q 'text.{rev}' | |
3616 | $ echo aa >> aa |
|
3621 | $ echo aa >> aa | |
3617 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' |
|
3622 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' | |
3618 |
|
3623 | |||
3619 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' |
|
3624 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' | |
3620 | {node|short}desc to |
|
3625 | {node|short}desc to | |
3621 | text.{rev}be wrapped |
|
3626 | text.{rev}be wrapped | |
3622 | text.{rev}desc to be |
|
3627 | text.{rev}desc to be | |
3623 | text.{rev}wrapped (no-eol) |
|
3628 | text.{rev}wrapped (no-eol) | |
3624 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' |
|
3629 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' | |
3625 | bcc7ff960b8e:desc to |
|
3630 | bcc7ff960b8e:desc to | |
3626 | text.1:be wrapped |
|
3631 | text.1:be wrapped | |
3627 | text.1:desc to be |
|
3632 | text.1:desc to be | |
3628 | text.1:wrapped (no-eol) |
|
3633 | text.1:wrapped (no-eol) | |
3629 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' |
|
3634 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' | |
3630 | hg: parse error: fill expects an integer width |
|
3635 | hg: parse error: fill expects an integer width | |
3631 | [255] |
|
3636 | [255] | |
3632 |
|
3637 | |||
3633 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' |
|
3638 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' | |
3634 | bcc7ff960b8e:desc to be |
|
3639 | bcc7ff960b8e:desc to be | |
3635 | termwidth.1:wrapped desc |
|
3640 | termwidth.1:wrapped desc | |
3636 | termwidth.1:to be wrapped (no-eol) |
|
3641 | termwidth.1:to be wrapped (no-eol) | |
3637 |
|
3642 | |||
3638 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
3643 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' | |
3639 | {node|short} (no-eol) |
|
3644 | {node|short} (no-eol) | |
3640 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' |
|
3645 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' | |
3641 | bcc-ff---b-e (no-eol) |
|
3646 | bcc-ff---b-e (no-eol) | |
3642 |
|
3647 | |||
3643 | $ cat >> .hg/hgrc <<EOF |
|
3648 | $ cat >> .hg/hgrc <<EOF | |
3644 | > [extensions] |
|
3649 | > [extensions] | |
3645 | > color= |
|
3650 | > color= | |
3646 | > [color] |
|
3651 | > [color] | |
3647 | > mode=ansi |
|
3652 | > mode=ansi | |
3648 | > text.{rev} = red |
|
3653 | > text.{rev} = red | |
3649 | > text.1 = green |
|
3654 | > text.1 = green | |
3650 | > EOF |
|
3655 | > EOF | |
3651 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' |
|
3656 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' | |
3652 | \x1b[0;31mtext\x1b[0m (esc) |
|
3657 | \x1b[0;31mtext\x1b[0m (esc) | |
3653 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' |
|
3658 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' | |
3654 | \x1b[0;32mtext\x1b[0m (esc) |
|
3659 | \x1b[0;32mtext\x1b[0m (esc) | |
3655 |
|
3660 | |||
3656 | color effect can be specified without quoting: |
|
3661 | color effect can be specified without quoting: | |
3657 |
|
3662 | |||
3658 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' |
|
3663 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' | |
3659 | \x1b[0;31mtext\x1b[0m (esc) |
|
3664 | \x1b[0;31mtext\x1b[0m (esc) | |
3660 |
|
3665 | |||
3661 | color effects can be nested (issue5413) |
|
3666 | color effects can be nested (issue5413) | |
3662 |
|
3667 | |||
3663 | $ hg debugtemplate --color=always \ |
|
3668 | $ hg debugtemplate --color=always \ | |
3664 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' |
|
3669 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' | |
3665 | \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) |
|
3670 | \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) | |
3666 |
|
3671 | |||
3667 | pad() should interact well with color codes (issue5416) |
|
3672 | pad() should interact well with color codes (issue5416) | |
3668 |
|
3673 | |||
3669 | $ hg debugtemplate --color=always \ |
|
3674 | $ hg debugtemplate --color=always \ | |
3670 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' |
|
3675 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' | |
3671 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) |
|
3676 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) | |
3672 |
|
3677 | |||
3673 | label should be no-op if color is disabled: |
|
3678 | label should be no-op if color is disabled: | |
3674 |
|
3679 | |||
3675 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' |
|
3680 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' | |
3676 | text |
|
3681 | text | |
3677 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' |
|
3682 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' | |
3678 | text |
|
3683 | text | |
3679 |
|
3684 | |||
3680 | Test branches inside if statement: |
|
3685 | Test branches inside if statement: | |
3681 |
|
3686 | |||
3682 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' |
|
3687 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' | |
3683 | no |
|
3688 | no | |
3684 |
|
3689 | |||
3685 | Test dict constructor: |
|
3690 | Test dict constructor: | |
3686 |
|
3691 | |||
3687 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' |
|
3692 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' | |
3688 | y=f7769ec2ab97 x=0 |
|
3693 | y=f7769ec2ab97 x=0 | |
3689 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' |
|
3694 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' | |
3690 | x=0 |
|
3695 | x=0 | |
3691 | y=f7769ec2ab97 |
|
3696 | y=f7769ec2ab97 | |
3692 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' |
|
3697 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' | |
3693 | {"x": 0, "y": "f7769ec2ab97"} |
|
3698 | {"x": 0, "y": "f7769ec2ab97"} | |
3694 | $ hg log -r 0 -T '{dict()|json}\n' |
|
3699 | $ hg log -r 0 -T '{dict()|json}\n' | |
3695 | {} |
|
3700 | {} | |
3696 |
|
3701 | |||
3697 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' |
|
3702 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' | |
3698 | rev=0 node=f7769ec2ab97 |
|
3703 | rev=0 node=f7769ec2ab97 | |
3699 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' |
|
3704 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' | |
3700 | rev=0 node=f7769ec2ab97 |
|
3705 | rev=0 node=f7769ec2ab97 | |
3701 |
|
3706 | |||
3702 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' |
|
3707 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' | |
3703 | hg: parse error: duplicated dict key 'rev' inferred |
|
3708 | hg: parse error: duplicated dict key 'rev' inferred | |
3704 | [255] |
|
3709 | [255] | |
3705 | $ hg log -r 0 -T '{dict(node, node|short)}\n' |
|
3710 | $ hg log -r 0 -T '{dict(node, node|short)}\n' | |
3706 | hg: parse error: duplicated dict key 'node' inferred |
|
3711 | hg: parse error: duplicated dict key 'node' inferred | |
3707 | [255] |
|
3712 | [255] | |
3708 | $ hg log -r 0 -T '{dict(1 + 2)}' |
|
3713 | $ hg log -r 0 -T '{dict(1 + 2)}' | |
3709 | hg: parse error: dict key cannot be inferred |
|
3714 | hg: parse error: dict key cannot be inferred | |
3710 | [255] |
|
3715 | [255] | |
3711 |
|
3716 | |||
3712 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' |
|
3717 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' | |
3713 | hg: parse error: dict got multiple values for keyword argument 'x' |
|
3718 | hg: parse error: dict got multiple values for keyword argument 'x' | |
3714 | [255] |
|
3719 | [255] | |
3715 |
|
3720 | |||
3716 | Test get function: |
|
3721 | Test get function: | |
3717 |
|
3722 | |||
3718 | $ hg log -r 0 --template '{get(extras, "branch")}\n' |
|
3723 | $ hg log -r 0 --template '{get(extras, "branch")}\n' | |
3719 | default |
|
3724 | default | |
3720 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' |
|
3725 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' | |
3721 | default |
|
3726 | default | |
3722 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' |
|
3727 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' | |
3723 | hg: parse error: get() expects a dict as first argument |
|
3728 | hg: parse error: get() expects a dict as first argument | |
3724 | [255] |
|
3729 | [255] | |
3725 |
|
3730 | |||
3726 | Test json filter applied to hybrid object: |
|
3731 | Test json filter applied to hybrid object: | |
3727 |
|
3732 | |||
3728 | $ hg log -r0 -T '{files|json}\n' |
|
3733 | $ hg log -r0 -T '{files|json}\n' | |
3729 | ["a"] |
|
3734 | ["a"] | |
3730 | $ hg log -r0 -T '{extras|json}\n' |
|
3735 | $ hg log -r0 -T '{extras|json}\n' | |
3731 | {"branch": "default"} |
|
3736 | {"branch": "default"} | |
3732 |
|
3737 | |||
3733 | Test localdate(date, tz) function: |
|
3738 | Test localdate(date, tz) function: | |
3734 |
|
3739 | |||
3735 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' |
|
3740 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' | |
3736 | 1970-01-01 09:00 +0900 |
|
3741 | 1970-01-01 09:00 +0900 | |
3737 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' |
|
3742 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' | |
3738 | 1970-01-01 00:00 +0000 |
|
3743 | 1970-01-01 00:00 +0000 | |
3739 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' |
|
3744 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' | |
3740 | hg: parse error: localdate expects a timezone |
|
3745 | hg: parse error: localdate expects a timezone | |
3741 | [255] |
|
3746 | [255] | |
3742 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' |
|
3747 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' | |
3743 | 1970-01-01 02:00 +0200 |
|
3748 | 1970-01-01 02:00 +0200 | |
3744 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' |
|
3749 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' | |
3745 | 1970-01-01 00:00 +0000 |
|
3750 | 1970-01-01 00:00 +0000 | |
3746 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' |
|
3751 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' | |
3747 | 1970-01-01 00:00 +0000 |
|
3752 | 1970-01-01 00:00 +0000 | |
3748 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' |
|
3753 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' | |
3749 | hg: parse error: localdate expects a timezone |
|
3754 | hg: parse error: localdate expects a timezone | |
3750 | [255] |
|
3755 | [255] | |
3751 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' |
|
3756 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' | |
3752 | hg: parse error: localdate expects a timezone |
|
3757 | hg: parse error: localdate expects a timezone | |
3753 | [255] |
|
3758 | [255] | |
3754 |
|
3759 | |||
3755 | Test shortest(node) function: |
|
3760 | Test shortest(node) function: | |
3756 |
|
3761 | |||
3757 | $ echo b > b |
|
3762 | $ echo b > b | |
3758 | $ hg ci -qAm b |
|
3763 | $ hg ci -qAm b | |
3759 | $ hg log --template '{shortest(node)}\n' |
|
3764 | $ hg log --template '{shortest(node)}\n' | |
3760 | e777 |
|
3765 | e777 | |
3761 | bcc7 |
|
3766 | bcc7 | |
3762 | f776 |
|
3767 | f776 | |
3763 | $ hg log --template '{shortest(node, 10)}\n' |
|
3768 | $ hg log --template '{shortest(node, 10)}\n' | |
3764 | e777603221 |
|
3769 | e777603221 | |
3765 | bcc7ff960b |
|
3770 | bcc7ff960b | |
3766 | f7769ec2ab |
|
3771 | f7769ec2ab | |
3767 | $ hg log --template '{node|shortest}\n' -l1 |
|
3772 | $ hg log --template '{node|shortest}\n' -l1 | |
3768 | e777 |
|
3773 | e777 | |
3769 |
|
3774 | |||
3770 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' |
|
3775 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' | |
3771 | f7769ec2ab |
|
3776 | f7769ec2ab | |
3772 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' |
|
3777 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' | |
3773 | hg: parse error: shortest() expects an integer minlength |
|
3778 | hg: parse error: shortest() expects an integer minlength | |
3774 | [255] |
|
3779 | [255] | |
3775 |
|
3780 | |||
3776 | $ hg log -r 'wdir()' -T '{node|shortest}\n' |
|
3781 | $ hg log -r 'wdir()' -T '{node|shortest}\n' | |
3777 | ffff |
|
3782 | ffff | |
3778 |
|
3783 | |||
3779 | $ cd .. |
|
3784 | $ cd .. | |
3780 |
|
3785 | |||
3781 | Test shortest(node) with the repo having short hash collision: |
|
3786 | Test shortest(node) with the repo having short hash collision: | |
3782 |
|
3787 | |||
3783 | $ hg init hashcollision |
|
3788 | $ hg init hashcollision | |
3784 | $ cd hashcollision |
|
3789 | $ cd hashcollision | |
3785 | $ cat <<EOF >> .hg/hgrc |
|
3790 | $ cat <<EOF >> .hg/hgrc | |
3786 | > [experimental] |
|
3791 | > [experimental] | |
3787 | > evolution.createmarkers=True |
|
3792 | > evolution.createmarkers=True | |
3788 | > EOF |
|
3793 | > EOF | |
3789 | $ echo 0 > a |
|
3794 | $ echo 0 > a | |
3790 | $ hg ci -qAm 0 |
|
3795 | $ hg ci -qAm 0 | |
3791 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do |
|
3796 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do | |
3792 | > hg up -q 0 |
|
3797 | > hg up -q 0 | |
3793 | > echo $i > a |
|
3798 | > echo $i > a | |
3794 | > hg ci -qm $i |
|
3799 | > hg ci -qm $i | |
3795 | > done |
|
3800 | > done | |
3796 | $ hg up -q null |
|
3801 | $ hg up -q null | |
3797 | $ hg log -r0: -T '{rev}:{node}\n' |
|
3802 | $ hg log -r0: -T '{rev}:{node}\n' | |
3798 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a |
|
3803 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a | |
3799 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc |
|
3804 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc | |
3800 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 |
|
3805 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 | |
3801 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 |
|
3806 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 | |
3802 | 4:10776689e627b465361ad5c296a20a487e153ca4 |
|
3807 | 4:10776689e627b465361ad5c296a20a487e153ca4 | |
3803 | 5:a00be79088084cb3aff086ab799f8790e01a976b |
|
3808 | 5:a00be79088084cb3aff086ab799f8790e01a976b | |
3804 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 |
|
3809 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 | |
3805 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d |
|
3810 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d | |
3806 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a |
|
3811 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a | |
3807 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
3812 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
3808 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
3813 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f | |
3809 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b |
|
3814 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b | |
3810 | obsoleted 1 changesets |
|
3815 | obsoleted 1 changesets | |
3811 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
3816 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
3812 | obsoleted 1 changesets |
|
3817 | obsoleted 1 changesets | |
3813 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
3818 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f | |
3814 | obsoleted 1 changesets |
|
3819 | obsoleted 1 changesets | |
3815 |
|
3820 | |||
3816 | nodes starting with '11' (we don't have the revision number '11' though) |
|
3821 | nodes starting with '11' (we don't have the revision number '11' though) | |
3817 |
|
3822 | |||
3818 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' |
|
3823 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' | |
3819 | 1:1142 |
|
3824 | 1:1142 | |
3820 | 2:1140 |
|
3825 | 2:1140 | |
3821 | 3:11d |
|
3826 | 3:11d | |
3822 |
|
3827 | |||
3823 | '5:a00' is hidden, but still we have two nodes starting with 'a0' |
|
3828 | '5:a00' is hidden, but still we have two nodes starting with 'a0' | |
3824 |
|
3829 | |||
3825 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' |
|
3830 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' | |
3826 | 6:a0b |
|
3831 | 6:a0b | |
3827 | 7:a04 |
|
3832 | 7:a04 | |
3828 |
|
3833 | |||
3829 | node '10' conflicts with the revision number '10' even if it is hidden |
|
3834 | node '10' conflicts with the revision number '10' even if it is hidden | |
3830 | (we could exclude hidden revision numbers, but currently we don't) |
|
3835 | (we could exclude hidden revision numbers, but currently we don't) | |
3831 |
|
3836 | |||
3832 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' |
|
3837 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' | |
3833 | 4:107 |
|
3838 | 4:107 | |
3834 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden |
|
3839 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden | |
3835 | 4:107 |
|
3840 | 4:107 | |
3836 |
|
3841 | |||
3837 | node 'c562' should be unique if the other 'c562' nodes are hidden |
|
3842 | node 'c562' should be unique if the other 'c562' nodes are hidden | |
3838 | (but we don't try the slow path to filter out hidden nodes for now) |
|
3843 | (but we don't try the slow path to filter out hidden nodes for now) | |
3839 |
|
3844 | |||
3840 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' |
|
3845 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' | |
3841 | 8:c5625 |
|
3846 | 8:c5625 | |
3842 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden |
|
3847 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden | |
3843 | 8:c5625 |
|
3848 | 8:c5625 | |
3844 | 9:c5623 |
|
3849 | 9:c5623 | |
3845 | 10:c562d |
|
3850 | 10:c562d | |
3846 |
|
3851 | |||
3847 | $ cd .. |
|
3852 | $ cd .. | |
3848 |
|
3853 | |||
3849 | Test pad function |
|
3854 | Test pad function | |
3850 |
|
3855 | |||
3851 | $ cd r |
|
3856 | $ cd r | |
3852 |
|
3857 | |||
3853 | $ hg log --template '{pad(rev, 20)} {author|user}\n' |
|
3858 | $ hg log --template '{pad(rev, 20)} {author|user}\n' | |
3854 | 2 test |
|
3859 | 2 test | |
3855 | 1 {node|short} |
|
3860 | 1 {node|short} | |
3856 | 0 test |
|
3861 | 0 test | |
3857 |
|
3862 | |||
3858 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' |
|
3863 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' | |
3859 | 2 test |
|
3864 | 2 test | |
3860 | 1 {node|short} |
|
3865 | 1 {node|short} | |
3861 | 0 test |
|
3866 | 0 test | |
3862 |
|
3867 | |||
3863 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' |
|
3868 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' | |
3864 | 2------------------- test |
|
3869 | 2------------------- test | |
3865 | 1------------------- {node|short} |
|
3870 | 1------------------- {node|short} | |
3866 | 0------------------- test |
|
3871 | 0------------------- test | |
3867 |
|
3872 | |||
3868 | Test template string in pad function |
|
3873 | Test template string in pad function | |
3869 |
|
3874 | |||
3870 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' |
|
3875 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' | |
3871 | {0} test |
|
3876 | {0} test | |
3872 |
|
3877 | |||
3873 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' |
|
3878 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' | |
3874 | \{rev} test |
|
3879 | \{rev} test | |
3875 |
|
3880 | |||
3876 | Test width argument passed to pad function |
|
3881 | Test width argument passed to pad function | |
3877 |
|
3882 | |||
3878 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' |
|
3883 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' | |
3879 | 0 test |
|
3884 | 0 test | |
3880 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' |
|
3885 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' | |
3881 | hg: parse error: pad() expects an integer width |
|
3886 | hg: parse error: pad() expects an integer width | |
3882 | [255] |
|
3887 | [255] | |
3883 |
|
3888 | |||
3884 | Test invalid fillchar passed to pad function |
|
3889 | Test invalid fillchar passed to pad function | |
3885 |
|
3890 | |||
3886 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' |
|
3891 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' | |
3887 | hg: parse error: pad() expects a single fill character |
|
3892 | hg: parse error: pad() expects a single fill character | |
3888 | [255] |
|
3893 | [255] | |
3889 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' |
|
3894 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' | |
3890 | hg: parse error: pad() expects a single fill character |
|
3895 | hg: parse error: pad() expects a single fill character | |
3891 | [255] |
|
3896 | [255] | |
3892 |
|
3897 | |||
3893 | Test boolean argument passed to pad function |
|
3898 | Test boolean argument passed to pad function | |
3894 |
|
3899 | |||
3895 | no crash |
|
3900 | no crash | |
3896 |
|
3901 | |||
3897 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' |
|
3902 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' | |
3898 | ---------0 |
|
3903 | ---------0 | |
3899 |
|
3904 | |||
3900 | string/literal |
|
3905 | string/literal | |
3901 |
|
3906 | |||
3902 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' |
|
3907 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' | |
3903 | ---------0 |
|
3908 | ---------0 | |
3904 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' |
|
3909 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' | |
3905 | 0--------- |
|
3910 | 0--------- | |
3906 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' |
|
3911 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' | |
3907 | 0--------- |
|
3912 | 0--------- | |
3908 |
|
3913 | |||
3909 | unknown keyword is evaluated to '' |
|
3914 | unknown keyword is evaluated to '' | |
3910 |
|
3915 | |||
3911 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' |
|
3916 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' | |
3912 | 0--------- |
|
3917 | 0--------- | |
3913 |
|
3918 | |||
3914 | Test separate function |
|
3919 | Test separate function | |
3915 |
|
3920 | |||
3916 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' |
|
3921 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' | |
3917 | a-b-c |
|
3922 | a-b-c | |
3918 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' |
|
3923 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' | |
3919 | 0:f7769ec2ab97 test default |
|
3924 | 0:f7769ec2ab97 test default | |
3920 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' |
|
3925 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' | |
3921 | a \x1b[0;31mb\x1b[0m c d (esc) |
|
3926 | a \x1b[0;31mb\x1b[0m c d (esc) | |
3922 |
|
3927 | |||
3923 | Test boolean expression/literal passed to if function |
|
3928 | Test boolean expression/literal passed to if function | |
3924 |
|
3929 | |||
3925 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' |
|
3930 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' | |
3926 | rev 0 is True |
|
3931 | rev 0 is True | |
3927 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' |
|
3932 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' | |
3928 | literal 0 is True as well |
|
3933 | literal 0 is True as well | |
3929 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' |
|
3934 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' | |
3930 | empty string is False |
|
3935 | empty string is False | |
3931 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' |
|
3936 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' | |
3932 | empty list is False |
|
3937 | empty list is False | |
3933 | $ hg log -r 0 -T '{if(true, "true is True")}\n' |
|
3938 | $ hg log -r 0 -T '{if(true, "true is True")}\n' | |
3934 | true is True |
|
3939 | true is True | |
3935 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' |
|
3940 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' | |
3936 | false is False |
|
3941 | false is False | |
3937 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' |
|
3942 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' | |
3938 | non-empty string is True |
|
3943 | non-empty string is True | |
3939 |
|
3944 | |||
3940 | Test ifcontains function |
|
3945 | Test ifcontains function | |
3941 |
|
3946 | |||
3942 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' |
|
3947 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' | |
3943 | 2 is in the string |
|
3948 | 2 is in the string | |
3944 | 1 is not |
|
3949 | 1 is not | |
3945 | 0 is in the string |
|
3950 | 0 is in the string | |
3946 |
|
3951 | |||
3947 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' |
|
3952 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' | |
3948 | 2 is in the string |
|
3953 | 2 is in the string | |
3949 | 1 is not |
|
3954 | 1 is not | |
3950 | 0 is in the string |
|
3955 | 0 is in the string | |
3951 |
|
3956 | |||
3952 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' |
|
3957 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' | |
3953 | 2 did not add a |
|
3958 | 2 did not add a | |
3954 | 1 did not add a |
|
3959 | 1 did not add a | |
3955 | 0 added a |
|
3960 | 0 added a | |
3956 |
|
3961 | |||
3957 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' |
|
3962 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' | |
3958 | 2 is parent of 1 |
|
3963 | 2 is parent of 1 | |
3959 | 1 |
|
3964 | 1 | |
3960 | 0 |
|
3965 | 0 | |
3961 |
|
3966 | |||
3962 | Test revset function |
|
3967 | Test revset function | |
3963 |
|
3968 | |||
3964 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' |
|
3969 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' | |
3965 | 2 current rev |
|
3970 | 2 current rev | |
3966 | 1 not current rev |
|
3971 | 1 not current rev | |
3967 | 0 not current rev |
|
3972 | 0 not current rev | |
3968 |
|
3973 | |||
3969 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' |
|
3974 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' | |
3970 | 2 match rev |
|
3975 | 2 match rev | |
3971 | 1 match rev |
|
3976 | 1 match rev | |
3972 | 0 not match rev |
|
3977 | 0 not match rev | |
3973 |
|
3978 | |||
3974 | $ hg log -T '{ifcontains(desc, revset(":"), "", "type not match")}\n' -l1 |
|
3979 | $ hg log -T '{ifcontains(desc, revset(":"), "", "type not match")}\n' -l1 | |
3975 | type not match |
|
3980 | type not match | |
3976 |
|
3981 | |||
3977 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' |
|
3982 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' | |
3978 | 2 Parents: 1 |
|
3983 | 2 Parents: 1 | |
3979 | 1 Parents: 0 |
|
3984 | 1 Parents: 0 | |
3980 | 0 Parents: |
|
3985 | 0 Parents: | |
3981 |
|
3986 | |||
3982 | $ cat >> .hg/hgrc <<EOF |
|
3987 | $ cat >> .hg/hgrc <<EOF | |
3983 | > [revsetalias] |
|
3988 | > [revsetalias] | |
3984 | > myparents(\$1) = parents(\$1) |
|
3989 | > myparents(\$1) = parents(\$1) | |
3985 | > EOF |
|
3990 | > EOF | |
3986 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' |
|
3991 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' | |
3987 | 2 Parents: 1 |
|
3992 | 2 Parents: 1 | |
3988 | 1 Parents: 0 |
|
3993 | 1 Parents: 0 | |
3989 | 0 Parents: |
|
3994 | 0 Parents: | |
3990 |
|
3995 | |||
3991 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' |
|
3996 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' | |
3992 | Rev: 2 |
|
3997 | Rev: 2 | |
3993 | Ancestor: 0 |
|
3998 | Ancestor: 0 | |
3994 | Ancestor: 1 |
|
3999 | Ancestor: 1 | |
3995 | Ancestor: 2 |
|
4000 | Ancestor: 2 | |
3996 |
|
4001 | |||
3997 | Rev: 1 |
|
4002 | Rev: 1 | |
3998 | Ancestor: 0 |
|
4003 | Ancestor: 0 | |
3999 | Ancestor: 1 |
|
4004 | Ancestor: 1 | |
4000 |
|
4005 | |||
4001 | Rev: 0 |
|
4006 | Rev: 0 | |
4002 | Ancestor: 0 |
|
4007 | Ancestor: 0 | |
4003 |
|
4008 | |||
4004 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 |
|
4009 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 | |
4005 | 2 |
|
4010 | 2 | |
4006 |
|
4011 | |||
4007 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 |
|
4012 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 | |
4008 | 2 |
|
4013 | 2 | |
4009 |
|
4014 | |||
4010 | a list template is evaluated for each item of revset/parents |
|
4015 | a list template is evaluated for each item of revset/parents | |
4011 |
|
4016 | |||
4012 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' |
|
4017 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' | |
4013 | 2 p: 1:bcc7ff960b8e |
|
4018 | 2 p: 1:bcc7ff960b8e | |
4014 | 1 p: 0:f7769ec2ab97 |
|
4019 | 1 p: 0:f7769ec2ab97 | |
4015 | 0 p: |
|
4020 | 0 p: | |
4016 |
|
4021 | |||
4017 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' |
|
4022 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' | |
4018 | 2 p: 1:bcc7ff960b8e -1:000000000000 |
|
4023 | 2 p: 1:bcc7ff960b8e -1:000000000000 | |
4019 | 1 p: 0:f7769ec2ab97 -1:000000000000 |
|
4024 | 1 p: 0:f7769ec2ab97 -1:000000000000 | |
4020 | 0 p: -1:000000000000 -1:000000000000 |
|
4025 | 0 p: -1:000000000000 -1:000000000000 | |
4021 |
|
4026 | |||
4022 | therefore, 'revcache' should be recreated for each rev |
|
4027 | therefore, 'revcache' should be recreated for each rev | |
4023 |
|
4028 | |||
4024 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' |
|
4029 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' | |
4025 | 2 aa b |
|
4030 | 2 aa b | |
4026 | p |
|
4031 | p | |
4027 | 1 |
|
4032 | 1 | |
4028 | p a |
|
4033 | p a | |
4029 | 0 a |
|
4034 | 0 a | |
4030 | p |
|
4035 | p | |
4031 |
|
4036 | |||
4032 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' |
|
4037 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' | |
4033 | 2 aa b |
|
4038 | 2 aa b | |
4034 | p |
|
4039 | p | |
4035 | 1 |
|
4040 | 1 | |
4036 | p a |
|
4041 | p a | |
4037 | 0 a |
|
4042 | 0 a | |
4038 | p |
|
4043 | p | |
4039 |
|
4044 | |||
4040 | a revset item must be evaluated as an integer revision, not an offset from tip |
|
4045 | a revset item must be evaluated as an integer revision, not an offset from tip | |
4041 |
|
4046 | |||
4042 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' |
|
4047 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' | |
4043 | -1:000000000000 |
|
4048 | -1:000000000000 | |
4044 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' |
|
4049 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' | |
4045 | -1:000000000000 |
|
4050 | -1:000000000000 | |
4046 |
|
4051 | |||
4047 | join() should pick '{rev}' from revset items: |
|
4052 | join() should pick '{rev}' from revset items: | |
4048 |
|
4053 | |||
4049 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 |
|
4054 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 | |
4050 | 4, 5 |
|
4055 | 4, 5 | |
4051 |
|
4056 | |||
4052 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by |
|
4057 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by | |
4053 | default. join() should agree with the default formatting: |
|
4058 | default. join() should agree with the default formatting: | |
4054 |
|
4059 | |||
4055 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 |
|
4060 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 | |
4056 | 5:13207e5a10d9, 4:bbe44766e73d |
|
4061 | 5:13207e5a10d9, 4:bbe44766e73d | |
4057 |
|
4062 | |||
4058 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug |
|
4063 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug | |
4059 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, |
|
4064 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, | |
4060 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
4065 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
4061 |
|
4066 | |||
4062 | Test files function |
|
4067 | Test files function | |
4063 |
|
4068 | |||
4064 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" |
|
4069 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" | |
4065 | 2 |
|
4070 | 2 | |
4066 | a |
|
4071 | a | |
4067 | aa |
|
4072 | aa | |
4068 | b |
|
4073 | b | |
4069 | 1 |
|
4074 | 1 | |
4070 | a |
|
4075 | a | |
4071 | 0 |
|
4076 | 0 | |
4072 | a |
|
4077 | a | |
4073 |
|
4078 | |||
4074 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" |
|
4079 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" | |
4075 | 2 |
|
4080 | 2 | |
4076 | aa |
|
4081 | aa | |
4077 | 1 |
|
4082 | 1 | |
4078 |
|
4083 | |||
4079 | 0 |
|
4084 | 0 | |
4080 |
|
4085 | |||
4081 |
|
4086 | |||
4082 | Test relpath function |
|
4087 | Test relpath function | |
4083 |
|
4088 | |||
4084 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' |
|
4089 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' | |
4085 | a |
|
4090 | a | |
4086 | $ cd .. |
|
4091 | $ cd .. | |
4087 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' |
|
4092 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' | |
4088 | r/a |
|
4093 | r/a | |
4089 | $ cd r |
|
4094 | $ cd r | |
4090 |
|
4095 | |||
4091 | Test active bookmark templating |
|
4096 | Test active bookmark templating | |
4092 |
|
4097 | |||
4093 | $ hg book foo |
|
4098 | $ hg book foo | |
4094 | $ hg book bar |
|
4099 | $ hg book bar | |
4095 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" |
|
4100 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" | |
4096 | 2 bar* foo |
|
4101 | 2 bar* foo | |
4097 | 1 |
|
4102 | 1 | |
4098 | 0 |
|
4103 | 0 | |
4099 | $ hg log --template "{rev} {activebookmark}\n" |
|
4104 | $ hg log --template "{rev} {activebookmark}\n" | |
4100 | 2 bar |
|
4105 | 2 bar | |
4101 | 1 |
|
4106 | 1 | |
4102 | 0 |
|
4107 | 0 | |
4103 | $ hg bookmarks --inactive bar |
|
4108 | $ hg bookmarks --inactive bar | |
4104 | $ hg log --template "{rev} {activebookmark}\n" |
|
4109 | $ hg log --template "{rev} {activebookmark}\n" | |
4105 | 2 |
|
4110 | 2 | |
4106 | 1 |
|
4111 | 1 | |
4107 | 0 |
|
4112 | 0 | |
4108 | $ hg book -r1 baz |
|
4113 | $ hg book -r1 baz | |
4109 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" |
|
4114 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" | |
4110 | 2 bar foo |
|
4115 | 2 bar foo | |
4111 | 1 baz |
|
4116 | 1 baz | |
4112 | 0 |
|
4117 | 0 | |
4113 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" |
|
4118 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" | |
4114 | 2 t |
|
4119 | 2 t | |
4115 | 1 f |
|
4120 | 1 f | |
4116 | 0 f |
|
4121 | 0 f | |
4117 |
|
4122 | |||
4118 | Test namespaces dict |
|
4123 | Test namespaces dict | |
4119 |
|
4124 | |||
4120 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' |
|
4125 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' | |
4121 | 2 |
|
4126 | 2 | |
4122 | bookmarks color=bookmark builtin=True |
|
4127 | bookmarks color=bookmark builtin=True | |
4123 | bar,foo |
|
4128 | bar,foo | |
4124 | tags color=tag builtin=True |
|
4129 | tags color=tag builtin=True | |
4125 | tip |
|
4130 | tip | |
4126 | branches color=branch builtin=True |
|
4131 | branches color=branch builtin=True | |
4127 | text.{rev} |
|
4132 | text.{rev} | |
4128 | revnames color=revname builtin=False |
|
4133 | revnames color=revname builtin=False | |
4129 | r2 |
|
4134 | r2 | |
4130 |
|
4135 | |||
4131 | 1 |
|
4136 | 1 | |
4132 | bookmarks color=bookmark builtin=True |
|
4137 | bookmarks color=bookmark builtin=True | |
4133 | baz |
|
4138 | baz | |
4134 | tags color=tag builtin=True |
|
4139 | tags color=tag builtin=True | |
4135 |
|
4140 | |||
4136 | branches color=branch builtin=True |
|
4141 | branches color=branch builtin=True | |
4137 | text.{rev} |
|
4142 | text.{rev} | |
4138 | revnames color=revname builtin=False |
|
4143 | revnames color=revname builtin=False | |
4139 | r1 |
|
4144 | r1 | |
4140 |
|
4145 | |||
4141 | 0 |
|
4146 | 0 | |
4142 | bookmarks color=bookmark builtin=True |
|
4147 | bookmarks color=bookmark builtin=True | |
4143 |
|
4148 | |||
4144 | tags color=tag builtin=True |
|
4149 | tags color=tag builtin=True | |
4145 |
|
4150 | |||
4146 | branches color=branch builtin=True |
|
4151 | branches color=branch builtin=True | |
4147 | default |
|
4152 | default | |
4148 | revnames color=revname builtin=False |
|
4153 | revnames color=revname builtin=False | |
4149 | r0 |
|
4154 | r0 | |
4150 |
|
4155 | |||
4151 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' |
|
4156 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' | |
4152 | bookmarks: bar foo |
|
4157 | bookmarks: bar foo | |
4153 | tags: tip |
|
4158 | tags: tip | |
4154 | branches: text.{rev} |
|
4159 | branches: text.{rev} | |
4155 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' |
|
4160 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' | |
4156 | bookmarks: |
|
4161 | bookmarks: | |
4157 | bar |
|
4162 | bar | |
4158 | foo |
|
4163 | foo | |
4159 | tags: |
|
4164 | tags: | |
4160 | tip |
|
4165 | tip | |
4161 | branches: |
|
4166 | branches: | |
4162 | text.{rev} |
|
4167 | text.{rev} | |
4163 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' |
|
4168 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' | |
4164 | bar |
|
4169 | bar | |
4165 | foo |
|
4170 | foo | |
4166 | $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}' |
|
4171 | $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}' | |
4167 | bar |
|
4172 | bar | |
4168 | foo |
|
4173 | foo | |
4169 |
|
4174 | |||
4170 | Test stringify on sub expressions |
|
4175 | Test stringify on sub expressions | |
4171 |
|
4176 | |||
4172 | $ cd .. |
|
4177 | $ cd .. | |
4173 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' |
|
4178 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' | |
4174 | fourth, second, third |
|
4179 | fourth, second, third | |
4175 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' |
|
4180 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' | |
4176 | abc |
|
4181 | abc | |
4177 |
|
4182 | |||
4178 | Test splitlines |
|
4183 | Test splitlines | |
4179 |
|
4184 | |||
4180 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" |
|
4185 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" | |
4181 | @ foo Modify, add, remove, rename |
|
4186 | @ foo Modify, add, remove, rename | |
4182 | | |
|
4187 | | | |
4183 | o foo future |
|
4188 | o foo future | |
4184 | | |
|
4189 | | | |
4185 | o foo third |
|
4190 | o foo third | |
4186 | | |
|
4191 | | | |
4187 | o foo second |
|
4192 | o foo second | |
4188 |
|
4193 | |||
4189 | o foo merge |
|
4194 | o foo merge | |
4190 | |\ |
|
4195 | |\ | |
4191 | | o foo new head |
|
4196 | | o foo new head | |
4192 | | | |
|
4197 | | | | |
4193 | o | foo new branch |
|
4198 | o | foo new branch | |
4194 | |/ |
|
4199 | |/ | |
4195 | o foo no user, no domain |
|
4200 | o foo no user, no domain | |
4196 | | |
|
4201 | | | |
4197 | o foo no person |
|
4202 | o foo no person | |
4198 | | |
|
4203 | | | |
4199 | o foo other 1 |
|
4204 | o foo other 1 | |
4200 | | foo other 2 |
|
4205 | | foo other 2 | |
4201 | | foo |
|
4206 | | foo | |
4202 | | foo other 3 |
|
4207 | | foo other 3 | |
4203 | o foo line 1 |
|
4208 | o foo line 1 | |
4204 | foo line 2 |
|
4209 | foo line 2 | |
4205 |
|
4210 | |||
4206 | $ hg log -R a -r0 -T '{desc|splitlines}\n' |
|
4211 | $ hg log -R a -r0 -T '{desc|splitlines}\n' | |
4207 | line 1 line 2 |
|
4212 | line 1 line 2 | |
4208 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' |
|
4213 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' | |
4209 | line 1|line 2 |
|
4214 | line 1|line 2 | |
4210 |
|
4215 | |||
4211 | Test startswith |
|
4216 | Test startswith | |
4212 | $ hg log -Gv -R a --template "{startswith(desc)}" |
|
4217 | $ hg log -Gv -R a --template "{startswith(desc)}" | |
4213 | hg: parse error: startswith expects two arguments |
|
4218 | hg: parse error: startswith expects two arguments | |
4214 | [255] |
|
4219 | [255] | |
4215 |
|
4220 | |||
4216 | $ hg log -Gv -R a --template "{startswith('line', desc)}" |
|
4221 | $ hg log -Gv -R a --template "{startswith('line', desc)}" | |
4217 | @ |
|
4222 | @ | |
4218 | | |
|
4223 | | | |
4219 | o |
|
4224 | o | |
4220 | | |
|
4225 | | | |
4221 | o |
|
4226 | o | |
4222 | | |
|
4227 | | | |
4223 | o |
|
4228 | o | |
4224 |
|
4229 | |||
4225 | o |
|
4230 | o | |
4226 | |\ |
|
4231 | |\ | |
4227 | | o |
|
4232 | | o | |
4228 | | | |
|
4233 | | | | |
4229 | o | |
|
4234 | o | | |
4230 | |/ |
|
4235 | |/ | |
4231 | o |
|
4236 | o | |
4232 | | |
|
4237 | | | |
4233 | o |
|
4238 | o | |
4234 | | |
|
4239 | | | |
4235 | o |
|
4240 | o | |
4236 | | |
|
4241 | | | |
4237 | o line 1 |
|
4242 | o line 1 | |
4238 | line 2 |
|
4243 | line 2 | |
4239 |
|
4244 | |||
4240 | Test bad template with better error message |
|
4245 | Test bad template with better error message | |
4241 |
|
4246 | |||
4242 | $ hg log -Gv -R a --template '{desc|user()}' |
|
4247 | $ hg log -Gv -R a --template '{desc|user()}' | |
4243 | hg: parse error: expected a symbol, got 'func' |
|
4248 | hg: parse error: expected a symbol, got 'func' | |
4244 | [255] |
|
4249 | [255] | |
4245 |
|
4250 | |||
4246 | Test word function (including index out of bounds graceful failure) |
|
4251 | Test word function (including index out of bounds graceful failure) | |
4247 |
|
4252 | |||
4248 | $ hg log -Gv -R a --template "{word('1', desc)}" |
|
4253 | $ hg log -Gv -R a --template "{word('1', desc)}" | |
4249 | @ add, |
|
4254 | @ add, | |
4250 | | |
|
4255 | | | |
4251 | o |
|
4256 | o | |
4252 | | |
|
4257 | | | |
4253 | o |
|
4258 | o | |
4254 | | |
|
4259 | | | |
4255 | o |
|
4260 | o | |
4256 |
|
4261 | |||
4257 | o |
|
4262 | o | |
4258 | |\ |
|
4263 | |\ | |
4259 | | o head |
|
4264 | | o head | |
4260 | | | |
|
4265 | | | | |
4261 | o | branch |
|
4266 | o | branch | |
4262 | |/ |
|
4267 | |/ | |
4263 | o user, |
|
4268 | o user, | |
4264 | | |
|
4269 | | | |
4265 | o person |
|
4270 | o person | |
4266 | | |
|
4271 | | | |
4267 | o 1 |
|
4272 | o 1 | |
4268 | | |
|
4273 | | | |
4269 | o 1 |
|
4274 | o 1 | |
4270 |
|
4275 | |||
4271 |
|
4276 | |||
4272 | Test word third parameter used as splitter |
|
4277 | Test word third parameter used as splitter | |
4273 |
|
4278 | |||
4274 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" |
|
4279 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" | |
4275 | @ M |
|
4280 | @ M | |
4276 | | |
|
4281 | | | |
4277 | o future |
|
4282 | o future | |
4278 | | |
|
4283 | | | |
4279 | o third |
|
4284 | o third | |
4280 | | |
|
4285 | | | |
4281 | o sec |
|
4286 | o sec | |
4282 |
|
4287 | |||
4283 | o merge |
|
4288 | o merge | |
4284 | |\ |
|
4289 | |\ | |
4285 | | o new head |
|
4290 | | o new head | |
4286 | | | |
|
4291 | | | | |
4287 | o | new branch |
|
4292 | o | new branch | |
4288 | |/ |
|
4293 | |/ | |
4289 | o n |
|
4294 | o n | |
4290 | | |
|
4295 | | | |
4291 | o n |
|
4296 | o n | |
4292 | | |
|
4297 | | | |
4293 | o |
|
4298 | o | |
4294 | | |
|
4299 | | | |
4295 | o line 1 |
|
4300 | o line 1 | |
4296 | line 2 |
|
4301 | line 2 | |
4297 |
|
4302 | |||
4298 | Test word error messages for not enough and too many arguments |
|
4303 | Test word error messages for not enough and too many arguments | |
4299 |
|
4304 | |||
4300 | $ hg log -Gv -R a --template "{word('0')}" |
|
4305 | $ hg log -Gv -R a --template "{word('0')}" | |
4301 | hg: parse error: word expects two or three arguments, got 1 |
|
4306 | hg: parse error: word expects two or three arguments, got 1 | |
4302 | [255] |
|
4307 | [255] | |
4303 |
|
4308 | |||
4304 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" |
|
4309 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" | |
4305 | hg: parse error: word expects two or three arguments, got 7 |
|
4310 | hg: parse error: word expects two or three arguments, got 7 | |
4306 | [255] |
|
4311 | [255] | |
4307 |
|
4312 | |||
4308 | Test word for integer literal |
|
4313 | Test word for integer literal | |
4309 |
|
4314 | |||
4310 | $ hg log -R a --template "{word(2, desc)}\n" -r0 |
|
4315 | $ hg log -R a --template "{word(2, desc)}\n" -r0 | |
4311 | line |
|
4316 | line | |
4312 |
|
4317 | |||
4313 | Test word for invalid numbers |
|
4318 | Test word for invalid numbers | |
4314 |
|
4319 | |||
4315 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
4320 | $ hg log -Gv -R a --template "{word('a', desc)}" | |
4316 | hg: parse error: word expects an integer index |
|
4321 | hg: parse error: word expects an integer index | |
4317 | [255] |
|
4322 | [255] | |
4318 |
|
4323 | |||
4319 | Test word for out of range |
|
4324 | Test word for out of range | |
4320 |
|
4325 | |||
4321 | $ hg log -R a --template "{word(10000, desc)}" |
|
4326 | $ hg log -R a --template "{word(10000, desc)}" | |
4322 | $ hg log -R a --template "{word(-10000, desc)}" |
|
4327 | $ hg log -R a --template "{word(-10000, desc)}" | |
4323 |
|
4328 | |||
4324 | Test indent and not adding to empty lines |
|
4329 | Test indent and not adding to empty lines | |
4325 |
|
4330 | |||
4326 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a |
|
4331 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a | |
4327 | ----- |
|
4332 | ----- | |
4328 | > line 1 |
|
4333 | > line 1 | |
4329 | >> line 2 |
|
4334 | >> line 2 | |
4330 | ----- |
|
4335 | ----- | |
4331 | > other 1 |
|
4336 | > other 1 | |
4332 | >> other 2 |
|
4337 | >> other 2 | |
4333 |
|
4338 | |||
4334 | >> other 3 |
|
4339 | >> other 3 | |
4335 |
|
4340 | |||
4336 | Test with non-strings like dates |
|
4341 | Test with non-strings like dates | |
4337 |
|
4342 | |||
4338 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a |
|
4343 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a | |
4339 | 1200000.00 |
|
4344 | 1200000.00 | |
4340 | 1300000.00 |
|
4345 | 1300000.00 | |
4341 |
|
4346 | |||
4342 | Test broken string escapes: |
|
4347 | Test broken string escapes: | |
4343 |
|
4348 | |||
4344 | $ hg log -T "bogus\\" -R a |
|
4349 | $ hg log -T "bogus\\" -R a | |
4345 | hg: parse error: trailing \ in string |
|
4350 | hg: parse error: trailing \ in string | |
4346 | [255] |
|
4351 | [255] | |
4347 | $ hg log -T "\\xy" -R a |
|
4352 | $ hg log -T "\\xy" -R a | |
4348 | hg: parse error: invalid \x escape |
|
4353 | hg: parse error: invalid \x escape | |
4349 | [255] |
|
4354 | [255] | |
4350 |
|
4355 | |||
4351 | json filter should escape HTML tags so that the output can be embedded in hgweb: |
|
4356 | json filter should escape HTML tags so that the output can be embedded in hgweb: | |
4352 |
|
4357 | |||
4353 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 |
|
4358 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 | |
4354 | "\u003cfoo@example.org\u003e" |
|
4359 | "\u003cfoo@example.org\u003e" | |
4355 |
|
4360 | |||
4356 | Templater supports aliases of symbol and func() styles: |
|
4361 | Templater supports aliases of symbol and func() styles: | |
4357 |
|
4362 | |||
4358 | $ hg clone -q a aliases |
|
4363 | $ hg clone -q a aliases | |
4359 | $ cd aliases |
|
4364 | $ cd aliases | |
4360 | $ cat <<EOF >> .hg/hgrc |
|
4365 | $ cat <<EOF >> .hg/hgrc | |
4361 | > [templatealias] |
|
4366 | > [templatealias] | |
4362 | > r = rev |
|
4367 | > r = rev | |
4363 | > rn = "{r}:{node|short}" |
|
4368 | > rn = "{r}:{node|short}" | |
4364 | > status(c, files) = files % "{c} {file}\n" |
|
4369 | > status(c, files) = files % "{c} {file}\n" | |
4365 | > utcdate(d) = localdate(d, "UTC") |
|
4370 | > utcdate(d) = localdate(d, "UTC") | |
4366 | > EOF |
|
4371 | > EOF | |
4367 |
|
4372 | |||
4368 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' |
|
4373 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' | |
4369 | (template |
|
4374 | (template | |
4370 | (symbol 'rn') |
|
4375 | (symbol 'rn') | |
4371 | (string ' ') |
|
4376 | (string ' ') | |
4372 | (| |
|
4377 | (| | |
4373 | (func |
|
4378 | (func | |
4374 | (symbol 'utcdate') |
|
4379 | (symbol 'utcdate') | |
4375 | (symbol 'date')) |
|
4380 | (symbol 'date')) | |
4376 | (symbol 'isodate')) |
|
4381 | (symbol 'isodate')) | |
4377 | (string '\n')) |
|
4382 | (string '\n')) | |
4378 | * expanded: |
|
4383 | * expanded: | |
4379 | (template |
|
4384 | (template | |
4380 | (template |
|
4385 | (template | |
4381 | (symbol 'rev') |
|
4386 | (symbol 'rev') | |
4382 | (string ':') |
|
4387 | (string ':') | |
4383 | (| |
|
4388 | (| | |
4384 | (symbol 'node') |
|
4389 | (symbol 'node') | |
4385 | (symbol 'short'))) |
|
4390 | (symbol 'short'))) | |
4386 | (string ' ') |
|
4391 | (string ' ') | |
4387 | (| |
|
4392 | (| | |
4388 | (func |
|
4393 | (func | |
4389 | (symbol 'localdate') |
|
4394 | (symbol 'localdate') | |
4390 | (list |
|
4395 | (list | |
4391 | (symbol 'date') |
|
4396 | (symbol 'date') | |
4392 | (string 'UTC'))) |
|
4397 | (string 'UTC'))) | |
4393 | (symbol 'isodate')) |
|
4398 | (symbol 'isodate')) | |
4394 | (string '\n')) |
|
4399 | (string '\n')) | |
4395 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4400 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4396 |
|
4401 | |||
4397 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' |
|
4402 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' | |
4398 | (template |
|
4403 | (template | |
4399 | (func |
|
4404 | (func | |
4400 | (symbol 'status') |
|
4405 | (symbol 'status') | |
4401 | (list |
|
4406 | (list | |
4402 | (string 'A') |
|
4407 | (string 'A') | |
4403 | (symbol 'file_adds')))) |
|
4408 | (symbol 'file_adds')))) | |
4404 | * expanded: |
|
4409 | * expanded: | |
4405 | (template |
|
4410 | (template | |
4406 | (% |
|
4411 | (% | |
4407 | (symbol 'file_adds') |
|
4412 | (symbol 'file_adds') | |
4408 | (template |
|
4413 | (template | |
4409 | (string 'A') |
|
4414 | (string 'A') | |
4410 | (string ' ') |
|
4415 | (string ' ') | |
4411 | (symbol 'file') |
|
4416 | (symbol 'file') | |
4412 | (string '\n')))) |
|
4417 | (string '\n')))) | |
4413 | A a |
|
4418 | A a | |
4414 |
|
4419 | |||
4415 | A unary function alias can be called as a filter: |
|
4420 | A unary function alias can be called as a filter: | |
4416 |
|
4421 | |||
4417 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' |
|
4422 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' | |
4418 | (template |
|
4423 | (template | |
4419 | (| |
|
4424 | (| | |
4420 | (| |
|
4425 | (| | |
4421 | (symbol 'date') |
|
4426 | (symbol 'date') | |
4422 | (symbol 'utcdate')) |
|
4427 | (symbol 'utcdate')) | |
4423 | (symbol 'isodate')) |
|
4428 | (symbol 'isodate')) | |
4424 | (string '\n')) |
|
4429 | (string '\n')) | |
4425 | * expanded: |
|
4430 | * expanded: | |
4426 | (template |
|
4431 | (template | |
4427 | (| |
|
4432 | (| | |
4428 | (func |
|
4433 | (func | |
4429 | (symbol 'localdate') |
|
4434 | (symbol 'localdate') | |
4430 | (list |
|
4435 | (list | |
4431 | (symbol 'date') |
|
4436 | (symbol 'date') | |
4432 | (string 'UTC'))) |
|
4437 | (string 'UTC'))) | |
4433 | (symbol 'isodate')) |
|
4438 | (symbol 'isodate')) | |
4434 | (string '\n')) |
|
4439 | (string '\n')) | |
4435 | 1970-01-12 13:46 +0000 |
|
4440 | 1970-01-12 13:46 +0000 | |
4436 |
|
4441 | |||
4437 | Aliases should be applied only to command arguments and templates in hgrc. |
|
4442 | Aliases should be applied only to command arguments and templates in hgrc. | |
4438 | Otherwise, our stock styles and web templates could be corrupted: |
|
4443 | Otherwise, our stock styles and web templates could be corrupted: | |
4439 |
|
4444 | |||
4440 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' |
|
4445 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' | |
4441 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4446 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4442 |
|
4447 | |||
4443 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' |
|
4448 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' | |
4444 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4449 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4445 |
|
4450 | |||
4446 | $ cat <<EOF > tmpl |
|
4451 | $ cat <<EOF > tmpl | |
4447 | > changeset = 'nothing expanded:{rn}\n' |
|
4452 | > changeset = 'nothing expanded:{rn}\n' | |
4448 | > EOF |
|
4453 | > EOF | |
4449 | $ hg log -r0 --style ./tmpl |
|
4454 | $ hg log -r0 --style ./tmpl | |
4450 | nothing expanded: |
|
4455 | nothing expanded: | |
4451 |
|
4456 | |||
4452 | Aliases in formatter: |
|
4457 | Aliases in formatter: | |
4453 |
|
4458 | |||
4454 | $ hg branches -T '{pad(branch, 7)} {rn}\n' |
|
4459 | $ hg branches -T '{pad(branch, 7)} {rn}\n' | |
4455 | default 6:d41e714fe50d |
|
4460 | default 6:d41e714fe50d | |
4456 | foo 4:bbe44766e73d |
|
4461 | foo 4:bbe44766e73d | |
4457 |
|
4462 | |||
4458 | Aliases should honor HGPLAIN: |
|
4463 | Aliases should honor HGPLAIN: | |
4459 |
|
4464 | |||
4460 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' |
|
4465 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' | |
4461 | nothing expanded: |
|
4466 | nothing expanded: | |
4462 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' |
|
4467 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' | |
4463 | 0:1e4e1b8f71e0 |
|
4468 | 0:1e4e1b8f71e0 | |
4464 |
|
4469 | |||
4465 | Unparsable alias: |
|
4470 | Unparsable alias: | |
4466 |
|
4471 | |||
4467 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' |
|
4472 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' | |
4468 | (template |
|
4473 | (template | |
4469 | (symbol 'bad')) |
|
4474 | (symbol 'bad')) | |
4470 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
4475 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4471 | [255] |
|
4476 | [255] | |
4472 | $ hg log --config templatealias.bad='x(' -T '{bad}' |
|
4477 | $ hg log --config templatealias.bad='x(' -T '{bad}' | |
4473 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
4478 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4474 | [255] |
|
4479 | [255] | |
4475 |
|
4480 | |||
4476 | $ cd .. |
|
4481 | $ cd .. | |
4477 |
|
4482 | |||
4478 | Set up repository for non-ascii encoding tests: |
|
4483 | Set up repository for non-ascii encoding tests: | |
4479 |
|
4484 | |||
4480 | $ hg init nonascii |
|
4485 | $ hg init nonascii | |
4481 | $ cd nonascii |
|
4486 | $ cd nonascii | |
4482 | $ $PYTHON <<EOF |
|
4487 | $ $PYTHON <<EOF | |
4483 | > open('latin1', 'w').write('\xe9') |
|
4488 | > open('latin1', 'w').write('\xe9') | |
4484 | > open('utf-8', 'w').write('\xc3\xa9') |
|
4489 | > open('utf-8', 'w').write('\xc3\xa9') | |
4485 | > EOF |
|
4490 | > EOF | |
4486 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
|
4491 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` | |
4487 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
|
4492 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 | |
4488 |
|
4493 | |||
4489 | json filter should try round-trip conversion to utf-8: |
|
4494 | json filter should try round-trip conversion to utf-8: | |
4490 |
|
4495 | |||
4491 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 |
|
4496 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 | |
4492 | "\u00e9" |
|
4497 | "\u00e9" | |
4493 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 |
|
4498 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 | |
4494 | "non-ascii branch: \u00e9" |
|
4499 | "non-ascii branch: \u00e9" | |
4495 |
|
4500 | |||
4496 | json filter takes input as utf-8b: |
|
4501 | json filter takes input as utf-8b: | |
4497 |
|
4502 | |||
4498 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
|
4503 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 | |
4499 | "\u00e9" |
|
4504 | "\u00e9" | |
4500 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 |
|
4505 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 | |
4501 | "\udce9" |
|
4506 | "\udce9" | |
4502 |
|
4507 | |||
4503 | utf8 filter: |
|
4508 | utf8 filter: | |
4504 |
|
4509 | |||
4505 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 |
|
4510 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 | |
4506 | round-trip: c3a9 |
|
4511 | round-trip: c3a9 | |
4507 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
4512 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4508 | decoded: c3a9 |
|
4513 | decoded: c3a9 | |
4509 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
4514 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4510 | abort: decoding near * (glob) |
|
4515 | abort: decoding near * (glob) | |
4511 | [255] |
|
4516 | [255] | |
4512 | $ hg log -T "invalid type: {rev|utf8}\n" -r0 |
|
4517 | $ hg log -T "invalid type: {rev|utf8}\n" -r0 | |
4513 | abort: template filter 'utf8' is not compatible with keyword 'rev' |
|
4518 | abort: template filter 'utf8' is not compatible with keyword 'rev' | |
4514 | [255] |
|
4519 | [255] | |
4515 |
|
4520 | |||
4516 | pad width: |
|
4521 | pad width: | |
4517 |
|
4522 | |||
4518 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" |
|
4523 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" | |
4519 | \xc3\xa9- (esc) |
|
4524 | \xc3\xa9- (esc) | |
4520 |
|
4525 | |||
4521 | $ cd .. |
|
4526 | $ cd .. | |
4522 |
|
4527 | |||
4523 | Test that template function in extension is registered as expected |
|
4528 | Test that template function in extension is registered as expected | |
4524 |
|
4529 | |||
4525 | $ cd a |
|
4530 | $ cd a | |
4526 |
|
4531 | |||
4527 | $ cat <<EOF > $TESTTMP/customfunc.py |
|
4532 | $ cat <<EOF > $TESTTMP/customfunc.py | |
4528 | > from mercurial import registrar |
|
4533 | > from mercurial import registrar | |
4529 | > |
|
4534 | > | |
4530 | > templatefunc = registrar.templatefunc() |
|
4535 | > templatefunc = registrar.templatefunc() | |
4531 | > |
|
4536 | > | |
4532 | > @templatefunc('custom()') |
|
4537 | > @templatefunc('custom()') | |
4533 | > def custom(context, mapping, args): |
|
4538 | > def custom(context, mapping, args): | |
4534 | > return 'custom' |
|
4539 | > return 'custom' | |
4535 | > EOF |
|
4540 | > EOF | |
4536 | $ cat <<EOF > .hg/hgrc |
|
4541 | $ cat <<EOF > .hg/hgrc | |
4537 | > [extensions] |
|
4542 | > [extensions] | |
4538 | > customfunc = $TESTTMP/customfunc.py |
|
4543 | > customfunc = $TESTTMP/customfunc.py | |
4539 | > EOF |
|
4544 | > EOF | |
4540 |
|
4545 | |||
4541 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true |
|
4546 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true | |
4542 | custom |
|
4547 | custom | |
4543 |
|
4548 | |||
4544 | $ cd .. |
|
4549 | $ cd .. | |
4545 |
|
4550 | |||
4546 | Test 'graphwidth' in 'hg log' on various topologies. The key here is that the |
|
4551 | Test 'graphwidth' in 'hg log' on various topologies. The key here is that the | |
4547 | printed graphwidths 3, 5, 7, etc. should all line up in their respective |
|
4552 | printed graphwidths 3, 5, 7, etc. should all line up in their respective | |
4548 | columns. We don't care about other aspects of the graph rendering here. |
|
4553 | columns. We don't care about other aspects of the graph rendering here. | |
4549 |
|
4554 | |||
4550 | $ hg init graphwidth |
|
4555 | $ hg init graphwidth | |
4551 | $ cd graphwidth |
|
4556 | $ cd graphwidth | |
4552 |
|
4557 | |||
4553 | $ wrappabletext="a a a a a a a a a a a a" |
|
4558 | $ wrappabletext="a a a a a a a a a a a a" | |
4554 |
|
4559 | |||
4555 | $ printf "first\n" > file |
|
4560 | $ printf "first\n" > file | |
4556 | $ hg add file |
|
4561 | $ hg add file | |
4557 | $ hg commit -m "$wrappabletext" |
|
4562 | $ hg commit -m "$wrappabletext" | |
4558 |
|
4563 | |||
4559 | $ printf "first\nsecond\n" > file |
|
4564 | $ printf "first\nsecond\n" > file | |
4560 | $ hg commit -m "$wrappabletext" |
|
4565 | $ hg commit -m "$wrappabletext" | |
4561 |
|
4566 | |||
4562 | $ hg checkout 0 |
|
4567 | $ hg checkout 0 | |
4563 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4568 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4564 | $ printf "third\nfirst\n" > file |
|
4569 | $ printf "third\nfirst\n" > file | |
4565 | $ hg commit -m "$wrappabletext" |
|
4570 | $ hg commit -m "$wrappabletext" | |
4566 | created new head |
|
4571 | created new head | |
4567 |
|
4572 | |||
4568 | $ hg merge |
|
4573 | $ hg merge | |
4569 | merging file |
|
4574 | merging file | |
4570 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
4575 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
4571 | (branch merge, don't forget to commit) |
|
4576 | (branch merge, don't forget to commit) | |
4572 |
|
4577 | |||
4573 | $ hg log --graph -T "{graphwidth}" |
|
4578 | $ hg log --graph -T "{graphwidth}" | |
4574 | @ 3 |
|
4579 | @ 3 | |
4575 | | |
|
4580 | | | |
4576 | | @ 5 |
|
4581 | | @ 5 | |
4577 | |/ |
|
4582 | |/ | |
4578 | o 3 |
|
4583 | o 3 | |
4579 |
|
4584 | |||
4580 | $ hg commit -m "$wrappabletext" |
|
4585 | $ hg commit -m "$wrappabletext" | |
4581 |
|
4586 | |||
4582 | $ hg log --graph -T "{graphwidth}" |
|
4587 | $ hg log --graph -T "{graphwidth}" | |
4583 | @ 5 |
|
4588 | @ 5 | |
4584 | |\ |
|
4589 | |\ | |
4585 | | o 5 |
|
4590 | | o 5 | |
4586 | | | |
|
4591 | | | | |
4587 | o | 5 |
|
4592 | o | 5 | |
4588 | |/ |
|
4593 | |/ | |
4589 | o 3 |
|
4594 | o 3 | |
4590 |
|
4595 | |||
4591 |
|
4596 | |||
4592 | $ hg checkout 0 |
|
4597 | $ hg checkout 0 | |
4593 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4598 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4594 | $ printf "third\nfirst\nsecond\n" > file |
|
4599 | $ printf "third\nfirst\nsecond\n" > file | |
4595 | $ hg commit -m "$wrappabletext" |
|
4600 | $ hg commit -m "$wrappabletext" | |
4596 | created new head |
|
4601 | created new head | |
4597 |
|
4602 | |||
4598 | $ hg log --graph -T "{graphwidth}" |
|
4603 | $ hg log --graph -T "{graphwidth}" | |
4599 | @ 3 |
|
4604 | @ 3 | |
4600 | | |
|
4605 | | | |
4601 | | o 7 |
|
4606 | | o 7 | |
4602 | | |\ |
|
4607 | | |\ | |
4603 | +---o 7 |
|
4608 | +---o 7 | |
4604 | | | |
|
4609 | | | | |
4605 | | o 5 |
|
4610 | | o 5 | |
4606 | |/ |
|
4611 | |/ | |
4607 | o 3 |
|
4612 | o 3 | |
4608 |
|
4613 | |||
4609 |
|
4614 | |||
4610 | $ hg log --graph -T "{graphwidth}" -r 3 |
|
4615 | $ hg log --graph -T "{graphwidth}" -r 3 | |
4611 | o 5 |
|
4616 | o 5 | |
4612 | |\ |
|
4617 | |\ | |
4613 | ~ ~ |
|
4618 | ~ ~ | |
4614 |
|
4619 | |||
4615 | $ hg log --graph -T "{graphwidth}" -r 1 |
|
4620 | $ hg log --graph -T "{graphwidth}" -r 1 | |
4616 | o 3 |
|
4621 | o 3 | |
4617 | | |
|
4622 | | | |
4618 | ~ |
|
4623 | ~ | |
4619 |
|
4624 | |||
4620 | $ hg merge |
|
4625 | $ hg merge | |
4621 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4626 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4622 | (branch merge, don't forget to commit) |
|
4627 | (branch merge, don't forget to commit) | |
4623 | $ hg commit -m "$wrappabletext" |
|
4628 | $ hg commit -m "$wrappabletext" | |
4624 |
|
4629 | |||
4625 | $ printf "seventh\n" >> file |
|
4630 | $ printf "seventh\n" >> file | |
4626 | $ hg commit -m "$wrappabletext" |
|
4631 | $ hg commit -m "$wrappabletext" | |
4627 |
|
4632 | |||
4628 | $ hg log --graph -T "{graphwidth}" |
|
4633 | $ hg log --graph -T "{graphwidth}" | |
4629 | @ 3 |
|
4634 | @ 3 | |
4630 | | |
|
4635 | | | |
4631 | o 5 |
|
4636 | o 5 | |
4632 | |\ |
|
4637 | |\ | |
4633 | | o 5 |
|
4638 | | o 5 | |
4634 | | | |
|
4639 | | | | |
4635 | o | 7 |
|
4640 | o | 7 | |
4636 | |\ \ |
|
4641 | |\ \ | |
4637 | | o | 7 |
|
4642 | | o | 7 | |
4638 | | |/ |
|
4643 | | |/ | |
4639 | o / 5 |
|
4644 | o / 5 | |
4640 | |/ |
|
4645 | |/ | |
4641 | o 3 |
|
4646 | o 3 | |
4642 |
|
4647 | |||
4643 |
|
4648 | |||
4644 | The point of graphwidth is to allow wrapping that accounts for the space taken |
|
4649 | The point of graphwidth is to allow wrapping that accounts for the space taken | |
4645 | by the graph. |
|
4650 | by the graph. | |
4646 |
|
4651 | |||
4647 | $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}" |
|
4652 | $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}" | |
4648 | @ a a a a |
|
4653 | @ a a a a | |
4649 | | a a a a |
|
4654 | | a a a a | |
4650 | | a a a a |
|
4655 | | a a a a | |
4651 | o a a a |
|
4656 | o a a a | |
4652 | |\ a a a |
|
4657 | |\ a a a | |
4653 | | | a a a |
|
4658 | | | a a a | |
4654 | | | a a a |
|
4659 | | | a a a | |
4655 | | o a a a |
|
4660 | | o a a a | |
4656 | | | a a a |
|
4661 | | | a a a | |
4657 | | | a a a |
|
4662 | | | a a a | |
4658 | | | a a a |
|
4663 | | | a a a | |
4659 | o | a a |
|
4664 | o | a a | |
4660 | |\ \ a a |
|
4665 | |\ \ a a | |
4661 | | | | a a |
|
4666 | | | | a a | |
4662 | | | | a a |
|
4667 | | | | a a | |
4663 | | | | a a |
|
4668 | | | | a a | |
4664 | | | | a a |
|
4669 | | | | a a | |
4665 | | o | a a |
|
4670 | | o | a a | |
4666 | | |/ a a |
|
4671 | | |/ a a | |
4667 | | | a a |
|
4672 | | | a a | |
4668 | | | a a |
|
4673 | | | a a | |
4669 | | | a a |
|
4674 | | | a a | |
4670 | | | a a |
|
4675 | | | a a | |
4671 | o | a a a |
|
4676 | o | a a a | |
4672 | |/ a a a |
|
4677 | |/ a a a | |
4673 | | a a a |
|
4678 | | a a a | |
4674 | | a a a |
|
4679 | | a a a | |
4675 | o a a a a |
|
4680 | o a a a a | |
4676 | a a a a |
|
4681 | a a a a | |
4677 | a a a a |
|
4682 | a a a a | |
4678 |
|
4683 | |||
4679 | Something tricky happens when there are elided nodes; the next drawn row of |
|
4684 | Something tricky happens when there are elided nodes; the next drawn row of | |
4680 | edges can be more than one column wider, but the graph width only increases by |
|
4685 | edges can be more than one column wider, but the graph width only increases by | |
4681 | one column. The remaining columns are added in between the nodes. |
|
4686 | one column. The remaining columns are added in between the nodes. | |
4682 |
|
4687 | |||
4683 | $ hg log --graph -T "{graphwidth}" -r "0|2|4|5" |
|
4688 | $ hg log --graph -T "{graphwidth}" -r "0|2|4|5" | |
4684 | o 5 |
|
4689 | o 5 | |
4685 | |\ |
|
4690 | |\ | |
4686 | | \ |
|
4691 | | \ | |
4687 | | :\ |
|
4692 | | :\ | |
4688 | o : : 7 |
|
4693 | o : : 7 | |
4689 | :/ / |
|
4694 | :/ / | |
4690 | : o 5 |
|
4695 | : o 5 | |
4691 | :/ |
|
4696 | :/ | |
4692 | o 3 |
|
4697 | o 3 | |
4693 |
|
4698 | |||
4694 |
|
4699 | |||
4695 | $ cd .. |
|
4700 | $ cd .. | |
4696 |
|
4701 |
General Comments 0
You need to be logged in to leave comments.
Login now