##// END OF EJS Templates
test-command-template: rewrite recursion tests by using a map file...
Yuya Nishihara -
r32874:dddba6f3 default
parent child Browse files
Show More
@@ -1,4238 +1,4244 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 Keyword arguments:
137 Keyword arguments:
138
138
139 $ hg debugtemplate -r0 -v '{foo=bar|baz}'
139 $ hg debugtemplate -r0 -v '{foo=bar|baz}'
140 (template
140 (template
141 (keyvalue
141 (keyvalue
142 ('symbol', 'foo')
142 ('symbol', 'foo')
143 (|
143 (|
144 ('symbol', 'bar')
144 ('symbol', 'bar')
145 ('symbol', 'baz'))))
145 ('symbol', 'baz'))))
146 hg: parse error: can't use a key-value pair in this context
146 hg: parse error: can't use a key-value pair in this context
147 [255]
147 [255]
148
148
149 $ hg debugtemplate '{pad("foo", width=10, left=true)}\n'
149 $ hg debugtemplate '{pad("foo", width=10, left=true)}\n'
150 foo
150 foo
151
151
152 Call function which takes named arguments by filter syntax:
152 Call function which takes named arguments by filter syntax:
153
153
154 $ hg debugtemplate '{" "|separate}'
154 $ hg debugtemplate '{" "|separate}'
155 $ hg debugtemplate '{("not", "an", "argument", "list")|separate}'
155 $ hg debugtemplate '{("not", "an", "argument", "list")|separate}'
156 hg: parse error: unknown method 'list'
156 hg: parse error: unknown method 'list'
157 [255]
157 [255]
158
158
159 Second branch starting at nullrev:
159 Second branch starting at nullrev:
160
160
161 $ hg update null
161 $ hg update null
162 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
162 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
163 $ echo second > second
163 $ echo second > second
164 $ hg add second
164 $ hg add second
165 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
165 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
166 created new head
166 created new head
167
167
168 $ echo third > third
168 $ echo third > third
169 $ hg add third
169 $ hg add third
170 $ hg mv second fourth
170 $ hg mv second fourth
171 $ hg commit -m third -d "2020-01-01 10:01"
171 $ hg commit -m third -d "2020-01-01 10:01"
172
172
173 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
173 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
174 fourth (second)
174 fourth (second)
175 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
175 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
176 second -> fourth
176 second -> fourth
177 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
177 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
178 8 t
178 8 t
179 7 f
179 7 f
180
180
181 Working-directory revision has special identifiers, though they are still
181 Working-directory revision has special identifiers, though they are still
182 experimental:
182 experimental:
183
183
184 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
184 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
185 2147483647:ffffffffffffffffffffffffffffffffffffffff
185 2147483647:ffffffffffffffffffffffffffffffffffffffff
186
186
187 Some keywords are invalid for working-directory revision, but they should
187 Some keywords are invalid for working-directory revision, but they should
188 never cause crash:
188 never cause crash:
189
189
190 $ hg log -r 'wdir()' -T '{manifest}\n'
190 $ hg log -r 'wdir()' -T '{manifest}\n'
191
191
192
192
193 Quoting for ui.logtemplate
193 Quoting for ui.logtemplate
194
194
195 $ hg tip --config "ui.logtemplate={rev}\n"
195 $ hg tip --config "ui.logtemplate={rev}\n"
196 8
196 8
197 $ hg tip --config "ui.logtemplate='{rev}\n'"
197 $ hg tip --config "ui.logtemplate='{rev}\n'"
198 8
198 8
199 $ hg tip --config 'ui.logtemplate="{rev}\n"'
199 $ hg tip --config 'ui.logtemplate="{rev}\n"'
200 8
200 8
201 $ hg tip --config 'ui.logtemplate=n{rev}\n'
201 $ hg tip --config 'ui.logtemplate=n{rev}\n'
202 n8
202 n8
203
203
204 Make sure user/global hgrc does not affect tests
204 Make sure user/global hgrc does not affect tests
205
205
206 $ echo '[ui]' > .hg/hgrc
206 $ echo '[ui]' > .hg/hgrc
207 $ echo 'logtemplate =' >> .hg/hgrc
207 $ echo 'logtemplate =' >> .hg/hgrc
208 $ echo 'style =' >> .hg/hgrc
208 $ echo 'style =' >> .hg/hgrc
209
209
210 Add some simple styles to settings
210 Add some simple styles to settings
211
211
212 $ echo '[templates]' >> .hg/hgrc
212 $ echo '[templates]' >> .hg/hgrc
213 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
213 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
214 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
214 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
215
215
216 $ hg log -l1 -Tsimple
216 $ hg log -l1 -Tsimple
217 8
217 8
218 $ hg log -l1 -Tsimple2
218 $ hg log -l1 -Tsimple2
219 8
219 8
220
220
221 Test templates and style maps in files:
221 Test templates and style maps in files:
222
222
223 $ echo "{rev}" > tmpl
223 $ echo "{rev}" > tmpl
224 $ hg log -l1 -T./tmpl
224 $ hg log -l1 -T./tmpl
225 8
225 8
226 $ hg log -l1 -Tblah/blah
226 $ hg log -l1 -Tblah/blah
227 blah/blah (no-eol)
227 blah/blah (no-eol)
228
228
229 $ printf 'changeset = "{rev}\\n"\n' > map-simple
229 $ printf 'changeset = "{rev}\\n"\n' > map-simple
230 $ hg log -l1 -T./map-simple
230 $ hg log -l1 -T./map-simple
231 8
231 8
232
232
233 Test template map inheritance
233 Test template map inheritance
234
234
235 $ echo "__base__ = map-cmdline.default" > map-simple
235 $ echo "__base__ = map-cmdline.default" > map-simple
236 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
236 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
237 $ hg log -l1 -T./map-simple
237 $ hg log -l1 -T./map-simple
238 changeset: ***8***
238 changeset: ***8***
239 tag: tip
239 tag: tip
240 user: test
240 user: test
241 date: Wed Jan 01 10:01:00 2020 +0000
241 date: Wed Jan 01 10:01:00 2020 +0000
242 summary: third
242 summary: third
243
243
244
244
245 Template should precede style option
245 Template should precede style option
246
246
247 $ hg log -l1 --style default -T '{rev}\n'
247 $ hg log -l1 --style default -T '{rev}\n'
248 8
248 8
249
249
250 Add a commit with empty description, to ensure that the templates
250 Add a commit with empty description, to ensure that the templates
251 below will omit the description line.
251 below will omit the description line.
252
252
253 $ echo c >> c
253 $ echo c >> c
254 $ hg add c
254 $ hg add c
255 $ hg commit -qm ' '
255 $ hg commit -qm ' '
256
256
257 Default style is like normal output. Phases style should be the same
257 Default style is like normal output. Phases style should be the same
258 as default style, except for extra phase lines.
258 as default style, except for extra phase lines.
259
259
260 $ hg log > log.out
260 $ hg log > log.out
261 $ hg log --style default > style.out
261 $ hg log --style default > style.out
262 $ cmp log.out style.out || diff -u log.out style.out
262 $ cmp log.out style.out || diff -u log.out style.out
263 $ hg log -T phases > phases.out
263 $ hg log -T phases > phases.out
264 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
264 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
265 +phase: draft
265 +phase: draft
266 +phase: draft
266 +phase: draft
267 +phase: draft
267 +phase: draft
268 +phase: draft
268 +phase: draft
269 +phase: draft
269 +phase: draft
270 +phase: draft
270 +phase: draft
271 +phase: draft
271 +phase: draft
272 +phase: draft
272 +phase: draft
273 +phase: draft
273 +phase: draft
274 +phase: draft
274 +phase: draft
275
275
276 $ hg log -v > log.out
276 $ hg log -v > log.out
277 $ hg log -v --style default > style.out
277 $ hg log -v --style default > style.out
278 $ cmp log.out style.out || diff -u log.out style.out
278 $ cmp log.out style.out || diff -u log.out style.out
279 $ hg log -v -T phases > phases.out
279 $ hg log -v -T phases > phases.out
280 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
280 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
281 +phase: draft
281 +phase: draft
282 +phase: draft
282 +phase: draft
283 +phase: draft
283 +phase: draft
284 +phase: draft
284 +phase: draft
285 +phase: draft
285 +phase: draft
286 +phase: draft
286 +phase: draft
287 +phase: draft
287 +phase: draft
288 +phase: draft
288 +phase: draft
289 +phase: draft
289 +phase: draft
290 +phase: draft
290 +phase: draft
291
291
292 $ hg log -q > log.out
292 $ hg log -q > log.out
293 $ hg log -q --style default > style.out
293 $ hg log -q --style default > style.out
294 $ cmp log.out style.out || diff -u log.out style.out
294 $ cmp log.out style.out || diff -u log.out style.out
295 $ hg log -q -T phases > phases.out
295 $ hg log -q -T phases > phases.out
296 $ cmp log.out phases.out || diff -u log.out phases.out
296 $ cmp log.out phases.out || diff -u log.out phases.out
297
297
298 $ hg log --debug > log.out
298 $ hg log --debug > log.out
299 $ hg log --debug --style default > style.out
299 $ hg log --debug --style default > style.out
300 $ cmp log.out style.out || diff -u log.out style.out
300 $ cmp log.out style.out || diff -u log.out style.out
301 $ hg log --debug -T phases > phases.out
301 $ hg log --debug -T phases > phases.out
302 $ cmp log.out phases.out || diff -u log.out phases.out
302 $ cmp log.out phases.out || diff -u log.out phases.out
303
303
304 Default style of working-directory revision should also be the same (but
304 Default style of working-directory revision should also be the same (but
305 date may change while running tests):
305 date may change while running tests):
306
306
307 $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
307 $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
308 $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
308 $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
309 $ cmp log.out style.out || diff -u log.out style.out
309 $ cmp log.out style.out || diff -u log.out style.out
310
310
311 $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
311 $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
312 $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
312 $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
313 $ cmp log.out style.out || diff -u log.out style.out
313 $ cmp log.out style.out || diff -u log.out style.out
314
314
315 $ hg log -r 'wdir()' -q > log.out
315 $ hg log -r 'wdir()' -q > log.out
316 $ hg log -r 'wdir()' -q --style default > style.out
316 $ hg log -r 'wdir()' -q --style default > style.out
317 $ cmp log.out style.out || diff -u log.out style.out
317 $ cmp log.out style.out || diff -u log.out style.out
318
318
319 $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
319 $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
320 $ hg log -r 'wdir()' --debug --style default \
320 $ hg log -r 'wdir()' --debug --style default \
321 > | sed 's|^date:.*|date:|' > style.out
321 > | sed 's|^date:.*|date:|' > style.out
322 $ cmp log.out style.out || diff -u log.out style.out
322 $ cmp log.out style.out || diff -u log.out style.out
323
323
324 Default style should also preserve color information (issue2866):
324 Default style should also preserve color information (issue2866):
325
325
326 $ cp $HGRCPATH $HGRCPATH-bak
326 $ cp $HGRCPATH $HGRCPATH-bak
327 $ cat <<EOF >> $HGRCPATH
327 $ cat <<EOF >> $HGRCPATH
328 > [extensions]
328 > [extensions]
329 > color=
329 > color=
330 > EOF
330 > EOF
331
331
332 $ hg --color=debug log > log.out
332 $ hg --color=debug log > log.out
333 $ hg --color=debug log --style default > style.out
333 $ hg --color=debug log --style default > style.out
334 $ cmp log.out style.out || diff -u log.out style.out
334 $ cmp log.out style.out || diff -u log.out style.out
335 $ hg --color=debug log -T phases > phases.out
335 $ hg --color=debug log -T phases > phases.out
336 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
336 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
337 +[log.phase|phase: draft]
337 +[log.phase|phase: draft]
338 +[log.phase|phase: draft]
338 +[log.phase|phase: draft]
339 +[log.phase|phase: draft]
339 +[log.phase|phase: draft]
340 +[log.phase|phase: draft]
340 +[log.phase|phase: draft]
341 +[log.phase|phase: draft]
341 +[log.phase|phase: draft]
342 +[log.phase|phase: draft]
342 +[log.phase|phase: draft]
343 +[log.phase|phase: draft]
343 +[log.phase|phase: draft]
344 +[log.phase|phase: draft]
344 +[log.phase|phase: draft]
345 +[log.phase|phase: draft]
345 +[log.phase|phase: draft]
346 +[log.phase|phase: draft]
346 +[log.phase|phase: draft]
347
347
348 $ hg --color=debug -v log > log.out
348 $ hg --color=debug -v log > log.out
349 $ hg --color=debug -v log --style default > style.out
349 $ hg --color=debug -v log --style default > style.out
350 $ cmp log.out style.out || diff -u log.out style.out
350 $ cmp log.out style.out || diff -u log.out style.out
351 $ hg --color=debug -v log -T phases > phases.out
351 $ hg --color=debug -v log -T phases > phases.out
352 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
352 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
353 +[log.phase|phase: draft]
353 +[log.phase|phase: draft]
354 +[log.phase|phase: draft]
354 +[log.phase|phase: draft]
355 +[log.phase|phase: draft]
355 +[log.phase|phase: draft]
356 +[log.phase|phase: draft]
356 +[log.phase|phase: draft]
357 +[log.phase|phase: draft]
357 +[log.phase|phase: draft]
358 +[log.phase|phase: draft]
358 +[log.phase|phase: draft]
359 +[log.phase|phase: draft]
359 +[log.phase|phase: draft]
360 +[log.phase|phase: draft]
360 +[log.phase|phase: draft]
361 +[log.phase|phase: draft]
361 +[log.phase|phase: draft]
362 +[log.phase|phase: draft]
362 +[log.phase|phase: draft]
363
363
364 $ hg --color=debug -q log > log.out
364 $ hg --color=debug -q log > log.out
365 $ hg --color=debug -q log --style default > style.out
365 $ hg --color=debug -q log --style default > style.out
366 $ cmp log.out style.out || diff -u log.out style.out
366 $ cmp log.out style.out || diff -u log.out style.out
367 $ hg --color=debug -q log -T phases > phases.out
367 $ hg --color=debug -q log -T phases > phases.out
368 $ cmp log.out phases.out || diff -u log.out phases.out
368 $ cmp log.out phases.out || diff -u log.out phases.out
369
369
370 $ hg --color=debug --debug log > log.out
370 $ hg --color=debug --debug log > log.out
371 $ hg --color=debug --debug log --style default > style.out
371 $ hg --color=debug --debug log --style default > style.out
372 $ cmp log.out style.out || diff -u log.out style.out
372 $ cmp log.out style.out || diff -u log.out style.out
373 $ hg --color=debug --debug log -T phases > phases.out
373 $ hg --color=debug --debug log -T phases > phases.out
374 $ cmp log.out phases.out || diff -u log.out phases.out
374 $ cmp log.out phases.out || diff -u log.out phases.out
375
375
376 $ mv $HGRCPATH-bak $HGRCPATH
376 $ mv $HGRCPATH-bak $HGRCPATH
377
377
378 Remove commit with empty commit message, so as to not pollute further
378 Remove commit with empty commit message, so as to not pollute further
379 tests.
379 tests.
380
380
381 $ hg --config extensions.strip= strip -q .
381 $ hg --config extensions.strip= strip -q .
382
382
383 Revision with no copies (used to print a traceback):
383 Revision with no copies (used to print a traceback):
384
384
385 $ hg tip -v --template '\n'
385 $ hg tip -v --template '\n'
386
386
387
387
388 Compact style works:
388 Compact style works:
389
389
390 $ hg log -Tcompact
390 $ hg log -Tcompact
391 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
391 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
392 third
392 third
393
393
394 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
394 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
395 second
395 second
396
396
397 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
397 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
398 merge
398 merge
399
399
400 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
400 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
401 new head
401 new head
402
402
403 4 bbe44766e73d 1970-01-17 04:53 +0000 person
403 4 bbe44766e73d 1970-01-17 04:53 +0000 person
404 new branch
404 new branch
405
405
406 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
406 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
407 no user, no domain
407 no user, no domain
408
408
409 2 97054abb4ab8 1970-01-14 21:20 +0000 other
409 2 97054abb4ab8 1970-01-14 21:20 +0000 other
410 no person
410 no person
411
411
412 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
412 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
413 other 1
413 other 1
414
414
415 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
415 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
416 line 1
416 line 1
417
417
418
418
419 $ hg log -v --style compact
419 $ hg log -v --style compact
420 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
420 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
421 third
421 third
422
422
423 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
423 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
424 second
424 second
425
425
426 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
426 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
427 merge
427 merge
428
428
429 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
429 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
430 new head
430 new head
431
431
432 4 bbe44766e73d 1970-01-17 04:53 +0000 person
432 4 bbe44766e73d 1970-01-17 04:53 +0000 person
433 new branch
433 new branch
434
434
435 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
435 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
436 no user, no domain
436 no user, no domain
437
437
438 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
438 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
439 no person
439 no person
440
440
441 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
441 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
442 other 1
442 other 1
443 other 2
443 other 2
444
444
445 other 3
445 other 3
446
446
447 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
447 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
448 line 1
448 line 1
449 line 2
449 line 2
450
450
451
451
452 $ hg log --debug --style compact
452 $ hg log --debug --style compact
453 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
453 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
454 third
454 third
455
455
456 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
456 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
457 second
457 second
458
458
459 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
459 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
460 merge
460 merge
461
461
462 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
462 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
463 new head
463 new head
464
464
465 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
465 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
466 new branch
466 new branch
467
467
468 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
468 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
469 no user, no domain
469 no user, no domain
470
470
471 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
471 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
472 no person
472 no person
473
473
474 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
474 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
475 other 1
475 other 1
476 other 2
476 other 2
477
477
478 other 3
478 other 3
479
479
480 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
480 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
481 line 1
481 line 1
482 line 2
482 line 2
483
483
484
484
485 Test xml styles:
485 Test xml styles:
486
486
487 $ hg log --style xml -r 'not all()'
487 $ hg log --style xml -r 'not all()'
488 <?xml version="1.0"?>
488 <?xml version="1.0"?>
489 <log>
489 <log>
490 </log>
490 </log>
491
491
492 $ hg log --style xml
492 $ hg log --style xml
493 <?xml version="1.0"?>
493 <?xml version="1.0"?>
494 <log>
494 <log>
495 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
495 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
496 <tag>tip</tag>
496 <tag>tip</tag>
497 <author email="test">test</author>
497 <author email="test">test</author>
498 <date>2020-01-01T10:01:00+00:00</date>
498 <date>2020-01-01T10:01:00+00:00</date>
499 <msg xml:space="preserve">third</msg>
499 <msg xml:space="preserve">third</msg>
500 </logentry>
500 </logentry>
501 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
501 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
502 <parent revision="-1" node="0000000000000000000000000000000000000000" />
502 <parent revision="-1" node="0000000000000000000000000000000000000000" />
503 <author email="user@hostname">User Name</author>
503 <author email="user@hostname">User Name</author>
504 <date>1970-01-12T13:46:40+00:00</date>
504 <date>1970-01-12T13:46:40+00:00</date>
505 <msg xml:space="preserve">second</msg>
505 <msg xml:space="preserve">second</msg>
506 </logentry>
506 </logentry>
507 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
507 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
508 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
508 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
509 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
509 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
510 <author email="person">person</author>
510 <author email="person">person</author>
511 <date>1970-01-18T08:40:01+00:00</date>
511 <date>1970-01-18T08:40:01+00:00</date>
512 <msg xml:space="preserve">merge</msg>
512 <msg xml:space="preserve">merge</msg>
513 </logentry>
513 </logentry>
514 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
514 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
515 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
515 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
516 <author email="person">person</author>
516 <author email="person">person</author>
517 <date>1970-01-18T08:40:00+00:00</date>
517 <date>1970-01-18T08:40:00+00:00</date>
518 <msg xml:space="preserve">new head</msg>
518 <msg xml:space="preserve">new head</msg>
519 </logentry>
519 </logentry>
520 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
520 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
521 <branch>foo</branch>
521 <branch>foo</branch>
522 <author email="person">person</author>
522 <author email="person">person</author>
523 <date>1970-01-17T04:53:20+00:00</date>
523 <date>1970-01-17T04:53:20+00:00</date>
524 <msg xml:space="preserve">new branch</msg>
524 <msg xml:space="preserve">new branch</msg>
525 </logentry>
525 </logentry>
526 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
526 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
527 <author email="person">person</author>
527 <author email="person">person</author>
528 <date>1970-01-16T01:06:40+00:00</date>
528 <date>1970-01-16T01:06:40+00:00</date>
529 <msg xml:space="preserve">no user, no domain</msg>
529 <msg xml:space="preserve">no user, no domain</msg>
530 </logentry>
530 </logentry>
531 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
531 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
532 <author email="other@place">other</author>
532 <author email="other@place">other</author>
533 <date>1970-01-14T21:20:00+00:00</date>
533 <date>1970-01-14T21:20:00+00:00</date>
534 <msg xml:space="preserve">no person</msg>
534 <msg xml:space="preserve">no person</msg>
535 </logentry>
535 </logentry>
536 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
536 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
537 <author email="other@place">A. N. Other</author>
537 <author email="other@place">A. N. Other</author>
538 <date>1970-01-13T17:33:20+00:00</date>
538 <date>1970-01-13T17:33:20+00:00</date>
539 <msg xml:space="preserve">other 1
539 <msg xml:space="preserve">other 1
540 other 2
540 other 2
541
541
542 other 3</msg>
542 other 3</msg>
543 </logentry>
543 </logentry>
544 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
544 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
545 <author email="user@hostname">User Name</author>
545 <author email="user@hostname">User Name</author>
546 <date>1970-01-12T13:46:40+00:00</date>
546 <date>1970-01-12T13:46:40+00:00</date>
547 <msg xml:space="preserve">line 1
547 <msg xml:space="preserve">line 1
548 line 2</msg>
548 line 2</msg>
549 </logentry>
549 </logentry>
550 </log>
550 </log>
551
551
552 $ hg log -v --style xml
552 $ hg log -v --style xml
553 <?xml version="1.0"?>
553 <?xml version="1.0"?>
554 <log>
554 <log>
555 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
555 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
556 <tag>tip</tag>
556 <tag>tip</tag>
557 <author email="test">test</author>
557 <author email="test">test</author>
558 <date>2020-01-01T10:01:00+00:00</date>
558 <date>2020-01-01T10:01:00+00:00</date>
559 <msg xml:space="preserve">third</msg>
559 <msg xml:space="preserve">third</msg>
560 <paths>
560 <paths>
561 <path action="A">fourth</path>
561 <path action="A">fourth</path>
562 <path action="A">third</path>
562 <path action="A">third</path>
563 <path action="R">second</path>
563 <path action="R">second</path>
564 </paths>
564 </paths>
565 <copies>
565 <copies>
566 <copy source="second">fourth</copy>
566 <copy source="second">fourth</copy>
567 </copies>
567 </copies>
568 </logentry>
568 </logentry>
569 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
569 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
570 <parent revision="-1" node="0000000000000000000000000000000000000000" />
570 <parent revision="-1" node="0000000000000000000000000000000000000000" />
571 <author email="user@hostname">User Name</author>
571 <author email="user@hostname">User Name</author>
572 <date>1970-01-12T13:46:40+00:00</date>
572 <date>1970-01-12T13:46:40+00:00</date>
573 <msg xml:space="preserve">second</msg>
573 <msg xml:space="preserve">second</msg>
574 <paths>
574 <paths>
575 <path action="A">second</path>
575 <path action="A">second</path>
576 </paths>
576 </paths>
577 </logentry>
577 </logentry>
578 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
578 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
579 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
579 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
580 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
580 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
581 <author email="person">person</author>
581 <author email="person">person</author>
582 <date>1970-01-18T08:40:01+00:00</date>
582 <date>1970-01-18T08:40:01+00:00</date>
583 <msg xml:space="preserve">merge</msg>
583 <msg xml:space="preserve">merge</msg>
584 <paths>
584 <paths>
585 </paths>
585 </paths>
586 </logentry>
586 </logentry>
587 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
587 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
588 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
588 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
589 <author email="person">person</author>
589 <author email="person">person</author>
590 <date>1970-01-18T08:40:00+00:00</date>
590 <date>1970-01-18T08:40:00+00:00</date>
591 <msg xml:space="preserve">new head</msg>
591 <msg xml:space="preserve">new head</msg>
592 <paths>
592 <paths>
593 <path action="A">d</path>
593 <path action="A">d</path>
594 </paths>
594 </paths>
595 </logentry>
595 </logentry>
596 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
596 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
597 <branch>foo</branch>
597 <branch>foo</branch>
598 <author email="person">person</author>
598 <author email="person">person</author>
599 <date>1970-01-17T04:53:20+00:00</date>
599 <date>1970-01-17T04:53:20+00:00</date>
600 <msg xml:space="preserve">new branch</msg>
600 <msg xml:space="preserve">new branch</msg>
601 <paths>
601 <paths>
602 </paths>
602 </paths>
603 </logentry>
603 </logentry>
604 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
604 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
605 <author email="person">person</author>
605 <author email="person">person</author>
606 <date>1970-01-16T01:06:40+00:00</date>
606 <date>1970-01-16T01:06:40+00:00</date>
607 <msg xml:space="preserve">no user, no domain</msg>
607 <msg xml:space="preserve">no user, no domain</msg>
608 <paths>
608 <paths>
609 <path action="M">c</path>
609 <path action="M">c</path>
610 </paths>
610 </paths>
611 </logentry>
611 </logentry>
612 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
612 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
613 <author email="other@place">other</author>
613 <author email="other@place">other</author>
614 <date>1970-01-14T21:20:00+00:00</date>
614 <date>1970-01-14T21:20:00+00:00</date>
615 <msg xml:space="preserve">no person</msg>
615 <msg xml:space="preserve">no person</msg>
616 <paths>
616 <paths>
617 <path action="A">c</path>
617 <path action="A">c</path>
618 </paths>
618 </paths>
619 </logentry>
619 </logentry>
620 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
620 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
621 <author email="other@place">A. N. Other</author>
621 <author email="other@place">A. N. Other</author>
622 <date>1970-01-13T17:33:20+00:00</date>
622 <date>1970-01-13T17:33:20+00:00</date>
623 <msg xml:space="preserve">other 1
623 <msg xml:space="preserve">other 1
624 other 2
624 other 2
625
625
626 other 3</msg>
626 other 3</msg>
627 <paths>
627 <paths>
628 <path action="A">b</path>
628 <path action="A">b</path>
629 </paths>
629 </paths>
630 </logentry>
630 </logentry>
631 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
631 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
632 <author email="user@hostname">User Name</author>
632 <author email="user@hostname">User Name</author>
633 <date>1970-01-12T13:46:40+00:00</date>
633 <date>1970-01-12T13:46:40+00:00</date>
634 <msg xml:space="preserve">line 1
634 <msg xml:space="preserve">line 1
635 line 2</msg>
635 line 2</msg>
636 <paths>
636 <paths>
637 <path action="A">a</path>
637 <path action="A">a</path>
638 </paths>
638 </paths>
639 </logentry>
639 </logentry>
640 </log>
640 </log>
641
641
642 $ hg log --debug --style xml
642 $ hg log --debug --style xml
643 <?xml version="1.0"?>
643 <?xml version="1.0"?>
644 <log>
644 <log>
645 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
645 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
646 <tag>tip</tag>
646 <tag>tip</tag>
647 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
647 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
648 <parent revision="-1" node="0000000000000000000000000000000000000000" />
648 <parent revision="-1" node="0000000000000000000000000000000000000000" />
649 <author email="test">test</author>
649 <author email="test">test</author>
650 <date>2020-01-01T10:01:00+00:00</date>
650 <date>2020-01-01T10:01:00+00:00</date>
651 <msg xml:space="preserve">third</msg>
651 <msg xml:space="preserve">third</msg>
652 <paths>
652 <paths>
653 <path action="A">fourth</path>
653 <path action="A">fourth</path>
654 <path action="A">third</path>
654 <path action="A">third</path>
655 <path action="R">second</path>
655 <path action="R">second</path>
656 </paths>
656 </paths>
657 <copies>
657 <copies>
658 <copy source="second">fourth</copy>
658 <copy source="second">fourth</copy>
659 </copies>
659 </copies>
660 <extra key="branch">default</extra>
660 <extra key="branch">default</extra>
661 </logentry>
661 </logentry>
662 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
662 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
663 <parent revision="-1" node="0000000000000000000000000000000000000000" />
663 <parent revision="-1" node="0000000000000000000000000000000000000000" />
664 <parent revision="-1" node="0000000000000000000000000000000000000000" />
664 <parent revision="-1" node="0000000000000000000000000000000000000000" />
665 <author email="user@hostname">User Name</author>
665 <author email="user@hostname">User Name</author>
666 <date>1970-01-12T13:46:40+00:00</date>
666 <date>1970-01-12T13:46:40+00:00</date>
667 <msg xml:space="preserve">second</msg>
667 <msg xml:space="preserve">second</msg>
668 <paths>
668 <paths>
669 <path action="A">second</path>
669 <path action="A">second</path>
670 </paths>
670 </paths>
671 <extra key="branch">default</extra>
671 <extra key="branch">default</extra>
672 </logentry>
672 </logentry>
673 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
673 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
674 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
674 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
675 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
675 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
676 <author email="person">person</author>
676 <author email="person">person</author>
677 <date>1970-01-18T08:40:01+00:00</date>
677 <date>1970-01-18T08:40:01+00:00</date>
678 <msg xml:space="preserve">merge</msg>
678 <msg xml:space="preserve">merge</msg>
679 <paths>
679 <paths>
680 </paths>
680 </paths>
681 <extra key="branch">default</extra>
681 <extra key="branch">default</extra>
682 </logentry>
682 </logentry>
683 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
683 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
684 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
684 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
685 <parent revision="-1" node="0000000000000000000000000000000000000000" />
685 <parent revision="-1" node="0000000000000000000000000000000000000000" />
686 <author email="person">person</author>
686 <author email="person">person</author>
687 <date>1970-01-18T08:40:00+00:00</date>
687 <date>1970-01-18T08:40:00+00:00</date>
688 <msg xml:space="preserve">new head</msg>
688 <msg xml:space="preserve">new head</msg>
689 <paths>
689 <paths>
690 <path action="A">d</path>
690 <path action="A">d</path>
691 </paths>
691 </paths>
692 <extra key="branch">default</extra>
692 <extra key="branch">default</extra>
693 </logentry>
693 </logentry>
694 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
694 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
695 <branch>foo</branch>
695 <branch>foo</branch>
696 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
696 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
697 <parent revision="-1" node="0000000000000000000000000000000000000000" />
697 <parent revision="-1" node="0000000000000000000000000000000000000000" />
698 <author email="person">person</author>
698 <author email="person">person</author>
699 <date>1970-01-17T04:53:20+00:00</date>
699 <date>1970-01-17T04:53:20+00:00</date>
700 <msg xml:space="preserve">new branch</msg>
700 <msg xml:space="preserve">new branch</msg>
701 <paths>
701 <paths>
702 </paths>
702 </paths>
703 <extra key="branch">foo</extra>
703 <extra key="branch">foo</extra>
704 </logentry>
704 </logentry>
705 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
705 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
706 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
706 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
707 <parent revision="-1" node="0000000000000000000000000000000000000000" />
707 <parent revision="-1" node="0000000000000000000000000000000000000000" />
708 <author email="person">person</author>
708 <author email="person">person</author>
709 <date>1970-01-16T01:06:40+00:00</date>
709 <date>1970-01-16T01:06:40+00:00</date>
710 <msg xml:space="preserve">no user, no domain</msg>
710 <msg xml:space="preserve">no user, no domain</msg>
711 <paths>
711 <paths>
712 <path action="M">c</path>
712 <path action="M">c</path>
713 </paths>
713 </paths>
714 <extra key="branch">default</extra>
714 <extra key="branch">default</extra>
715 </logentry>
715 </logentry>
716 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
716 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
717 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
717 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
718 <parent revision="-1" node="0000000000000000000000000000000000000000" />
718 <parent revision="-1" node="0000000000000000000000000000000000000000" />
719 <author email="other@place">other</author>
719 <author email="other@place">other</author>
720 <date>1970-01-14T21:20:00+00:00</date>
720 <date>1970-01-14T21:20:00+00:00</date>
721 <msg xml:space="preserve">no person</msg>
721 <msg xml:space="preserve">no person</msg>
722 <paths>
722 <paths>
723 <path action="A">c</path>
723 <path action="A">c</path>
724 </paths>
724 </paths>
725 <extra key="branch">default</extra>
725 <extra key="branch">default</extra>
726 </logentry>
726 </logentry>
727 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
727 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
728 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
728 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
729 <parent revision="-1" node="0000000000000000000000000000000000000000" />
729 <parent revision="-1" node="0000000000000000000000000000000000000000" />
730 <author email="other@place">A. N. Other</author>
730 <author email="other@place">A. N. Other</author>
731 <date>1970-01-13T17:33:20+00:00</date>
731 <date>1970-01-13T17:33:20+00:00</date>
732 <msg xml:space="preserve">other 1
732 <msg xml:space="preserve">other 1
733 other 2
733 other 2
734
734
735 other 3</msg>
735 other 3</msg>
736 <paths>
736 <paths>
737 <path action="A">b</path>
737 <path action="A">b</path>
738 </paths>
738 </paths>
739 <extra key="branch">default</extra>
739 <extra key="branch">default</extra>
740 </logentry>
740 </logentry>
741 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
741 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
742 <parent revision="-1" node="0000000000000000000000000000000000000000" />
742 <parent revision="-1" node="0000000000000000000000000000000000000000" />
743 <parent revision="-1" node="0000000000000000000000000000000000000000" />
743 <parent revision="-1" node="0000000000000000000000000000000000000000" />
744 <author email="user@hostname">User Name</author>
744 <author email="user@hostname">User Name</author>
745 <date>1970-01-12T13:46:40+00:00</date>
745 <date>1970-01-12T13:46:40+00:00</date>
746 <msg xml:space="preserve">line 1
746 <msg xml:space="preserve">line 1
747 line 2</msg>
747 line 2</msg>
748 <paths>
748 <paths>
749 <path action="A">a</path>
749 <path action="A">a</path>
750 </paths>
750 </paths>
751 <extra key="branch">default</extra>
751 <extra key="branch">default</extra>
752 </logentry>
752 </logentry>
753 </log>
753 </log>
754
754
755
755
756 Test JSON style:
756 Test JSON style:
757
757
758 $ hg log -k nosuch -Tjson
758 $ hg log -k nosuch -Tjson
759 []
759 []
760
760
761 $ hg log -qr . -Tjson
761 $ hg log -qr . -Tjson
762 [
762 [
763 {
763 {
764 "rev": 8,
764 "rev": 8,
765 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
765 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
766 }
766 }
767 ]
767 ]
768
768
769 $ hg log -vpr . -Tjson --stat
769 $ hg log -vpr . -Tjson --stat
770 [
770 [
771 {
771 {
772 "rev": 8,
772 "rev": 8,
773 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
773 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
774 "branch": "default",
774 "branch": "default",
775 "phase": "draft",
775 "phase": "draft",
776 "user": "test",
776 "user": "test",
777 "date": [1577872860, 0],
777 "date": [1577872860, 0],
778 "desc": "third",
778 "desc": "third",
779 "bookmarks": [],
779 "bookmarks": [],
780 "tags": ["tip"],
780 "tags": ["tip"],
781 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
781 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
782 "files": ["fourth", "second", "third"],
782 "files": ["fourth", "second", "third"],
783 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
783 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
784 "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n"
784 "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n"
785 }
785 }
786 ]
786 ]
787
787
788 honor --git but not format-breaking diffopts
788 honor --git but not format-breaking diffopts
789 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
789 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
790 [
790 [
791 {
791 {
792 "rev": 8,
792 "rev": 8,
793 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
793 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
794 "branch": "default",
794 "branch": "default",
795 "phase": "draft",
795 "phase": "draft",
796 "user": "test",
796 "user": "test",
797 "date": [1577872860, 0],
797 "date": [1577872860, 0],
798 "desc": "third",
798 "desc": "third",
799 "bookmarks": [],
799 "bookmarks": [],
800 "tags": ["tip"],
800 "tags": ["tip"],
801 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
801 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
802 "files": ["fourth", "second", "third"],
802 "files": ["fourth", "second", "third"],
803 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n"
803 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n"
804 }
804 }
805 ]
805 ]
806
806
807 $ hg log -T json
807 $ hg log -T json
808 [
808 [
809 {
809 {
810 "rev": 8,
810 "rev": 8,
811 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
811 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
812 "branch": "default",
812 "branch": "default",
813 "phase": "draft",
813 "phase": "draft",
814 "user": "test",
814 "user": "test",
815 "date": [1577872860, 0],
815 "date": [1577872860, 0],
816 "desc": "third",
816 "desc": "third",
817 "bookmarks": [],
817 "bookmarks": [],
818 "tags": ["tip"],
818 "tags": ["tip"],
819 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
819 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
820 },
820 },
821 {
821 {
822 "rev": 7,
822 "rev": 7,
823 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
823 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
824 "branch": "default",
824 "branch": "default",
825 "phase": "draft",
825 "phase": "draft",
826 "user": "User Name <user@hostname>",
826 "user": "User Name <user@hostname>",
827 "date": [1000000, 0],
827 "date": [1000000, 0],
828 "desc": "second",
828 "desc": "second",
829 "bookmarks": [],
829 "bookmarks": [],
830 "tags": [],
830 "tags": [],
831 "parents": ["0000000000000000000000000000000000000000"]
831 "parents": ["0000000000000000000000000000000000000000"]
832 },
832 },
833 {
833 {
834 "rev": 6,
834 "rev": 6,
835 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
835 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
836 "branch": "default",
836 "branch": "default",
837 "phase": "draft",
837 "phase": "draft",
838 "user": "person",
838 "user": "person",
839 "date": [1500001, 0],
839 "date": [1500001, 0],
840 "desc": "merge",
840 "desc": "merge",
841 "bookmarks": [],
841 "bookmarks": [],
842 "tags": [],
842 "tags": [],
843 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
843 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
844 },
844 },
845 {
845 {
846 "rev": 5,
846 "rev": 5,
847 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
847 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
848 "branch": "default",
848 "branch": "default",
849 "phase": "draft",
849 "phase": "draft",
850 "user": "person",
850 "user": "person",
851 "date": [1500000, 0],
851 "date": [1500000, 0],
852 "desc": "new head",
852 "desc": "new head",
853 "bookmarks": [],
853 "bookmarks": [],
854 "tags": [],
854 "tags": [],
855 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
855 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
856 },
856 },
857 {
857 {
858 "rev": 4,
858 "rev": 4,
859 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
859 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
860 "branch": "foo",
860 "branch": "foo",
861 "phase": "draft",
861 "phase": "draft",
862 "user": "person",
862 "user": "person",
863 "date": [1400000, 0],
863 "date": [1400000, 0],
864 "desc": "new branch",
864 "desc": "new branch",
865 "bookmarks": [],
865 "bookmarks": [],
866 "tags": [],
866 "tags": [],
867 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
867 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
868 },
868 },
869 {
869 {
870 "rev": 3,
870 "rev": 3,
871 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
871 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
872 "branch": "default",
872 "branch": "default",
873 "phase": "draft",
873 "phase": "draft",
874 "user": "person",
874 "user": "person",
875 "date": [1300000, 0],
875 "date": [1300000, 0],
876 "desc": "no user, no domain",
876 "desc": "no user, no domain",
877 "bookmarks": [],
877 "bookmarks": [],
878 "tags": [],
878 "tags": [],
879 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
879 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
880 },
880 },
881 {
881 {
882 "rev": 2,
882 "rev": 2,
883 "node": "97054abb4ab824450e9164180baf491ae0078465",
883 "node": "97054abb4ab824450e9164180baf491ae0078465",
884 "branch": "default",
884 "branch": "default",
885 "phase": "draft",
885 "phase": "draft",
886 "user": "other@place",
886 "user": "other@place",
887 "date": [1200000, 0],
887 "date": [1200000, 0],
888 "desc": "no person",
888 "desc": "no person",
889 "bookmarks": [],
889 "bookmarks": [],
890 "tags": [],
890 "tags": [],
891 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
891 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
892 },
892 },
893 {
893 {
894 "rev": 1,
894 "rev": 1,
895 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
895 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
896 "branch": "default",
896 "branch": "default",
897 "phase": "draft",
897 "phase": "draft",
898 "user": "A. N. Other <other@place>",
898 "user": "A. N. Other <other@place>",
899 "date": [1100000, 0],
899 "date": [1100000, 0],
900 "desc": "other 1\nother 2\n\nother 3",
900 "desc": "other 1\nother 2\n\nother 3",
901 "bookmarks": [],
901 "bookmarks": [],
902 "tags": [],
902 "tags": [],
903 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
903 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
904 },
904 },
905 {
905 {
906 "rev": 0,
906 "rev": 0,
907 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
907 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
908 "branch": "default",
908 "branch": "default",
909 "phase": "draft",
909 "phase": "draft",
910 "user": "User Name <user@hostname>",
910 "user": "User Name <user@hostname>",
911 "date": [1000000, 0],
911 "date": [1000000, 0],
912 "desc": "line 1\nline 2",
912 "desc": "line 1\nline 2",
913 "bookmarks": [],
913 "bookmarks": [],
914 "tags": [],
914 "tags": [],
915 "parents": ["0000000000000000000000000000000000000000"]
915 "parents": ["0000000000000000000000000000000000000000"]
916 }
916 }
917 ]
917 ]
918
918
919 $ hg heads -v -Tjson
919 $ hg heads -v -Tjson
920 [
920 [
921 {
921 {
922 "rev": 8,
922 "rev": 8,
923 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
923 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
924 "branch": "default",
924 "branch": "default",
925 "phase": "draft",
925 "phase": "draft",
926 "user": "test",
926 "user": "test",
927 "date": [1577872860, 0],
927 "date": [1577872860, 0],
928 "desc": "third",
928 "desc": "third",
929 "bookmarks": [],
929 "bookmarks": [],
930 "tags": ["tip"],
930 "tags": ["tip"],
931 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
931 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
932 "files": ["fourth", "second", "third"]
932 "files": ["fourth", "second", "third"]
933 },
933 },
934 {
934 {
935 "rev": 6,
935 "rev": 6,
936 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
936 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
937 "branch": "default",
937 "branch": "default",
938 "phase": "draft",
938 "phase": "draft",
939 "user": "person",
939 "user": "person",
940 "date": [1500001, 0],
940 "date": [1500001, 0],
941 "desc": "merge",
941 "desc": "merge",
942 "bookmarks": [],
942 "bookmarks": [],
943 "tags": [],
943 "tags": [],
944 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
944 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
945 "files": []
945 "files": []
946 },
946 },
947 {
947 {
948 "rev": 4,
948 "rev": 4,
949 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
949 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
950 "branch": "foo",
950 "branch": "foo",
951 "phase": "draft",
951 "phase": "draft",
952 "user": "person",
952 "user": "person",
953 "date": [1400000, 0],
953 "date": [1400000, 0],
954 "desc": "new branch",
954 "desc": "new branch",
955 "bookmarks": [],
955 "bookmarks": [],
956 "tags": [],
956 "tags": [],
957 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
957 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
958 "files": []
958 "files": []
959 }
959 }
960 ]
960 ]
961
961
962 $ hg log --debug -Tjson
962 $ hg log --debug -Tjson
963 [
963 [
964 {
964 {
965 "rev": 8,
965 "rev": 8,
966 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
966 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
967 "branch": "default",
967 "branch": "default",
968 "phase": "draft",
968 "phase": "draft",
969 "user": "test",
969 "user": "test",
970 "date": [1577872860, 0],
970 "date": [1577872860, 0],
971 "desc": "third",
971 "desc": "third",
972 "bookmarks": [],
972 "bookmarks": [],
973 "tags": ["tip"],
973 "tags": ["tip"],
974 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
974 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
975 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
975 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
976 "extra": {"branch": "default"},
976 "extra": {"branch": "default"},
977 "modified": [],
977 "modified": [],
978 "added": ["fourth", "third"],
978 "added": ["fourth", "third"],
979 "removed": ["second"]
979 "removed": ["second"]
980 },
980 },
981 {
981 {
982 "rev": 7,
982 "rev": 7,
983 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
983 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
984 "branch": "default",
984 "branch": "default",
985 "phase": "draft",
985 "phase": "draft",
986 "user": "User Name <user@hostname>",
986 "user": "User Name <user@hostname>",
987 "date": [1000000, 0],
987 "date": [1000000, 0],
988 "desc": "second",
988 "desc": "second",
989 "bookmarks": [],
989 "bookmarks": [],
990 "tags": [],
990 "tags": [],
991 "parents": ["0000000000000000000000000000000000000000"],
991 "parents": ["0000000000000000000000000000000000000000"],
992 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
992 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
993 "extra": {"branch": "default"},
993 "extra": {"branch": "default"},
994 "modified": [],
994 "modified": [],
995 "added": ["second"],
995 "added": ["second"],
996 "removed": []
996 "removed": []
997 },
997 },
998 {
998 {
999 "rev": 6,
999 "rev": 6,
1000 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
1000 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
1001 "branch": "default",
1001 "branch": "default",
1002 "phase": "draft",
1002 "phase": "draft",
1003 "user": "person",
1003 "user": "person",
1004 "date": [1500001, 0],
1004 "date": [1500001, 0],
1005 "desc": "merge",
1005 "desc": "merge",
1006 "bookmarks": [],
1006 "bookmarks": [],
1007 "tags": [],
1007 "tags": [],
1008 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
1008 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
1009 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1009 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1010 "extra": {"branch": "default"},
1010 "extra": {"branch": "default"},
1011 "modified": [],
1011 "modified": [],
1012 "added": [],
1012 "added": [],
1013 "removed": []
1013 "removed": []
1014 },
1014 },
1015 {
1015 {
1016 "rev": 5,
1016 "rev": 5,
1017 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
1017 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
1018 "branch": "default",
1018 "branch": "default",
1019 "phase": "draft",
1019 "phase": "draft",
1020 "user": "person",
1020 "user": "person",
1021 "date": [1500000, 0],
1021 "date": [1500000, 0],
1022 "desc": "new head",
1022 "desc": "new head",
1023 "bookmarks": [],
1023 "bookmarks": [],
1024 "tags": [],
1024 "tags": [],
1025 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1025 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1026 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1026 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1027 "extra": {"branch": "default"},
1027 "extra": {"branch": "default"},
1028 "modified": [],
1028 "modified": [],
1029 "added": ["d"],
1029 "added": ["d"],
1030 "removed": []
1030 "removed": []
1031 },
1031 },
1032 {
1032 {
1033 "rev": 4,
1033 "rev": 4,
1034 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
1034 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
1035 "branch": "foo",
1035 "branch": "foo",
1036 "phase": "draft",
1036 "phase": "draft",
1037 "user": "person",
1037 "user": "person",
1038 "date": [1400000, 0],
1038 "date": [1400000, 0],
1039 "desc": "new branch",
1039 "desc": "new branch",
1040 "bookmarks": [],
1040 "bookmarks": [],
1041 "tags": [],
1041 "tags": [],
1042 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1042 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1043 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1043 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1044 "extra": {"branch": "foo"},
1044 "extra": {"branch": "foo"},
1045 "modified": [],
1045 "modified": [],
1046 "added": [],
1046 "added": [],
1047 "removed": []
1047 "removed": []
1048 },
1048 },
1049 {
1049 {
1050 "rev": 3,
1050 "rev": 3,
1051 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
1051 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
1052 "branch": "default",
1052 "branch": "default",
1053 "phase": "draft",
1053 "phase": "draft",
1054 "user": "person",
1054 "user": "person",
1055 "date": [1300000, 0],
1055 "date": [1300000, 0],
1056 "desc": "no user, no domain",
1056 "desc": "no user, no domain",
1057 "bookmarks": [],
1057 "bookmarks": [],
1058 "tags": [],
1058 "tags": [],
1059 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
1059 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
1060 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1060 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1061 "extra": {"branch": "default"},
1061 "extra": {"branch": "default"},
1062 "modified": ["c"],
1062 "modified": ["c"],
1063 "added": [],
1063 "added": [],
1064 "removed": []
1064 "removed": []
1065 },
1065 },
1066 {
1066 {
1067 "rev": 2,
1067 "rev": 2,
1068 "node": "97054abb4ab824450e9164180baf491ae0078465",
1068 "node": "97054abb4ab824450e9164180baf491ae0078465",
1069 "branch": "default",
1069 "branch": "default",
1070 "phase": "draft",
1070 "phase": "draft",
1071 "user": "other@place",
1071 "user": "other@place",
1072 "date": [1200000, 0],
1072 "date": [1200000, 0],
1073 "desc": "no person",
1073 "desc": "no person",
1074 "bookmarks": [],
1074 "bookmarks": [],
1075 "tags": [],
1075 "tags": [],
1076 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
1076 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
1077 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
1077 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
1078 "extra": {"branch": "default"},
1078 "extra": {"branch": "default"},
1079 "modified": [],
1079 "modified": [],
1080 "added": ["c"],
1080 "added": ["c"],
1081 "removed": []
1081 "removed": []
1082 },
1082 },
1083 {
1083 {
1084 "rev": 1,
1084 "rev": 1,
1085 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
1085 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
1086 "branch": "default",
1086 "branch": "default",
1087 "phase": "draft",
1087 "phase": "draft",
1088 "user": "A. N. Other <other@place>",
1088 "user": "A. N. Other <other@place>",
1089 "date": [1100000, 0],
1089 "date": [1100000, 0],
1090 "desc": "other 1\nother 2\n\nother 3",
1090 "desc": "other 1\nother 2\n\nother 3",
1091 "bookmarks": [],
1091 "bookmarks": [],
1092 "tags": [],
1092 "tags": [],
1093 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
1093 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
1094 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
1094 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
1095 "extra": {"branch": "default"},
1095 "extra": {"branch": "default"},
1096 "modified": [],
1096 "modified": [],
1097 "added": ["b"],
1097 "added": ["b"],
1098 "removed": []
1098 "removed": []
1099 },
1099 },
1100 {
1100 {
1101 "rev": 0,
1101 "rev": 0,
1102 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
1102 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
1103 "branch": "default",
1103 "branch": "default",
1104 "phase": "draft",
1104 "phase": "draft",
1105 "user": "User Name <user@hostname>",
1105 "user": "User Name <user@hostname>",
1106 "date": [1000000, 0],
1106 "date": [1000000, 0],
1107 "desc": "line 1\nline 2",
1107 "desc": "line 1\nline 2",
1108 "bookmarks": [],
1108 "bookmarks": [],
1109 "tags": [],
1109 "tags": [],
1110 "parents": ["0000000000000000000000000000000000000000"],
1110 "parents": ["0000000000000000000000000000000000000000"],
1111 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
1111 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
1112 "extra": {"branch": "default"},
1112 "extra": {"branch": "default"},
1113 "modified": [],
1113 "modified": [],
1114 "added": ["a"],
1114 "added": ["a"],
1115 "removed": []
1115 "removed": []
1116 }
1116 }
1117 ]
1117 ]
1118
1118
1119 Error if style not readable:
1119 Error if style not readable:
1120
1120
1121 #if unix-permissions no-root
1121 #if unix-permissions no-root
1122 $ touch q
1122 $ touch q
1123 $ chmod 0 q
1123 $ chmod 0 q
1124 $ hg log --style ./q
1124 $ hg log --style ./q
1125 abort: Permission denied: ./q
1125 abort: Permission denied: ./q
1126 [255]
1126 [255]
1127 #endif
1127 #endif
1128
1128
1129 Error if no style:
1129 Error if no style:
1130
1130
1131 $ hg log --style notexist
1131 $ hg log --style notexist
1132 abort: style 'notexist' not found
1132 abort: style 'notexist' not found
1133 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
1133 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
1134 [255]
1134 [255]
1135
1135
1136 $ hg log -T list
1136 $ hg log -T list
1137 available styles: bisect, changelog, compact, default, phases, show, status, xml
1137 available styles: bisect, changelog, compact, default, phases, show, status, xml
1138 abort: specify a template
1138 abort: specify a template
1139 [255]
1139 [255]
1140
1140
1141 Error if style missing key:
1141 Error if style missing key:
1142
1142
1143 $ echo 'q = q' > t
1143 $ echo 'q = q' > t
1144 $ hg log --style ./t
1144 $ hg log --style ./t
1145 abort: "changeset" not in template map
1145 abort: "changeset" not in template map
1146 [255]
1146 [255]
1147
1147
1148 Error if style missing value:
1148 Error if style missing value:
1149
1149
1150 $ echo 'changeset =' > t
1150 $ echo 'changeset =' > t
1151 $ hg log --style t
1151 $ hg log --style t
1152 hg: parse error at t:1: missing value
1152 hg: parse error at t:1: missing value
1153 [255]
1153 [255]
1154
1154
1155 Error if include fails:
1155 Error if include fails:
1156
1156
1157 $ echo 'changeset = q' >> t
1157 $ echo 'changeset = q' >> t
1158 #if unix-permissions no-root
1158 #if unix-permissions no-root
1159 $ hg log --style ./t
1159 $ hg log --style ./t
1160 abort: template file ./q: Permission denied
1160 abort: template file ./q: Permission denied
1161 [255]
1161 [255]
1162 $ rm -f q
1162 $ rm -f q
1163 #endif
1163 #endif
1164
1164
1165 Include works:
1165 Include works:
1166
1166
1167 $ echo '{rev}' > q
1167 $ echo '{rev}' > q
1168 $ hg log --style ./t
1168 $ hg log --style ./t
1169 8
1169 8
1170 7
1170 7
1171 6
1171 6
1172 5
1172 5
1173 4
1173 4
1174 3
1174 3
1175 2
1175 2
1176 1
1176 1
1177 0
1177 0
1178
1178
1179 Check that recursive reference does not fall into RuntimeError (issue4758):
1179 Check that recursive reference does not fall into RuntimeError (issue4758):
1180
1180
1181 common mistake:
1181 common mistake:
1182
1182
1183 $ hg log -T '{changeset}\n'
1183 $ cat << EOF > issue4758
1184 > changeset = '{changeset}\n'
1185 > EOF
1186 $ hg log --style ./issue4758
1184 abort: recursive reference 'changeset' in template
1187 abort: recursive reference 'changeset' in template
1185 [255]
1188 [255]
1186
1189
1187 circular reference:
1190 circular reference:
1188
1191
1189 $ cat << EOF > issue4758
1192 $ cat << EOF > issue4758
1190 > changeset = '{foo}'
1193 > changeset = '{foo}'
1191 > foo = '{changeset}'
1194 > foo = '{changeset}'
1192 > EOF
1195 > EOF
1193 $ hg log --style ./issue4758
1196 $ hg log --style ./issue4758
1194 abort: recursive reference 'foo' in template
1197 abort: recursive reference 'foo' in template
1195 [255]
1198 [255]
1196
1199
1197 buildmap() -> gettemplate(), where no thunk was made:
1200 buildmap() -> gettemplate(), where no thunk was made:
1198
1201
1199 $ hg log -T '{files % changeset}\n'
1202 $ cat << EOF > issue4758
1203 > changeset = '{files % changeset}\n'
1204 > EOF
1205 $ hg log --style ./issue4758
1200 abort: recursive reference 'changeset' in template
1206 abort: recursive reference 'changeset' in template
1201 [255]
1207 [255]
1202
1208
1203 not a recursion if a keyword of the same name exists:
1209 not a recursion if a keyword of the same name exists:
1204
1210
1205 $ cat << EOF > issue4758
1211 $ cat << EOF > issue4758
1206 > changeset = '{tags % rev}'
1212 > changeset = '{tags % rev}'
1207 > rev = '{rev} {tag}\n'
1213 > rev = '{rev} {tag}\n'
1208 > EOF
1214 > EOF
1209 $ hg log --style ./issue4758 -r tip
1215 $ hg log --style ./issue4758 -r tip
1210 8 tip
1216 8 tip
1211
1217
1212 Check that {phase} works correctly on parents:
1218 Check that {phase} works correctly on parents:
1213
1219
1214 $ cat << EOF > parentphase
1220 $ cat << EOF > parentphase
1215 > changeset_debug = '{rev} ({phase}):{parents}\n'
1221 > changeset_debug = '{rev} ({phase}):{parents}\n'
1216 > parent = ' {rev} ({phase})'
1222 > parent = ' {rev} ({phase})'
1217 > EOF
1223 > EOF
1218 $ hg phase -r 5 --public
1224 $ hg phase -r 5 --public
1219 $ hg phase -r 7 --secret --force
1225 $ hg phase -r 7 --secret --force
1220 $ hg log --debug -G --style ./parentphase
1226 $ hg log --debug -G --style ./parentphase
1221 @ 8 (secret): 7 (secret) -1 (public)
1227 @ 8 (secret): 7 (secret) -1 (public)
1222 |
1228 |
1223 o 7 (secret): -1 (public) -1 (public)
1229 o 7 (secret): -1 (public) -1 (public)
1224
1230
1225 o 6 (draft): 5 (public) 4 (draft)
1231 o 6 (draft): 5 (public) 4 (draft)
1226 |\
1232 |\
1227 | o 5 (public): 3 (public) -1 (public)
1233 | o 5 (public): 3 (public) -1 (public)
1228 | |
1234 | |
1229 o | 4 (draft): 3 (public) -1 (public)
1235 o | 4 (draft): 3 (public) -1 (public)
1230 |/
1236 |/
1231 o 3 (public): 2 (public) -1 (public)
1237 o 3 (public): 2 (public) -1 (public)
1232 |
1238 |
1233 o 2 (public): 1 (public) -1 (public)
1239 o 2 (public): 1 (public) -1 (public)
1234 |
1240 |
1235 o 1 (public): 0 (public) -1 (public)
1241 o 1 (public): 0 (public) -1 (public)
1236 |
1242 |
1237 o 0 (public): -1 (public) -1 (public)
1243 o 0 (public): -1 (public) -1 (public)
1238
1244
1239
1245
1240 Missing non-standard names give no error (backward compatibility):
1246 Missing non-standard names give no error (backward compatibility):
1241
1247
1242 $ echo "changeset = '{c}'" > t
1248 $ echo "changeset = '{c}'" > t
1243 $ hg log --style ./t
1249 $ hg log --style ./t
1244
1250
1245 Defining non-standard name works:
1251 Defining non-standard name works:
1246
1252
1247 $ cat <<EOF > t
1253 $ cat <<EOF > t
1248 > changeset = '{c}'
1254 > changeset = '{c}'
1249 > c = q
1255 > c = q
1250 > EOF
1256 > EOF
1251 $ hg log --style ./t
1257 $ hg log --style ./t
1252 8
1258 8
1253 7
1259 7
1254 6
1260 6
1255 5
1261 5
1256 4
1262 4
1257 3
1263 3
1258 2
1264 2
1259 1
1265 1
1260 0
1266 0
1261
1267
1262 ui.style works:
1268 ui.style works:
1263
1269
1264 $ echo '[ui]' > .hg/hgrc
1270 $ echo '[ui]' > .hg/hgrc
1265 $ echo 'style = t' >> .hg/hgrc
1271 $ echo 'style = t' >> .hg/hgrc
1266 $ hg log
1272 $ hg log
1267 8
1273 8
1268 7
1274 7
1269 6
1275 6
1270 5
1276 5
1271 4
1277 4
1272 3
1278 3
1273 2
1279 2
1274 1
1280 1
1275 0
1281 0
1276
1282
1277
1283
1278 Issue338:
1284 Issue338:
1279
1285
1280 $ hg log --style=changelog > changelog
1286 $ hg log --style=changelog > changelog
1281
1287
1282 $ cat changelog
1288 $ cat changelog
1283 2020-01-01 test <test>
1289 2020-01-01 test <test>
1284
1290
1285 * fourth, second, third:
1291 * fourth, second, third:
1286 third
1292 third
1287 [95c24699272e] [tip]
1293 [95c24699272e] [tip]
1288
1294
1289 1970-01-12 User Name <user@hostname>
1295 1970-01-12 User Name <user@hostname>
1290
1296
1291 * second:
1297 * second:
1292 second
1298 second
1293 [29114dbae42b]
1299 [29114dbae42b]
1294
1300
1295 1970-01-18 person <person>
1301 1970-01-18 person <person>
1296
1302
1297 * merge
1303 * merge
1298 [d41e714fe50d]
1304 [d41e714fe50d]
1299
1305
1300 * d:
1306 * d:
1301 new head
1307 new head
1302 [13207e5a10d9]
1308 [13207e5a10d9]
1303
1309
1304 1970-01-17 person <person>
1310 1970-01-17 person <person>
1305
1311
1306 * new branch
1312 * new branch
1307 [bbe44766e73d] <foo>
1313 [bbe44766e73d] <foo>
1308
1314
1309 1970-01-16 person <person>
1315 1970-01-16 person <person>
1310
1316
1311 * c:
1317 * c:
1312 no user, no domain
1318 no user, no domain
1313 [10e46f2dcbf4]
1319 [10e46f2dcbf4]
1314
1320
1315 1970-01-14 other <other@place>
1321 1970-01-14 other <other@place>
1316
1322
1317 * c:
1323 * c:
1318 no person
1324 no person
1319 [97054abb4ab8]
1325 [97054abb4ab8]
1320
1326
1321 1970-01-13 A. N. Other <other@place>
1327 1970-01-13 A. N. Other <other@place>
1322
1328
1323 * b:
1329 * b:
1324 other 1 other 2
1330 other 1 other 2
1325
1331
1326 other 3
1332 other 3
1327 [b608e9d1a3f0]
1333 [b608e9d1a3f0]
1328
1334
1329 1970-01-12 User Name <user@hostname>
1335 1970-01-12 User Name <user@hostname>
1330
1336
1331 * a:
1337 * a:
1332 line 1 line 2
1338 line 1 line 2
1333 [1e4e1b8f71e0]
1339 [1e4e1b8f71e0]
1334
1340
1335
1341
1336 Issue2130: xml output for 'hg heads' is malformed
1342 Issue2130: xml output for 'hg heads' is malformed
1337
1343
1338 $ hg heads --style changelog
1344 $ hg heads --style changelog
1339 2020-01-01 test <test>
1345 2020-01-01 test <test>
1340
1346
1341 * fourth, second, third:
1347 * fourth, second, third:
1342 third
1348 third
1343 [95c24699272e] [tip]
1349 [95c24699272e] [tip]
1344
1350
1345 1970-01-18 person <person>
1351 1970-01-18 person <person>
1346
1352
1347 * merge
1353 * merge
1348 [d41e714fe50d]
1354 [d41e714fe50d]
1349
1355
1350 1970-01-17 person <person>
1356 1970-01-17 person <person>
1351
1357
1352 * new branch
1358 * new branch
1353 [bbe44766e73d] <foo>
1359 [bbe44766e73d] <foo>
1354
1360
1355
1361
1356 Keys work:
1362 Keys work:
1357
1363
1358 $ for key in author branch branches date desc file_adds file_dels file_mods \
1364 $ for key in author branch branches date desc file_adds file_dels file_mods \
1359 > file_copies file_copies_switch files \
1365 > file_copies file_copies_switch files \
1360 > manifest node parents rev tags diffstat extras \
1366 > manifest node parents rev tags diffstat extras \
1361 > p1rev p2rev p1node p2node; do
1367 > p1rev p2rev p1node p2node; do
1362 > for mode in '' --verbose --debug; do
1368 > for mode in '' --verbose --debug; do
1363 > hg log $mode --template "$key$mode: {$key}\n"
1369 > hg log $mode --template "$key$mode: {$key}\n"
1364 > done
1370 > done
1365 > done
1371 > done
1366 author: test
1372 author: test
1367 author: User Name <user@hostname>
1373 author: User Name <user@hostname>
1368 author: person
1374 author: person
1369 author: person
1375 author: person
1370 author: person
1376 author: person
1371 author: person
1377 author: person
1372 author: other@place
1378 author: other@place
1373 author: A. N. Other <other@place>
1379 author: A. N. Other <other@place>
1374 author: User Name <user@hostname>
1380 author: User Name <user@hostname>
1375 author--verbose: test
1381 author--verbose: test
1376 author--verbose: User Name <user@hostname>
1382 author--verbose: User Name <user@hostname>
1377 author--verbose: person
1383 author--verbose: person
1378 author--verbose: person
1384 author--verbose: person
1379 author--verbose: person
1385 author--verbose: person
1380 author--verbose: person
1386 author--verbose: person
1381 author--verbose: other@place
1387 author--verbose: other@place
1382 author--verbose: A. N. Other <other@place>
1388 author--verbose: A. N. Other <other@place>
1383 author--verbose: User Name <user@hostname>
1389 author--verbose: User Name <user@hostname>
1384 author--debug: test
1390 author--debug: test
1385 author--debug: User Name <user@hostname>
1391 author--debug: User Name <user@hostname>
1386 author--debug: person
1392 author--debug: person
1387 author--debug: person
1393 author--debug: person
1388 author--debug: person
1394 author--debug: person
1389 author--debug: person
1395 author--debug: person
1390 author--debug: other@place
1396 author--debug: other@place
1391 author--debug: A. N. Other <other@place>
1397 author--debug: A. N. Other <other@place>
1392 author--debug: User Name <user@hostname>
1398 author--debug: User Name <user@hostname>
1393 branch: default
1399 branch: default
1394 branch: default
1400 branch: default
1395 branch: default
1401 branch: default
1396 branch: default
1402 branch: default
1397 branch: foo
1403 branch: foo
1398 branch: default
1404 branch: default
1399 branch: default
1405 branch: default
1400 branch: default
1406 branch: default
1401 branch: default
1407 branch: default
1402 branch--verbose: default
1408 branch--verbose: default
1403 branch--verbose: default
1409 branch--verbose: default
1404 branch--verbose: default
1410 branch--verbose: default
1405 branch--verbose: default
1411 branch--verbose: default
1406 branch--verbose: foo
1412 branch--verbose: foo
1407 branch--verbose: default
1413 branch--verbose: default
1408 branch--verbose: default
1414 branch--verbose: default
1409 branch--verbose: default
1415 branch--verbose: default
1410 branch--verbose: default
1416 branch--verbose: default
1411 branch--debug: default
1417 branch--debug: default
1412 branch--debug: default
1418 branch--debug: default
1413 branch--debug: default
1419 branch--debug: default
1414 branch--debug: default
1420 branch--debug: default
1415 branch--debug: foo
1421 branch--debug: foo
1416 branch--debug: default
1422 branch--debug: default
1417 branch--debug: default
1423 branch--debug: default
1418 branch--debug: default
1424 branch--debug: default
1419 branch--debug: default
1425 branch--debug: default
1420 branches:
1426 branches:
1421 branches:
1427 branches:
1422 branches:
1428 branches:
1423 branches:
1429 branches:
1424 branches: foo
1430 branches: foo
1425 branches:
1431 branches:
1426 branches:
1432 branches:
1427 branches:
1433 branches:
1428 branches:
1434 branches:
1429 branches--verbose:
1435 branches--verbose:
1430 branches--verbose:
1436 branches--verbose:
1431 branches--verbose:
1437 branches--verbose:
1432 branches--verbose:
1438 branches--verbose:
1433 branches--verbose: foo
1439 branches--verbose: foo
1434 branches--verbose:
1440 branches--verbose:
1435 branches--verbose:
1441 branches--verbose:
1436 branches--verbose:
1442 branches--verbose:
1437 branches--verbose:
1443 branches--verbose:
1438 branches--debug:
1444 branches--debug:
1439 branches--debug:
1445 branches--debug:
1440 branches--debug:
1446 branches--debug:
1441 branches--debug:
1447 branches--debug:
1442 branches--debug: foo
1448 branches--debug: foo
1443 branches--debug:
1449 branches--debug:
1444 branches--debug:
1450 branches--debug:
1445 branches--debug:
1451 branches--debug:
1446 branches--debug:
1452 branches--debug:
1447 date: 1577872860.00
1453 date: 1577872860.00
1448 date: 1000000.00
1454 date: 1000000.00
1449 date: 1500001.00
1455 date: 1500001.00
1450 date: 1500000.00
1456 date: 1500000.00
1451 date: 1400000.00
1457 date: 1400000.00
1452 date: 1300000.00
1458 date: 1300000.00
1453 date: 1200000.00
1459 date: 1200000.00
1454 date: 1100000.00
1460 date: 1100000.00
1455 date: 1000000.00
1461 date: 1000000.00
1456 date--verbose: 1577872860.00
1462 date--verbose: 1577872860.00
1457 date--verbose: 1000000.00
1463 date--verbose: 1000000.00
1458 date--verbose: 1500001.00
1464 date--verbose: 1500001.00
1459 date--verbose: 1500000.00
1465 date--verbose: 1500000.00
1460 date--verbose: 1400000.00
1466 date--verbose: 1400000.00
1461 date--verbose: 1300000.00
1467 date--verbose: 1300000.00
1462 date--verbose: 1200000.00
1468 date--verbose: 1200000.00
1463 date--verbose: 1100000.00
1469 date--verbose: 1100000.00
1464 date--verbose: 1000000.00
1470 date--verbose: 1000000.00
1465 date--debug: 1577872860.00
1471 date--debug: 1577872860.00
1466 date--debug: 1000000.00
1472 date--debug: 1000000.00
1467 date--debug: 1500001.00
1473 date--debug: 1500001.00
1468 date--debug: 1500000.00
1474 date--debug: 1500000.00
1469 date--debug: 1400000.00
1475 date--debug: 1400000.00
1470 date--debug: 1300000.00
1476 date--debug: 1300000.00
1471 date--debug: 1200000.00
1477 date--debug: 1200000.00
1472 date--debug: 1100000.00
1478 date--debug: 1100000.00
1473 date--debug: 1000000.00
1479 date--debug: 1000000.00
1474 desc: third
1480 desc: third
1475 desc: second
1481 desc: second
1476 desc: merge
1482 desc: merge
1477 desc: new head
1483 desc: new head
1478 desc: new branch
1484 desc: new branch
1479 desc: no user, no domain
1485 desc: no user, no domain
1480 desc: no person
1486 desc: no person
1481 desc: other 1
1487 desc: other 1
1482 other 2
1488 other 2
1483
1489
1484 other 3
1490 other 3
1485 desc: line 1
1491 desc: line 1
1486 line 2
1492 line 2
1487 desc--verbose: third
1493 desc--verbose: third
1488 desc--verbose: second
1494 desc--verbose: second
1489 desc--verbose: merge
1495 desc--verbose: merge
1490 desc--verbose: new head
1496 desc--verbose: new head
1491 desc--verbose: new branch
1497 desc--verbose: new branch
1492 desc--verbose: no user, no domain
1498 desc--verbose: no user, no domain
1493 desc--verbose: no person
1499 desc--verbose: no person
1494 desc--verbose: other 1
1500 desc--verbose: other 1
1495 other 2
1501 other 2
1496
1502
1497 other 3
1503 other 3
1498 desc--verbose: line 1
1504 desc--verbose: line 1
1499 line 2
1505 line 2
1500 desc--debug: third
1506 desc--debug: third
1501 desc--debug: second
1507 desc--debug: second
1502 desc--debug: merge
1508 desc--debug: merge
1503 desc--debug: new head
1509 desc--debug: new head
1504 desc--debug: new branch
1510 desc--debug: new branch
1505 desc--debug: no user, no domain
1511 desc--debug: no user, no domain
1506 desc--debug: no person
1512 desc--debug: no person
1507 desc--debug: other 1
1513 desc--debug: other 1
1508 other 2
1514 other 2
1509
1515
1510 other 3
1516 other 3
1511 desc--debug: line 1
1517 desc--debug: line 1
1512 line 2
1518 line 2
1513 file_adds: fourth third
1519 file_adds: fourth third
1514 file_adds: second
1520 file_adds: second
1515 file_adds:
1521 file_adds:
1516 file_adds: d
1522 file_adds: d
1517 file_adds:
1523 file_adds:
1518 file_adds:
1524 file_adds:
1519 file_adds: c
1525 file_adds: c
1520 file_adds: b
1526 file_adds: b
1521 file_adds: a
1527 file_adds: a
1522 file_adds--verbose: fourth third
1528 file_adds--verbose: fourth third
1523 file_adds--verbose: second
1529 file_adds--verbose: second
1524 file_adds--verbose:
1530 file_adds--verbose:
1525 file_adds--verbose: d
1531 file_adds--verbose: d
1526 file_adds--verbose:
1532 file_adds--verbose:
1527 file_adds--verbose:
1533 file_adds--verbose:
1528 file_adds--verbose: c
1534 file_adds--verbose: c
1529 file_adds--verbose: b
1535 file_adds--verbose: b
1530 file_adds--verbose: a
1536 file_adds--verbose: a
1531 file_adds--debug: fourth third
1537 file_adds--debug: fourth third
1532 file_adds--debug: second
1538 file_adds--debug: second
1533 file_adds--debug:
1539 file_adds--debug:
1534 file_adds--debug: d
1540 file_adds--debug: d
1535 file_adds--debug:
1541 file_adds--debug:
1536 file_adds--debug:
1542 file_adds--debug:
1537 file_adds--debug: c
1543 file_adds--debug: c
1538 file_adds--debug: b
1544 file_adds--debug: b
1539 file_adds--debug: a
1545 file_adds--debug: a
1540 file_dels: second
1546 file_dels: second
1541 file_dels:
1547 file_dels:
1542 file_dels:
1548 file_dels:
1543 file_dels:
1549 file_dels:
1544 file_dels:
1550 file_dels:
1545 file_dels:
1551 file_dels:
1546 file_dels:
1552 file_dels:
1547 file_dels:
1553 file_dels:
1548 file_dels:
1554 file_dels:
1549 file_dels--verbose: second
1555 file_dels--verbose: second
1550 file_dels--verbose:
1556 file_dels--verbose:
1551 file_dels--verbose:
1557 file_dels--verbose:
1552 file_dels--verbose:
1558 file_dels--verbose:
1553 file_dels--verbose:
1559 file_dels--verbose:
1554 file_dels--verbose:
1560 file_dels--verbose:
1555 file_dels--verbose:
1561 file_dels--verbose:
1556 file_dels--verbose:
1562 file_dels--verbose:
1557 file_dels--verbose:
1563 file_dels--verbose:
1558 file_dels--debug: second
1564 file_dels--debug: second
1559 file_dels--debug:
1565 file_dels--debug:
1560 file_dels--debug:
1566 file_dels--debug:
1561 file_dels--debug:
1567 file_dels--debug:
1562 file_dels--debug:
1568 file_dels--debug:
1563 file_dels--debug:
1569 file_dels--debug:
1564 file_dels--debug:
1570 file_dels--debug:
1565 file_dels--debug:
1571 file_dels--debug:
1566 file_dels--debug:
1572 file_dels--debug:
1567 file_mods:
1573 file_mods:
1568 file_mods:
1574 file_mods:
1569 file_mods:
1575 file_mods:
1570 file_mods:
1576 file_mods:
1571 file_mods:
1577 file_mods:
1572 file_mods: c
1578 file_mods: c
1573 file_mods:
1579 file_mods:
1574 file_mods:
1580 file_mods:
1575 file_mods:
1581 file_mods:
1576 file_mods--verbose:
1582 file_mods--verbose:
1577 file_mods--verbose:
1583 file_mods--verbose:
1578 file_mods--verbose:
1584 file_mods--verbose:
1579 file_mods--verbose:
1585 file_mods--verbose:
1580 file_mods--verbose:
1586 file_mods--verbose:
1581 file_mods--verbose: c
1587 file_mods--verbose: c
1582 file_mods--verbose:
1588 file_mods--verbose:
1583 file_mods--verbose:
1589 file_mods--verbose:
1584 file_mods--verbose:
1590 file_mods--verbose:
1585 file_mods--debug:
1591 file_mods--debug:
1586 file_mods--debug:
1592 file_mods--debug:
1587 file_mods--debug:
1593 file_mods--debug:
1588 file_mods--debug:
1594 file_mods--debug:
1589 file_mods--debug:
1595 file_mods--debug:
1590 file_mods--debug: c
1596 file_mods--debug: c
1591 file_mods--debug:
1597 file_mods--debug:
1592 file_mods--debug:
1598 file_mods--debug:
1593 file_mods--debug:
1599 file_mods--debug:
1594 file_copies: fourth (second)
1600 file_copies: fourth (second)
1595 file_copies:
1601 file_copies:
1596 file_copies:
1602 file_copies:
1597 file_copies:
1603 file_copies:
1598 file_copies:
1604 file_copies:
1599 file_copies:
1605 file_copies:
1600 file_copies:
1606 file_copies:
1601 file_copies:
1607 file_copies:
1602 file_copies:
1608 file_copies:
1603 file_copies--verbose: fourth (second)
1609 file_copies--verbose: fourth (second)
1604 file_copies--verbose:
1610 file_copies--verbose:
1605 file_copies--verbose:
1611 file_copies--verbose:
1606 file_copies--verbose:
1612 file_copies--verbose:
1607 file_copies--verbose:
1613 file_copies--verbose:
1608 file_copies--verbose:
1614 file_copies--verbose:
1609 file_copies--verbose:
1615 file_copies--verbose:
1610 file_copies--verbose:
1616 file_copies--verbose:
1611 file_copies--verbose:
1617 file_copies--verbose:
1612 file_copies--debug: fourth (second)
1618 file_copies--debug: fourth (second)
1613 file_copies--debug:
1619 file_copies--debug:
1614 file_copies--debug:
1620 file_copies--debug:
1615 file_copies--debug:
1621 file_copies--debug:
1616 file_copies--debug:
1622 file_copies--debug:
1617 file_copies--debug:
1623 file_copies--debug:
1618 file_copies--debug:
1624 file_copies--debug:
1619 file_copies--debug:
1625 file_copies--debug:
1620 file_copies--debug:
1626 file_copies--debug:
1621 file_copies_switch:
1627 file_copies_switch:
1622 file_copies_switch:
1628 file_copies_switch:
1623 file_copies_switch:
1629 file_copies_switch:
1624 file_copies_switch:
1630 file_copies_switch:
1625 file_copies_switch:
1631 file_copies_switch:
1626 file_copies_switch:
1632 file_copies_switch:
1627 file_copies_switch:
1633 file_copies_switch:
1628 file_copies_switch:
1634 file_copies_switch:
1629 file_copies_switch:
1635 file_copies_switch:
1630 file_copies_switch--verbose:
1636 file_copies_switch--verbose:
1631 file_copies_switch--verbose:
1637 file_copies_switch--verbose:
1632 file_copies_switch--verbose:
1638 file_copies_switch--verbose:
1633 file_copies_switch--verbose:
1639 file_copies_switch--verbose:
1634 file_copies_switch--verbose:
1640 file_copies_switch--verbose:
1635 file_copies_switch--verbose:
1641 file_copies_switch--verbose:
1636 file_copies_switch--verbose:
1642 file_copies_switch--verbose:
1637 file_copies_switch--verbose:
1643 file_copies_switch--verbose:
1638 file_copies_switch--verbose:
1644 file_copies_switch--verbose:
1639 file_copies_switch--debug:
1645 file_copies_switch--debug:
1640 file_copies_switch--debug:
1646 file_copies_switch--debug:
1641 file_copies_switch--debug:
1647 file_copies_switch--debug:
1642 file_copies_switch--debug:
1648 file_copies_switch--debug:
1643 file_copies_switch--debug:
1649 file_copies_switch--debug:
1644 file_copies_switch--debug:
1650 file_copies_switch--debug:
1645 file_copies_switch--debug:
1651 file_copies_switch--debug:
1646 file_copies_switch--debug:
1652 file_copies_switch--debug:
1647 file_copies_switch--debug:
1653 file_copies_switch--debug:
1648 files: fourth second third
1654 files: fourth second third
1649 files: second
1655 files: second
1650 files:
1656 files:
1651 files: d
1657 files: d
1652 files:
1658 files:
1653 files: c
1659 files: c
1654 files: c
1660 files: c
1655 files: b
1661 files: b
1656 files: a
1662 files: a
1657 files--verbose: fourth second third
1663 files--verbose: fourth second third
1658 files--verbose: second
1664 files--verbose: second
1659 files--verbose:
1665 files--verbose:
1660 files--verbose: d
1666 files--verbose: d
1661 files--verbose:
1667 files--verbose:
1662 files--verbose: c
1668 files--verbose: c
1663 files--verbose: c
1669 files--verbose: c
1664 files--verbose: b
1670 files--verbose: b
1665 files--verbose: a
1671 files--verbose: a
1666 files--debug: fourth second third
1672 files--debug: fourth second third
1667 files--debug: second
1673 files--debug: second
1668 files--debug:
1674 files--debug:
1669 files--debug: d
1675 files--debug: d
1670 files--debug:
1676 files--debug:
1671 files--debug: c
1677 files--debug: c
1672 files--debug: c
1678 files--debug: c
1673 files--debug: b
1679 files--debug: b
1674 files--debug: a
1680 files--debug: a
1675 manifest: 6:94961b75a2da
1681 manifest: 6:94961b75a2da
1676 manifest: 5:f2dbc354b94e
1682 manifest: 5:f2dbc354b94e
1677 manifest: 4:4dc3def4f9b4
1683 manifest: 4:4dc3def4f9b4
1678 manifest: 4:4dc3def4f9b4
1684 manifest: 4:4dc3def4f9b4
1679 manifest: 3:cb5a1327723b
1685 manifest: 3:cb5a1327723b
1680 manifest: 3:cb5a1327723b
1686 manifest: 3:cb5a1327723b
1681 manifest: 2:6e0e82995c35
1687 manifest: 2:6e0e82995c35
1682 manifest: 1:4e8d705b1e53
1688 manifest: 1:4e8d705b1e53
1683 manifest: 0:a0c8bcbbb45c
1689 manifest: 0:a0c8bcbbb45c
1684 manifest--verbose: 6:94961b75a2da
1690 manifest--verbose: 6:94961b75a2da
1685 manifest--verbose: 5:f2dbc354b94e
1691 manifest--verbose: 5:f2dbc354b94e
1686 manifest--verbose: 4:4dc3def4f9b4
1692 manifest--verbose: 4:4dc3def4f9b4
1687 manifest--verbose: 4:4dc3def4f9b4
1693 manifest--verbose: 4:4dc3def4f9b4
1688 manifest--verbose: 3:cb5a1327723b
1694 manifest--verbose: 3:cb5a1327723b
1689 manifest--verbose: 3:cb5a1327723b
1695 manifest--verbose: 3:cb5a1327723b
1690 manifest--verbose: 2:6e0e82995c35
1696 manifest--verbose: 2:6e0e82995c35
1691 manifest--verbose: 1:4e8d705b1e53
1697 manifest--verbose: 1:4e8d705b1e53
1692 manifest--verbose: 0:a0c8bcbbb45c
1698 manifest--verbose: 0:a0c8bcbbb45c
1693 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1699 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1694 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1700 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1695 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1701 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1696 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1702 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1697 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1703 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1698 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1704 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1699 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1705 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1700 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1706 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1701 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1707 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1702 node: 95c24699272ef57d062b8bccc32c878bf841784a
1708 node: 95c24699272ef57d062b8bccc32c878bf841784a
1703 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1709 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1704 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1710 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1705 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1711 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1706 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1712 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1707 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1713 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1708 node: 97054abb4ab824450e9164180baf491ae0078465
1714 node: 97054abb4ab824450e9164180baf491ae0078465
1709 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1715 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1710 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1716 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1711 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1717 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1712 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1718 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1713 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1719 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1714 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1720 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1715 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1721 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1716 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1722 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1717 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1723 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1718 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1724 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1719 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1725 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1720 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1726 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1721 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1727 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1722 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1728 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1723 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1729 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1724 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1730 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1725 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1731 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1726 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1732 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1727 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1733 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1728 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1734 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1729 parents:
1735 parents:
1730 parents: -1:000000000000
1736 parents: -1:000000000000
1731 parents: 5:13207e5a10d9 4:bbe44766e73d
1737 parents: 5:13207e5a10d9 4:bbe44766e73d
1732 parents: 3:10e46f2dcbf4
1738 parents: 3:10e46f2dcbf4
1733 parents:
1739 parents:
1734 parents:
1740 parents:
1735 parents:
1741 parents:
1736 parents:
1742 parents:
1737 parents:
1743 parents:
1738 parents--verbose:
1744 parents--verbose:
1739 parents--verbose: -1:000000000000
1745 parents--verbose: -1:000000000000
1740 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1746 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1741 parents--verbose: 3:10e46f2dcbf4
1747 parents--verbose: 3:10e46f2dcbf4
1742 parents--verbose:
1748 parents--verbose:
1743 parents--verbose:
1749 parents--verbose:
1744 parents--verbose:
1750 parents--verbose:
1745 parents--verbose:
1751 parents--verbose:
1746 parents--verbose:
1752 parents--verbose:
1747 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1753 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1748 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1754 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1749 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1755 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1750 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1756 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1751 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1757 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1752 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1758 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1753 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1759 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1754 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1760 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1755 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1761 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1756 rev: 8
1762 rev: 8
1757 rev: 7
1763 rev: 7
1758 rev: 6
1764 rev: 6
1759 rev: 5
1765 rev: 5
1760 rev: 4
1766 rev: 4
1761 rev: 3
1767 rev: 3
1762 rev: 2
1768 rev: 2
1763 rev: 1
1769 rev: 1
1764 rev: 0
1770 rev: 0
1765 rev--verbose: 8
1771 rev--verbose: 8
1766 rev--verbose: 7
1772 rev--verbose: 7
1767 rev--verbose: 6
1773 rev--verbose: 6
1768 rev--verbose: 5
1774 rev--verbose: 5
1769 rev--verbose: 4
1775 rev--verbose: 4
1770 rev--verbose: 3
1776 rev--verbose: 3
1771 rev--verbose: 2
1777 rev--verbose: 2
1772 rev--verbose: 1
1778 rev--verbose: 1
1773 rev--verbose: 0
1779 rev--verbose: 0
1774 rev--debug: 8
1780 rev--debug: 8
1775 rev--debug: 7
1781 rev--debug: 7
1776 rev--debug: 6
1782 rev--debug: 6
1777 rev--debug: 5
1783 rev--debug: 5
1778 rev--debug: 4
1784 rev--debug: 4
1779 rev--debug: 3
1785 rev--debug: 3
1780 rev--debug: 2
1786 rev--debug: 2
1781 rev--debug: 1
1787 rev--debug: 1
1782 rev--debug: 0
1788 rev--debug: 0
1783 tags: tip
1789 tags: tip
1784 tags:
1790 tags:
1785 tags:
1791 tags:
1786 tags:
1792 tags:
1787 tags:
1793 tags:
1788 tags:
1794 tags:
1789 tags:
1795 tags:
1790 tags:
1796 tags:
1791 tags:
1797 tags:
1792 tags--verbose: tip
1798 tags--verbose: tip
1793 tags--verbose:
1799 tags--verbose:
1794 tags--verbose:
1800 tags--verbose:
1795 tags--verbose:
1801 tags--verbose:
1796 tags--verbose:
1802 tags--verbose:
1797 tags--verbose:
1803 tags--verbose:
1798 tags--verbose:
1804 tags--verbose:
1799 tags--verbose:
1805 tags--verbose:
1800 tags--verbose:
1806 tags--verbose:
1801 tags--debug: tip
1807 tags--debug: tip
1802 tags--debug:
1808 tags--debug:
1803 tags--debug:
1809 tags--debug:
1804 tags--debug:
1810 tags--debug:
1805 tags--debug:
1811 tags--debug:
1806 tags--debug:
1812 tags--debug:
1807 tags--debug:
1813 tags--debug:
1808 tags--debug:
1814 tags--debug:
1809 tags--debug:
1815 tags--debug:
1810 diffstat: 3: +2/-1
1816 diffstat: 3: +2/-1
1811 diffstat: 1: +1/-0
1817 diffstat: 1: +1/-0
1812 diffstat: 0: +0/-0
1818 diffstat: 0: +0/-0
1813 diffstat: 1: +1/-0
1819 diffstat: 1: +1/-0
1814 diffstat: 0: +0/-0
1820 diffstat: 0: +0/-0
1815 diffstat: 1: +1/-0
1821 diffstat: 1: +1/-0
1816 diffstat: 1: +4/-0
1822 diffstat: 1: +4/-0
1817 diffstat: 1: +2/-0
1823 diffstat: 1: +2/-0
1818 diffstat: 1: +1/-0
1824 diffstat: 1: +1/-0
1819 diffstat--verbose: 3: +2/-1
1825 diffstat--verbose: 3: +2/-1
1820 diffstat--verbose: 1: +1/-0
1826 diffstat--verbose: 1: +1/-0
1821 diffstat--verbose: 0: +0/-0
1827 diffstat--verbose: 0: +0/-0
1822 diffstat--verbose: 1: +1/-0
1828 diffstat--verbose: 1: +1/-0
1823 diffstat--verbose: 0: +0/-0
1829 diffstat--verbose: 0: +0/-0
1824 diffstat--verbose: 1: +1/-0
1830 diffstat--verbose: 1: +1/-0
1825 diffstat--verbose: 1: +4/-0
1831 diffstat--verbose: 1: +4/-0
1826 diffstat--verbose: 1: +2/-0
1832 diffstat--verbose: 1: +2/-0
1827 diffstat--verbose: 1: +1/-0
1833 diffstat--verbose: 1: +1/-0
1828 diffstat--debug: 3: +2/-1
1834 diffstat--debug: 3: +2/-1
1829 diffstat--debug: 1: +1/-0
1835 diffstat--debug: 1: +1/-0
1830 diffstat--debug: 0: +0/-0
1836 diffstat--debug: 0: +0/-0
1831 diffstat--debug: 1: +1/-0
1837 diffstat--debug: 1: +1/-0
1832 diffstat--debug: 0: +0/-0
1838 diffstat--debug: 0: +0/-0
1833 diffstat--debug: 1: +1/-0
1839 diffstat--debug: 1: +1/-0
1834 diffstat--debug: 1: +4/-0
1840 diffstat--debug: 1: +4/-0
1835 diffstat--debug: 1: +2/-0
1841 diffstat--debug: 1: +2/-0
1836 diffstat--debug: 1: +1/-0
1842 diffstat--debug: 1: +1/-0
1837 extras: branch=default
1843 extras: branch=default
1838 extras: branch=default
1844 extras: branch=default
1839 extras: branch=default
1845 extras: branch=default
1840 extras: branch=default
1846 extras: branch=default
1841 extras: branch=foo
1847 extras: branch=foo
1842 extras: branch=default
1848 extras: branch=default
1843 extras: branch=default
1849 extras: branch=default
1844 extras: branch=default
1850 extras: branch=default
1845 extras: branch=default
1851 extras: branch=default
1846 extras--verbose: branch=default
1852 extras--verbose: branch=default
1847 extras--verbose: branch=default
1853 extras--verbose: branch=default
1848 extras--verbose: branch=default
1854 extras--verbose: branch=default
1849 extras--verbose: branch=default
1855 extras--verbose: branch=default
1850 extras--verbose: branch=foo
1856 extras--verbose: branch=foo
1851 extras--verbose: branch=default
1857 extras--verbose: branch=default
1852 extras--verbose: branch=default
1858 extras--verbose: branch=default
1853 extras--verbose: branch=default
1859 extras--verbose: branch=default
1854 extras--verbose: branch=default
1860 extras--verbose: branch=default
1855 extras--debug: branch=default
1861 extras--debug: branch=default
1856 extras--debug: branch=default
1862 extras--debug: branch=default
1857 extras--debug: branch=default
1863 extras--debug: branch=default
1858 extras--debug: branch=default
1864 extras--debug: branch=default
1859 extras--debug: branch=foo
1865 extras--debug: branch=foo
1860 extras--debug: branch=default
1866 extras--debug: branch=default
1861 extras--debug: branch=default
1867 extras--debug: branch=default
1862 extras--debug: branch=default
1868 extras--debug: branch=default
1863 extras--debug: branch=default
1869 extras--debug: branch=default
1864 p1rev: 7
1870 p1rev: 7
1865 p1rev: -1
1871 p1rev: -1
1866 p1rev: 5
1872 p1rev: 5
1867 p1rev: 3
1873 p1rev: 3
1868 p1rev: 3
1874 p1rev: 3
1869 p1rev: 2
1875 p1rev: 2
1870 p1rev: 1
1876 p1rev: 1
1871 p1rev: 0
1877 p1rev: 0
1872 p1rev: -1
1878 p1rev: -1
1873 p1rev--verbose: 7
1879 p1rev--verbose: 7
1874 p1rev--verbose: -1
1880 p1rev--verbose: -1
1875 p1rev--verbose: 5
1881 p1rev--verbose: 5
1876 p1rev--verbose: 3
1882 p1rev--verbose: 3
1877 p1rev--verbose: 3
1883 p1rev--verbose: 3
1878 p1rev--verbose: 2
1884 p1rev--verbose: 2
1879 p1rev--verbose: 1
1885 p1rev--verbose: 1
1880 p1rev--verbose: 0
1886 p1rev--verbose: 0
1881 p1rev--verbose: -1
1887 p1rev--verbose: -1
1882 p1rev--debug: 7
1888 p1rev--debug: 7
1883 p1rev--debug: -1
1889 p1rev--debug: -1
1884 p1rev--debug: 5
1890 p1rev--debug: 5
1885 p1rev--debug: 3
1891 p1rev--debug: 3
1886 p1rev--debug: 3
1892 p1rev--debug: 3
1887 p1rev--debug: 2
1893 p1rev--debug: 2
1888 p1rev--debug: 1
1894 p1rev--debug: 1
1889 p1rev--debug: 0
1895 p1rev--debug: 0
1890 p1rev--debug: -1
1896 p1rev--debug: -1
1891 p2rev: -1
1897 p2rev: -1
1892 p2rev: -1
1898 p2rev: -1
1893 p2rev: 4
1899 p2rev: 4
1894 p2rev: -1
1900 p2rev: -1
1895 p2rev: -1
1901 p2rev: -1
1896 p2rev: -1
1902 p2rev: -1
1897 p2rev: -1
1903 p2rev: -1
1898 p2rev: -1
1904 p2rev: -1
1899 p2rev: -1
1905 p2rev: -1
1900 p2rev--verbose: -1
1906 p2rev--verbose: -1
1901 p2rev--verbose: -1
1907 p2rev--verbose: -1
1902 p2rev--verbose: 4
1908 p2rev--verbose: 4
1903 p2rev--verbose: -1
1909 p2rev--verbose: -1
1904 p2rev--verbose: -1
1910 p2rev--verbose: -1
1905 p2rev--verbose: -1
1911 p2rev--verbose: -1
1906 p2rev--verbose: -1
1912 p2rev--verbose: -1
1907 p2rev--verbose: -1
1913 p2rev--verbose: -1
1908 p2rev--verbose: -1
1914 p2rev--verbose: -1
1909 p2rev--debug: -1
1915 p2rev--debug: -1
1910 p2rev--debug: -1
1916 p2rev--debug: -1
1911 p2rev--debug: 4
1917 p2rev--debug: 4
1912 p2rev--debug: -1
1918 p2rev--debug: -1
1913 p2rev--debug: -1
1919 p2rev--debug: -1
1914 p2rev--debug: -1
1920 p2rev--debug: -1
1915 p2rev--debug: -1
1921 p2rev--debug: -1
1916 p2rev--debug: -1
1922 p2rev--debug: -1
1917 p2rev--debug: -1
1923 p2rev--debug: -1
1918 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1924 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1919 p1node: 0000000000000000000000000000000000000000
1925 p1node: 0000000000000000000000000000000000000000
1920 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1926 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1921 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1927 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1922 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1928 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1923 p1node: 97054abb4ab824450e9164180baf491ae0078465
1929 p1node: 97054abb4ab824450e9164180baf491ae0078465
1924 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1930 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1925 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1931 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1926 p1node: 0000000000000000000000000000000000000000
1932 p1node: 0000000000000000000000000000000000000000
1927 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1933 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1928 p1node--verbose: 0000000000000000000000000000000000000000
1934 p1node--verbose: 0000000000000000000000000000000000000000
1929 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1935 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1930 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1936 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1931 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1937 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1932 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1938 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1933 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1939 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1934 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1940 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1935 p1node--verbose: 0000000000000000000000000000000000000000
1941 p1node--verbose: 0000000000000000000000000000000000000000
1936 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1942 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1937 p1node--debug: 0000000000000000000000000000000000000000
1943 p1node--debug: 0000000000000000000000000000000000000000
1938 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1944 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1939 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1945 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1940 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1946 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1941 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1947 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1942 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1948 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1943 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1949 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1944 p1node--debug: 0000000000000000000000000000000000000000
1950 p1node--debug: 0000000000000000000000000000000000000000
1945 p2node: 0000000000000000000000000000000000000000
1951 p2node: 0000000000000000000000000000000000000000
1946 p2node: 0000000000000000000000000000000000000000
1952 p2node: 0000000000000000000000000000000000000000
1947 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1953 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1948 p2node: 0000000000000000000000000000000000000000
1954 p2node: 0000000000000000000000000000000000000000
1949 p2node: 0000000000000000000000000000000000000000
1955 p2node: 0000000000000000000000000000000000000000
1950 p2node: 0000000000000000000000000000000000000000
1956 p2node: 0000000000000000000000000000000000000000
1951 p2node: 0000000000000000000000000000000000000000
1957 p2node: 0000000000000000000000000000000000000000
1952 p2node: 0000000000000000000000000000000000000000
1958 p2node: 0000000000000000000000000000000000000000
1953 p2node: 0000000000000000000000000000000000000000
1959 p2node: 0000000000000000000000000000000000000000
1954 p2node--verbose: 0000000000000000000000000000000000000000
1960 p2node--verbose: 0000000000000000000000000000000000000000
1955 p2node--verbose: 0000000000000000000000000000000000000000
1961 p2node--verbose: 0000000000000000000000000000000000000000
1956 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1962 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1957 p2node--verbose: 0000000000000000000000000000000000000000
1963 p2node--verbose: 0000000000000000000000000000000000000000
1958 p2node--verbose: 0000000000000000000000000000000000000000
1964 p2node--verbose: 0000000000000000000000000000000000000000
1959 p2node--verbose: 0000000000000000000000000000000000000000
1965 p2node--verbose: 0000000000000000000000000000000000000000
1960 p2node--verbose: 0000000000000000000000000000000000000000
1966 p2node--verbose: 0000000000000000000000000000000000000000
1961 p2node--verbose: 0000000000000000000000000000000000000000
1967 p2node--verbose: 0000000000000000000000000000000000000000
1962 p2node--verbose: 0000000000000000000000000000000000000000
1968 p2node--verbose: 0000000000000000000000000000000000000000
1963 p2node--debug: 0000000000000000000000000000000000000000
1969 p2node--debug: 0000000000000000000000000000000000000000
1964 p2node--debug: 0000000000000000000000000000000000000000
1970 p2node--debug: 0000000000000000000000000000000000000000
1965 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1971 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1966 p2node--debug: 0000000000000000000000000000000000000000
1972 p2node--debug: 0000000000000000000000000000000000000000
1967 p2node--debug: 0000000000000000000000000000000000000000
1973 p2node--debug: 0000000000000000000000000000000000000000
1968 p2node--debug: 0000000000000000000000000000000000000000
1974 p2node--debug: 0000000000000000000000000000000000000000
1969 p2node--debug: 0000000000000000000000000000000000000000
1975 p2node--debug: 0000000000000000000000000000000000000000
1970 p2node--debug: 0000000000000000000000000000000000000000
1976 p2node--debug: 0000000000000000000000000000000000000000
1971 p2node--debug: 0000000000000000000000000000000000000000
1977 p2node--debug: 0000000000000000000000000000000000000000
1972
1978
1973 Filters work:
1979 Filters work:
1974
1980
1975 $ hg log --template '{author|domain}\n'
1981 $ hg log --template '{author|domain}\n'
1976
1982
1977 hostname
1983 hostname
1978
1984
1979
1985
1980
1986
1981
1987
1982 place
1988 place
1983 place
1989 place
1984 hostname
1990 hostname
1985
1991
1986 $ hg log --template '{author|person}\n'
1992 $ hg log --template '{author|person}\n'
1987 test
1993 test
1988 User Name
1994 User Name
1989 person
1995 person
1990 person
1996 person
1991 person
1997 person
1992 person
1998 person
1993 other
1999 other
1994 A. N. Other
2000 A. N. Other
1995 User Name
2001 User Name
1996
2002
1997 $ hg log --template '{author|user}\n'
2003 $ hg log --template '{author|user}\n'
1998 test
2004 test
1999 user
2005 user
2000 person
2006 person
2001 person
2007 person
2002 person
2008 person
2003 person
2009 person
2004 other
2010 other
2005 other
2011 other
2006 user
2012 user
2007
2013
2008 $ hg log --template '{date|date}\n'
2014 $ hg log --template '{date|date}\n'
2009 Wed Jan 01 10:01:00 2020 +0000
2015 Wed Jan 01 10:01:00 2020 +0000
2010 Mon Jan 12 13:46:40 1970 +0000
2016 Mon Jan 12 13:46:40 1970 +0000
2011 Sun Jan 18 08:40:01 1970 +0000
2017 Sun Jan 18 08:40:01 1970 +0000
2012 Sun Jan 18 08:40:00 1970 +0000
2018 Sun Jan 18 08:40:00 1970 +0000
2013 Sat Jan 17 04:53:20 1970 +0000
2019 Sat Jan 17 04:53:20 1970 +0000
2014 Fri Jan 16 01:06:40 1970 +0000
2020 Fri Jan 16 01:06:40 1970 +0000
2015 Wed Jan 14 21:20:00 1970 +0000
2021 Wed Jan 14 21:20:00 1970 +0000
2016 Tue Jan 13 17:33:20 1970 +0000
2022 Tue Jan 13 17:33:20 1970 +0000
2017 Mon Jan 12 13:46:40 1970 +0000
2023 Mon Jan 12 13:46:40 1970 +0000
2018
2024
2019 $ hg log --template '{date|isodate}\n'
2025 $ hg log --template '{date|isodate}\n'
2020 2020-01-01 10:01 +0000
2026 2020-01-01 10:01 +0000
2021 1970-01-12 13:46 +0000
2027 1970-01-12 13:46 +0000
2022 1970-01-18 08:40 +0000
2028 1970-01-18 08:40 +0000
2023 1970-01-18 08:40 +0000
2029 1970-01-18 08:40 +0000
2024 1970-01-17 04:53 +0000
2030 1970-01-17 04:53 +0000
2025 1970-01-16 01:06 +0000
2031 1970-01-16 01:06 +0000
2026 1970-01-14 21:20 +0000
2032 1970-01-14 21:20 +0000
2027 1970-01-13 17:33 +0000
2033 1970-01-13 17:33 +0000
2028 1970-01-12 13:46 +0000
2034 1970-01-12 13:46 +0000
2029
2035
2030 $ hg log --template '{date|isodatesec}\n'
2036 $ hg log --template '{date|isodatesec}\n'
2031 2020-01-01 10:01:00 +0000
2037 2020-01-01 10:01:00 +0000
2032 1970-01-12 13:46:40 +0000
2038 1970-01-12 13:46:40 +0000
2033 1970-01-18 08:40:01 +0000
2039 1970-01-18 08:40:01 +0000
2034 1970-01-18 08:40:00 +0000
2040 1970-01-18 08:40:00 +0000
2035 1970-01-17 04:53:20 +0000
2041 1970-01-17 04:53:20 +0000
2036 1970-01-16 01:06:40 +0000
2042 1970-01-16 01:06:40 +0000
2037 1970-01-14 21:20:00 +0000
2043 1970-01-14 21:20:00 +0000
2038 1970-01-13 17:33:20 +0000
2044 1970-01-13 17:33:20 +0000
2039 1970-01-12 13:46:40 +0000
2045 1970-01-12 13:46:40 +0000
2040
2046
2041 $ hg log --template '{date|rfc822date}\n'
2047 $ hg log --template '{date|rfc822date}\n'
2042 Wed, 01 Jan 2020 10:01:00 +0000
2048 Wed, 01 Jan 2020 10:01:00 +0000
2043 Mon, 12 Jan 1970 13:46:40 +0000
2049 Mon, 12 Jan 1970 13:46:40 +0000
2044 Sun, 18 Jan 1970 08:40:01 +0000
2050 Sun, 18 Jan 1970 08:40:01 +0000
2045 Sun, 18 Jan 1970 08:40:00 +0000
2051 Sun, 18 Jan 1970 08:40:00 +0000
2046 Sat, 17 Jan 1970 04:53:20 +0000
2052 Sat, 17 Jan 1970 04:53:20 +0000
2047 Fri, 16 Jan 1970 01:06:40 +0000
2053 Fri, 16 Jan 1970 01:06:40 +0000
2048 Wed, 14 Jan 1970 21:20:00 +0000
2054 Wed, 14 Jan 1970 21:20:00 +0000
2049 Tue, 13 Jan 1970 17:33:20 +0000
2055 Tue, 13 Jan 1970 17:33:20 +0000
2050 Mon, 12 Jan 1970 13:46:40 +0000
2056 Mon, 12 Jan 1970 13:46:40 +0000
2051
2057
2052 $ hg log --template '{desc|firstline}\n'
2058 $ hg log --template '{desc|firstline}\n'
2053 third
2059 third
2054 second
2060 second
2055 merge
2061 merge
2056 new head
2062 new head
2057 new branch
2063 new branch
2058 no user, no domain
2064 no user, no domain
2059 no person
2065 no person
2060 other 1
2066 other 1
2061 line 1
2067 line 1
2062
2068
2063 $ hg log --template '{node|short}\n'
2069 $ hg log --template '{node|short}\n'
2064 95c24699272e
2070 95c24699272e
2065 29114dbae42b
2071 29114dbae42b
2066 d41e714fe50d
2072 d41e714fe50d
2067 13207e5a10d9
2073 13207e5a10d9
2068 bbe44766e73d
2074 bbe44766e73d
2069 10e46f2dcbf4
2075 10e46f2dcbf4
2070 97054abb4ab8
2076 97054abb4ab8
2071 b608e9d1a3f0
2077 b608e9d1a3f0
2072 1e4e1b8f71e0
2078 1e4e1b8f71e0
2073
2079
2074 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
2080 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
2075 <changeset author="test"/>
2081 <changeset author="test"/>
2076 <changeset author="User Name &lt;user@hostname&gt;"/>
2082 <changeset author="User Name &lt;user@hostname&gt;"/>
2077 <changeset author="person"/>
2083 <changeset author="person"/>
2078 <changeset author="person"/>
2084 <changeset author="person"/>
2079 <changeset author="person"/>
2085 <changeset author="person"/>
2080 <changeset author="person"/>
2086 <changeset author="person"/>
2081 <changeset author="other@place"/>
2087 <changeset author="other@place"/>
2082 <changeset author="A. N. Other &lt;other@place&gt;"/>
2088 <changeset author="A. N. Other &lt;other@place&gt;"/>
2083 <changeset author="User Name &lt;user@hostname&gt;"/>
2089 <changeset author="User Name &lt;user@hostname&gt;"/>
2084
2090
2085 $ hg log --template '{rev}: {children}\n'
2091 $ hg log --template '{rev}: {children}\n'
2086 8:
2092 8:
2087 7: 8:95c24699272e
2093 7: 8:95c24699272e
2088 6:
2094 6:
2089 5: 6:d41e714fe50d
2095 5: 6:d41e714fe50d
2090 4: 6:d41e714fe50d
2096 4: 6:d41e714fe50d
2091 3: 4:bbe44766e73d 5:13207e5a10d9
2097 3: 4:bbe44766e73d 5:13207e5a10d9
2092 2: 3:10e46f2dcbf4
2098 2: 3:10e46f2dcbf4
2093 1: 2:97054abb4ab8
2099 1: 2:97054abb4ab8
2094 0: 1:b608e9d1a3f0
2100 0: 1:b608e9d1a3f0
2095
2101
2096 Formatnode filter works:
2102 Formatnode filter works:
2097
2103
2098 $ hg -q log -r 0 --template '{node|formatnode}\n'
2104 $ hg -q log -r 0 --template '{node|formatnode}\n'
2099 1e4e1b8f71e0
2105 1e4e1b8f71e0
2100
2106
2101 $ hg log -r 0 --template '{node|formatnode}\n'
2107 $ hg log -r 0 --template '{node|formatnode}\n'
2102 1e4e1b8f71e0
2108 1e4e1b8f71e0
2103
2109
2104 $ hg -v log -r 0 --template '{node|formatnode}\n'
2110 $ hg -v log -r 0 --template '{node|formatnode}\n'
2105 1e4e1b8f71e0
2111 1e4e1b8f71e0
2106
2112
2107 $ hg --debug log -r 0 --template '{node|formatnode}\n'
2113 $ hg --debug log -r 0 --template '{node|formatnode}\n'
2108 1e4e1b8f71e05681d422154f5421e385fec3454f
2114 1e4e1b8f71e05681d422154f5421e385fec3454f
2109
2115
2110 Age filter:
2116 Age filter:
2111
2117
2112 $ hg init unstable-hash
2118 $ hg init unstable-hash
2113 $ cd unstable-hash
2119 $ cd unstable-hash
2114 $ hg log --template '{date|age}\n' > /dev/null || exit 1
2120 $ hg log --template '{date|age}\n' > /dev/null || exit 1
2115
2121
2116 >>> from datetime import datetime, timedelta
2122 >>> from datetime import datetime, timedelta
2117 >>> fp = open('a', 'w')
2123 >>> fp = open('a', 'w')
2118 >>> n = datetime.now() + timedelta(366 * 7)
2124 >>> n = datetime.now() + timedelta(366 * 7)
2119 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
2125 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
2120 >>> fp.close()
2126 >>> fp.close()
2121 $ hg add a
2127 $ hg add a
2122 $ hg commit -m future -d "`cat a`"
2128 $ hg commit -m future -d "`cat a`"
2123
2129
2124 $ hg log -l1 --template '{date|age}\n'
2130 $ hg log -l1 --template '{date|age}\n'
2125 7 years from now
2131 7 years from now
2126
2132
2127 $ cd ..
2133 $ cd ..
2128 $ rm -rf unstable-hash
2134 $ rm -rf unstable-hash
2129
2135
2130 Add a dummy commit to make up for the instability of the above:
2136 Add a dummy commit to make up for the instability of the above:
2131
2137
2132 $ echo a > a
2138 $ echo a > a
2133 $ hg add a
2139 $ hg add a
2134 $ hg ci -m future
2140 $ hg ci -m future
2135
2141
2136 Count filter:
2142 Count filter:
2137
2143
2138 $ hg log -l1 --template '{node|count} {node|short|count}\n'
2144 $ hg log -l1 --template '{node|count} {node|short|count}\n'
2139 40 12
2145 40 12
2140
2146
2141 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
2147 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
2142 0 1 4
2148 0 1 4
2143
2149
2144 $ hg log -G --template '{rev}: children: {children|count}, \
2150 $ hg log -G --template '{rev}: children: {children|count}, \
2145 > tags: {tags|count}, file_adds: {file_adds|count}, \
2151 > tags: {tags|count}, file_adds: {file_adds|count}, \
2146 > ancestors: {revset("ancestors(%s)", rev)|count}'
2152 > ancestors: {revset("ancestors(%s)", rev)|count}'
2147 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
2153 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
2148 |
2154 |
2149 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
2155 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
2150 |
2156 |
2151 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
2157 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
2152
2158
2153 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
2159 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
2154 |\
2160 |\
2155 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
2161 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
2156 | |
2162 | |
2157 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
2163 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
2158 |/
2164 |/
2159 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
2165 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
2160 |
2166 |
2161 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
2167 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
2162 |
2168 |
2163 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
2169 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
2164 |
2170 |
2165 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
2171 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
2166
2172
2167
2173
2168 Upper/lower filters:
2174 Upper/lower filters:
2169
2175
2170 $ hg log -r0 --template '{branch|upper}\n'
2176 $ hg log -r0 --template '{branch|upper}\n'
2171 DEFAULT
2177 DEFAULT
2172 $ hg log -r0 --template '{author|lower}\n'
2178 $ hg log -r0 --template '{author|lower}\n'
2173 user name <user@hostname>
2179 user name <user@hostname>
2174 $ hg log -r0 --template '{date|upper}\n'
2180 $ hg log -r0 --template '{date|upper}\n'
2175 abort: template filter 'upper' is not compatible with keyword 'date'
2181 abort: template filter 'upper' is not compatible with keyword 'date'
2176 [255]
2182 [255]
2177
2183
2178 Add a commit that does all possible modifications at once
2184 Add a commit that does all possible modifications at once
2179
2185
2180 $ echo modify >> third
2186 $ echo modify >> third
2181 $ touch b
2187 $ touch b
2182 $ hg add b
2188 $ hg add b
2183 $ hg mv fourth fifth
2189 $ hg mv fourth fifth
2184 $ hg rm a
2190 $ hg rm a
2185 $ hg ci -m "Modify, add, remove, rename"
2191 $ hg ci -m "Modify, add, remove, rename"
2186
2192
2187 Check the status template
2193 Check the status template
2188
2194
2189 $ cat <<EOF >> $HGRCPATH
2195 $ cat <<EOF >> $HGRCPATH
2190 > [extensions]
2196 > [extensions]
2191 > color=
2197 > color=
2192 > EOF
2198 > EOF
2193
2199
2194 $ hg log -T status -r 10
2200 $ hg log -T status -r 10
2195 changeset: 10:0f9759ec227a
2201 changeset: 10:0f9759ec227a
2196 tag: tip
2202 tag: tip
2197 user: test
2203 user: test
2198 date: Thu Jan 01 00:00:00 1970 +0000
2204 date: Thu Jan 01 00:00:00 1970 +0000
2199 summary: Modify, add, remove, rename
2205 summary: Modify, add, remove, rename
2200 files:
2206 files:
2201 M third
2207 M third
2202 A b
2208 A b
2203 A fifth
2209 A fifth
2204 R a
2210 R a
2205 R fourth
2211 R fourth
2206
2212
2207 $ hg log -T status -C -r 10
2213 $ hg log -T status -C -r 10
2208 changeset: 10:0f9759ec227a
2214 changeset: 10:0f9759ec227a
2209 tag: tip
2215 tag: tip
2210 user: test
2216 user: test
2211 date: Thu Jan 01 00:00:00 1970 +0000
2217 date: Thu Jan 01 00:00:00 1970 +0000
2212 summary: Modify, add, remove, rename
2218 summary: Modify, add, remove, rename
2213 files:
2219 files:
2214 M third
2220 M third
2215 A b
2221 A b
2216 A fifth
2222 A fifth
2217 fourth
2223 fourth
2218 R a
2224 R a
2219 R fourth
2225 R fourth
2220
2226
2221 $ hg log -T status -C -r 10 -v
2227 $ hg log -T status -C -r 10 -v
2222 changeset: 10:0f9759ec227a
2228 changeset: 10:0f9759ec227a
2223 tag: tip
2229 tag: tip
2224 user: test
2230 user: test
2225 date: Thu Jan 01 00:00:00 1970 +0000
2231 date: Thu Jan 01 00:00:00 1970 +0000
2226 description:
2232 description:
2227 Modify, add, remove, rename
2233 Modify, add, remove, rename
2228
2234
2229 files:
2235 files:
2230 M third
2236 M third
2231 A b
2237 A b
2232 A fifth
2238 A fifth
2233 fourth
2239 fourth
2234 R a
2240 R a
2235 R fourth
2241 R fourth
2236
2242
2237 $ hg log -T status -C -r 10 --debug
2243 $ hg log -T status -C -r 10 --debug
2238 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
2244 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
2239 tag: tip
2245 tag: tip
2240 phase: secret
2246 phase: secret
2241 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
2247 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
2242 parent: -1:0000000000000000000000000000000000000000
2248 parent: -1:0000000000000000000000000000000000000000
2243 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
2249 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
2244 user: test
2250 user: test
2245 date: Thu Jan 01 00:00:00 1970 +0000
2251 date: Thu Jan 01 00:00:00 1970 +0000
2246 extra: branch=default
2252 extra: branch=default
2247 description:
2253 description:
2248 Modify, add, remove, rename
2254 Modify, add, remove, rename
2249
2255
2250 files:
2256 files:
2251 M third
2257 M third
2252 A b
2258 A b
2253 A fifth
2259 A fifth
2254 fourth
2260 fourth
2255 R a
2261 R a
2256 R fourth
2262 R fourth
2257
2263
2258 $ hg log -T status -C -r 10 --quiet
2264 $ hg log -T status -C -r 10 --quiet
2259 10:0f9759ec227a
2265 10:0f9759ec227a
2260 $ hg --color=debug log -T status -r 10
2266 $ hg --color=debug log -T status -r 10
2261 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2267 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2262 [log.tag|tag: tip]
2268 [log.tag|tag: tip]
2263 [log.user|user: test]
2269 [log.user|user: test]
2264 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2270 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2265 [log.summary|summary: Modify, add, remove, rename]
2271 [log.summary|summary: Modify, add, remove, rename]
2266 [ui.note log.files|files:]
2272 [ui.note log.files|files:]
2267 [status.modified|M third]
2273 [status.modified|M third]
2268 [status.added|A b]
2274 [status.added|A b]
2269 [status.added|A fifth]
2275 [status.added|A fifth]
2270 [status.removed|R a]
2276 [status.removed|R a]
2271 [status.removed|R fourth]
2277 [status.removed|R fourth]
2272
2278
2273 $ hg --color=debug log -T status -C -r 10
2279 $ hg --color=debug log -T status -C -r 10
2274 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2280 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2275 [log.tag|tag: tip]
2281 [log.tag|tag: tip]
2276 [log.user|user: test]
2282 [log.user|user: test]
2277 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2283 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2278 [log.summary|summary: Modify, add, remove, rename]
2284 [log.summary|summary: Modify, add, remove, rename]
2279 [ui.note log.files|files:]
2285 [ui.note log.files|files:]
2280 [status.modified|M third]
2286 [status.modified|M third]
2281 [status.added|A b]
2287 [status.added|A b]
2282 [status.added|A fifth]
2288 [status.added|A fifth]
2283 [status.copied| fourth]
2289 [status.copied| fourth]
2284 [status.removed|R a]
2290 [status.removed|R a]
2285 [status.removed|R fourth]
2291 [status.removed|R fourth]
2286
2292
2287 $ hg --color=debug log -T status -C -r 10 -v
2293 $ hg --color=debug log -T status -C -r 10 -v
2288 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2294 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2289 [log.tag|tag: tip]
2295 [log.tag|tag: tip]
2290 [log.user|user: test]
2296 [log.user|user: test]
2291 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2297 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2292 [ui.note log.description|description:]
2298 [ui.note log.description|description:]
2293 [ui.note log.description|Modify, add, remove, rename]
2299 [ui.note log.description|Modify, add, remove, rename]
2294
2300
2295 [ui.note log.files|files:]
2301 [ui.note log.files|files:]
2296 [status.modified|M third]
2302 [status.modified|M third]
2297 [status.added|A b]
2303 [status.added|A b]
2298 [status.added|A fifth]
2304 [status.added|A fifth]
2299 [status.copied| fourth]
2305 [status.copied| fourth]
2300 [status.removed|R a]
2306 [status.removed|R a]
2301 [status.removed|R fourth]
2307 [status.removed|R fourth]
2302
2308
2303 $ hg --color=debug log -T status -C -r 10 --debug
2309 $ hg --color=debug log -T status -C -r 10 --debug
2304 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
2310 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
2305 [log.tag|tag: tip]
2311 [log.tag|tag: tip]
2306 [log.phase|phase: secret]
2312 [log.phase|phase: secret]
2307 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
2313 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
2308 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2314 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2309 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
2315 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
2310 [log.user|user: test]
2316 [log.user|user: test]
2311 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2317 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2312 [ui.debug log.extra|extra: branch=default]
2318 [ui.debug log.extra|extra: branch=default]
2313 [ui.note log.description|description:]
2319 [ui.note log.description|description:]
2314 [ui.note log.description|Modify, add, remove, rename]
2320 [ui.note log.description|Modify, add, remove, rename]
2315
2321
2316 [ui.note log.files|files:]
2322 [ui.note log.files|files:]
2317 [status.modified|M third]
2323 [status.modified|M third]
2318 [status.added|A b]
2324 [status.added|A b]
2319 [status.added|A fifth]
2325 [status.added|A fifth]
2320 [status.copied| fourth]
2326 [status.copied| fourth]
2321 [status.removed|R a]
2327 [status.removed|R a]
2322 [status.removed|R fourth]
2328 [status.removed|R fourth]
2323
2329
2324 $ hg --color=debug log -T status -C -r 10 --quiet
2330 $ hg --color=debug log -T status -C -r 10 --quiet
2325 [log.node|10:0f9759ec227a]
2331 [log.node|10:0f9759ec227a]
2326
2332
2327 Check the bisect template
2333 Check the bisect template
2328
2334
2329 $ hg bisect -g 1
2335 $ hg bisect -g 1
2330 $ hg bisect -b 3 --noupdate
2336 $ hg bisect -b 3 --noupdate
2331 Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
2337 Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
2332 $ hg log -T bisect -r 0:4
2338 $ hg log -T bisect -r 0:4
2333 changeset: 0:1e4e1b8f71e0
2339 changeset: 0:1e4e1b8f71e0
2334 bisect: good (implicit)
2340 bisect: good (implicit)
2335 user: User Name <user@hostname>
2341 user: User Name <user@hostname>
2336 date: Mon Jan 12 13:46:40 1970 +0000
2342 date: Mon Jan 12 13:46:40 1970 +0000
2337 summary: line 1
2343 summary: line 1
2338
2344
2339 changeset: 1:b608e9d1a3f0
2345 changeset: 1:b608e9d1a3f0
2340 bisect: good
2346 bisect: good
2341 user: A. N. Other <other@place>
2347 user: A. N. Other <other@place>
2342 date: Tue Jan 13 17:33:20 1970 +0000
2348 date: Tue Jan 13 17:33:20 1970 +0000
2343 summary: other 1
2349 summary: other 1
2344
2350
2345 changeset: 2:97054abb4ab8
2351 changeset: 2:97054abb4ab8
2346 bisect: untested
2352 bisect: untested
2347 user: other@place
2353 user: other@place
2348 date: Wed Jan 14 21:20:00 1970 +0000
2354 date: Wed Jan 14 21:20:00 1970 +0000
2349 summary: no person
2355 summary: no person
2350
2356
2351 changeset: 3:10e46f2dcbf4
2357 changeset: 3:10e46f2dcbf4
2352 bisect: bad
2358 bisect: bad
2353 user: person
2359 user: person
2354 date: Fri Jan 16 01:06:40 1970 +0000
2360 date: Fri Jan 16 01:06:40 1970 +0000
2355 summary: no user, no domain
2361 summary: no user, no domain
2356
2362
2357 changeset: 4:bbe44766e73d
2363 changeset: 4:bbe44766e73d
2358 bisect: bad (implicit)
2364 bisect: bad (implicit)
2359 branch: foo
2365 branch: foo
2360 user: person
2366 user: person
2361 date: Sat Jan 17 04:53:20 1970 +0000
2367 date: Sat Jan 17 04:53:20 1970 +0000
2362 summary: new branch
2368 summary: new branch
2363
2369
2364 $ hg log --debug -T bisect -r 0:4
2370 $ hg log --debug -T bisect -r 0:4
2365 changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2371 changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2366 bisect: good (implicit)
2372 bisect: good (implicit)
2367 phase: public
2373 phase: public
2368 parent: -1:0000000000000000000000000000000000000000
2374 parent: -1:0000000000000000000000000000000000000000
2369 parent: -1:0000000000000000000000000000000000000000
2375 parent: -1:0000000000000000000000000000000000000000
2370 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
2376 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
2371 user: User Name <user@hostname>
2377 user: User Name <user@hostname>
2372 date: Mon Jan 12 13:46:40 1970 +0000
2378 date: Mon Jan 12 13:46:40 1970 +0000
2373 files+: a
2379 files+: a
2374 extra: branch=default
2380 extra: branch=default
2375 description:
2381 description:
2376 line 1
2382 line 1
2377 line 2
2383 line 2
2378
2384
2379
2385
2380 changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2386 changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2381 bisect: good
2387 bisect: good
2382 phase: public
2388 phase: public
2383 parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2389 parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
2384 parent: -1:0000000000000000000000000000000000000000
2390 parent: -1:0000000000000000000000000000000000000000
2385 manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
2391 manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
2386 user: A. N. Other <other@place>
2392 user: A. N. Other <other@place>
2387 date: Tue Jan 13 17:33:20 1970 +0000
2393 date: Tue Jan 13 17:33:20 1970 +0000
2388 files+: b
2394 files+: b
2389 extra: branch=default
2395 extra: branch=default
2390 description:
2396 description:
2391 other 1
2397 other 1
2392 other 2
2398 other 2
2393
2399
2394 other 3
2400 other 3
2395
2401
2396
2402
2397 changeset: 2:97054abb4ab824450e9164180baf491ae0078465
2403 changeset: 2:97054abb4ab824450e9164180baf491ae0078465
2398 bisect: untested
2404 bisect: untested
2399 phase: public
2405 phase: public
2400 parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2406 parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
2401 parent: -1:0000000000000000000000000000000000000000
2407 parent: -1:0000000000000000000000000000000000000000
2402 manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
2408 manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
2403 user: other@place
2409 user: other@place
2404 date: Wed Jan 14 21:20:00 1970 +0000
2410 date: Wed Jan 14 21:20:00 1970 +0000
2405 files+: c
2411 files+: c
2406 extra: branch=default
2412 extra: branch=default
2407 description:
2413 description:
2408 no person
2414 no person
2409
2415
2410
2416
2411 changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2417 changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2412 bisect: bad
2418 bisect: bad
2413 phase: public
2419 phase: public
2414 parent: 2:97054abb4ab824450e9164180baf491ae0078465
2420 parent: 2:97054abb4ab824450e9164180baf491ae0078465
2415 parent: -1:0000000000000000000000000000000000000000
2421 parent: -1:0000000000000000000000000000000000000000
2416 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2422 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2417 user: person
2423 user: person
2418 date: Fri Jan 16 01:06:40 1970 +0000
2424 date: Fri Jan 16 01:06:40 1970 +0000
2419 files: c
2425 files: c
2420 extra: branch=default
2426 extra: branch=default
2421 description:
2427 description:
2422 no user, no domain
2428 no user, no domain
2423
2429
2424
2430
2425 changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
2431 changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
2426 bisect: bad (implicit)
2432 bisect: bad (implicit)
2427 branch: foo
2433 branch: foo
2428 phase: draft
2434 phase: draft
2429 parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2435 parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
2430 parent: -1:0000000000000000000000000000000000000000
2436 parent: -1:0000000000000000000000000000000000000000
2431 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2437 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
2432 user: person
2438 user: person
2433 date: Sat Jan 17 04:53:20 1970 +0000
2439 date: Sat Jan 17 04:53:20 1970 +0000
2434 extra: branch=foo
2440 extra: branch=foo
2435 description:
2441 description:
2436 new branch
2442 new branch
2437
2443
2438
2444
2439 $ hg log -v -T bisect -r 0:4
2445 $ hg log -v -T bisect -r 0:4
2440 changeset: 0:1e4e1b8f71e0
2446 changeset: 0:1e4e1b8f71e0
2441 bisect: good (implicit)
2447 bisect: good (implicit)
2442 user: User Name <user@hostname>
2448 user: User Name <user@hostname>
2443 date: Mon Jan 12 13:46:40 1970 +0000
2449 date: Mon Jan 12 13:46:40 1970 +0000
2444 files: a
2450 files: a
2445 description:
2451 description:
2446 line 1
2452 line 1
2447 line 2
2453 line 2
2448
2454
2449
2455
2450 changeset: 1:b608e9d1a3f0
2456 changeset: 1:b608e9d1a3f0
2451 bisect: good
2457 bisect: good
2452 user: A. N. Other <other@place>
2458 user: A. N. Other <other@place>
2453 date: Tue Jan 13 17:33:20 1970 +0000
2459 date: Tue Jan 13 17:33:20 1970 +0000
2454 files: b
2460 files: b
2455 description:
2461 description:
2456 other 1
2462 other 1
2457 other 2
2463 other 2
2458
2464
2459 other 3
2465 other 3
2460
2466
2461
2467
2462 changeset: 2:97054abb4ab8
2468 changeset: 2:97054abb4ab8
2463 bisect: untested
2469 bisect: untested
2464 user: other@place
2470 user: other@place
2465 date: Wed Jan 14 21:20:00 1970 +0000
2471 date: Wed Jan 14 21:20:00 1970 +0000
2466 files: c
2472 files: c
2467 description:
2473 description:
2468 no person
2474 no person
2469
2475
2470
2476
2471 changeset: 3:10e46f2dcbf4
2477 changeset: 3:10e46f2dcbf4
2472 bisect: bad
2478 bisect: bad
2473 user: person
2479 user: person
2474 date: Fri Jan 16 01:06:40 1970 +0000
2480 date: Fri Jan 16 01:06:40 1970 +0000
2475 files: c
2481 files: c
2476 description:
2482 description:
2477 no user, no domain
2483 no user, no domain
2478
2484
2479
2485
2480 changeset: 4:bbe44766e73d
2486 changeset: 4:bbe44766e73d
2481 bisect: bad (implicit)
2487 bisect: bad (implicit)
2482 branch: foo
2488 branch: foo
2483 user: person
2489 user: person
2484 date: Sat Jan 17 04:53:20 1970 +0000
2490 date: Sat Jan 17 04:53:20 1970 +0000
2485 description:
2491 description:
2486 new branch
2492 new branch
2487
2493
2488
2494
2489 $ hg --color=debug log -T bisect -r 0:4
2495 $ hg --color=debug log -T bisect -r 0:4
2490 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2496 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2491 [log.bisect bisect.good|bisect: good (implicit)]
2497 [log.bisect bisect.good|bisect: good (implicit)]
2492 [log.user|user: User Name <user@hostname>]
2498 [log.user|user: User Name <user@hostname>]
2493 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2499 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2494 [log.summary|summary: line 1]
2500 [log.summary|summary: line 1]
2495
2501
2496 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2502 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2497 [log.bisect bisect.good|bisect: good]
2503 [log.bisect bisect.good|bisect: good]
2498 [log.user|user: A. N. Other <other@place>]
2504 [log.user|user: A. N. Other <other@place>]
2499 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2505 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2500 [log.summary|summary: other 1]
2506 [log.summary|summary: other 1]
2501
2507
2502 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2508 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2503 [log.bisect bisect.untested|bisect: untested]
2509 [log.bisect bisect.untested|bisect: untested]
2504 [log.user|user: other@place]
2510 [log.user|user: other@place]
2505 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2511 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2506 [log.summary|summary: no person]
2512 [log.summary|summary: no person]
2507
2513
2508 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2514 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2509 [log.bisect bisect.bad|bisect: bad]
2515 [log.bisect bisect.bad|bisect: bad]
2510 [log.user|user: person]
2516 [log.user|user: person]
2511 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2517 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2512 [log.summary|summary: no user, no domain]
2518 [log.summary|summary: no user, no domain]
2513
2519
2514 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2520 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2515 [log.bisect bisect.bad|bisect: bad (implicit)]
2521 [log.bisect bisect.bad|bisect: bad (implicit)]
2516 [log.branch|branch: foo]
2522 [log.branch|branch: foo]
2517 [log.user|user: person]
2523 [log.user|user: person]
2518 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2524 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2519 [log.summary|summary: new branch]
2525 [log.summary|summary: new branch]
2520
2526
2521 $ hg --color=debug log --debug -T bisect -r 0:4
2527 $ hg --color=debug log --debug -T bisect -r 0:4
2522 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2528 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2523 [log.bisect bisect.good|bisect: good (implicit)]
2529 [log.bisect bisect.good|bisect: good (implicit)]
2524 [log.phase|phase: public]
2530 [log.phase|phase: public]
2525 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2531 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2526 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2532 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2527 [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
2533 [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
2528 [log.user|user: User Name <user@hostname>]
2534 [log.user|user: User Name <user@hostname>]
2529 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2535 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2530 [ui.debug log.files|files+: a]
2536 [ui.debug log.files|files+: a]
2531 [ui.debug log.extra|extra: branch=default]
2537 [ui.debug log.extra|extra: branch=default]
2532 [ui.note log.description|description:]
2538 [ui.note log.description|description:]
2533 [ui.note log.description|line 1
2539 [ui.note log.description|line 1
2534 line 2]
2540 line 2]
2535
2541
2536
2542
2537 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2543 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2538 [log.bisect bisect.good|bisect: good]
2544 [log.bisect bisect.good|bisect: good]
2539 [log.phase|phase: public]
2545 [log.phase|phase: public]
2540 [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2546 [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
2541 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2547 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2542 [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
2548 [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
2543 [log.user|user: A. N. Other <other@place>]
2549 [log.user|user: A. N. Other <other@place>]
2544 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2550 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2545 [ui.debug log.files|files+: b]
2551 [ui.debug log.files|files+: b]
2546 [ui.debug log.extra|extra: branch=default]
2552 [ui.debug log.extra|extra: branch=default]
2547 [ui.note log.description|description:]
2553 [ui.note log.description|description:]
2548 [ui.note log.description|other 1
2554 [ui.note log.description|other 1
2549 other 2
2555 other 2
2550
2556
2551 other 3]
2557 other 3]
2552
2558
2553
2559
2554 [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465]
2560 [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465]
2555 [log.bisect bisect.untested|bisect: untested]
2561 [log.bisect bisect.untested|bisect: untested]
2556 [log.phase|phase: public]
2562 [log.phase|phase: public]
2557 [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2563 [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
2558 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2564 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2559 [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
2565 [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
2560 [log.user|user: other@place]
2566 [log.user|user: other@place]
2561 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2567 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2562 [ui.debug log.files|files+: c]
2568 [ui.debug log.files|files+: c]
2563 [ui.debug log.extra|extra: branch=default]
2569 [ui.debug log.extra|extra: branch=default]
2564 [ui.note log.description|description:]
2570 [ui.note log.description|description:]
2565 [ui.note log.description|no person]
2571 [ui.note log.description|no person]
2566
2572
2567
2573
2568 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2574 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2569 [log.bisect bisect.bad|bisect: bad]
2575 [log.bisect bisect.bad|bisect: bad]
2570 [log.phase|phase: public]
2576 [log.phase|phase: public]
2571 [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465]
2577 [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465]
2572 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2578 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2573 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2579 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2574 [log.user|user: person]
2580 [log.user|user: person]
2575 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2581 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2576 [ui.debug log.files|files: c]
2582 [ui.debug log.files|files: c]
2577 [ui.debug log.extra|extra: branch=default]
2583 [ui.debug log.extra|extra: branch=default]
2578 [ui.note log.description|description:]
2584 [ui.note log.description|description:]
2579 [ui.note log.description|no user, no domain]
2585 [ui.note log.description|no user, no domain]
2580
2586
2581
2587
2582 [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
2588 [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
2583 [log.bisect bisect.bad|bisect: bad (implicit)]
2589 [log.bisect bisect.bad|bisect: bad (implicit)]
2584 [log.branch|branch: foo]
2590 [log.branch|branch: foo]
2585 [log.phase|phase: draft]
2591 [log.phase|phase: draft]
2586 [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2592 [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
2587 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2593 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2588 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2594 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
2589 [log.user|user: person]
2595 [log.user|user: person]
2590 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2596 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2591 [ui.debug log.extra|extra: branch=foo]
2597 [ui.debug log.extra|extra: branch=foo]
2592 [ui.note log.description|description:]
2598 [ui.note log.description|description:]
2593 [ui.note log.description|new branch]
2599 [ui.note log.description|new branch]
2594
2600
2595
2601
2596 $ hg --color=debug log -v -T bisect -r 0:4
2602 $ hg --color=debug log -v -T bisect -r 0:4
2597 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2603 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
2598 [log.bisect bisect.good|bisect: good (implicit)]
2604 [log.bisect bisect.good|bisect: good (implicit)]
2599 [log.user|user: User Name <user@hostname>]
2605 [log.user|user: User Name <user@hostname>]
2600 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2606 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
2601 [ui.note log.files|files: a]
2607 [ui.note log.files|files: a]
2602 [ui.note log.description|description:]
2608 [ui.note log.description|description:]
2603 [ui.note log.description|line 1
2609 [ui.note log.description|line 1
2604 line 2]
2610 line 2]
2605
2611
2606
2612
2607 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2613 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
2608 [log.bisect bisect.good|bisect: good]
2614 [log.bisect bisect.good|bisect: good]
2609 [log.user|user: A. N. Other <other@place>]
2615 [log.user|user: A. N. Other <other@place>]
2610 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2616 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
2611 [ui.note log.files|files: b]
2617 [ui.note log.files|files: b]
2612 [ui.note log.description|description:]
2618 [ui.note log.description|description:]
2613 [ui.note log.description|other 1
2619 [ui.note log.description|other 1
2614 other 2
2620 other 2
2615
2621
2616 other 3]
2622 other 3]
2617
2623
2618
2624
2619 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2625 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
2620 [log.bisect bisect.untested|bisect: untested]
2626 [log.bisect bisect.untested|bisect: untested]
2621 [log.user|user: other@place]
2627 [log.user|user: other@place]
2622 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2628 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
2623 [ui.note log.files|files: c]
2629 [ui.note log.files|files: c]
2624 [ui.note log.description|description:]
2630 [ui.note log.description|description:]
2625 [ui.note log.description|no person]
2631 [ui.note log.description|no person]
2626
2632
2627
2633
2628 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2634 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
2629 [log.bisect bisect.bad|bisect: bad]
2635 [log.bisect bisect.bad|bisect: bad]
2630 [log.user|user: person]
2636 [log.user|user: person]
2631 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2637 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
2632 [ui.note log.files|files: c]
2638 [ui.note log.files|files: c]
2633 [ui.note log.description|description:]
2639 [ui.note log.description|description:]
2634 [ui.note log.description|no user, no domain]
2640 [ui.note log.description|no user, no domain]
2635
2641
2636
2642
2637 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2643 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
2638 [log.bisect bisect.bad|bisect: bad (implicit)]
2644 [log.bisect bisect.bad|bisect: bad (implicit)]
2639 [log.branch|branch: foo]
2645 [log.branch|branch: foo]
2640 [log.user|user: person]
2646 [log.user|user: person]
2641 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2647 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
2642 [ui.note log.description|description:]
2648 [ui.note log.description|description:]
2643 [ui.note log.description|new branch]
2649 [ui.note log.description|new branch]
2644
2650
2645
2651
2646 $ hg bisect --reset
2652 $ hg bisect --reset
2647
2653
2648 Error on syntax:
2654 Error on syntax:
2649
2655
2650 $ echo 'x = "f' >> t
2656 $ echo 'x = "f' >> t
2651 $ hg log
2657 $ hg log
2652 hg: parse error at t:3: unmatched quotes
2658 hg: parse error at t:3: unmatched quotes
2653 [255]
2659 [255]
2654
2660
2655 $ hg log -T '{date'
2661 $ hg log -T '{date'
2656 hg: parse error at 1: unterminated template expansion
2662 hg: parse error at 1: unterminated template expansion
2657 [255]
2663 [255]
2658
2664
2659 Behind the scenes, this will throw TypeError
2665 Behind the scenes, this will throw TypeError
2660
2666
2661 $ hg log -l 3 --template '{date|obfuscate}\n'
2667 $ hg log -l 3 --template '{date|obfuscate}\n'
2662 abort: template filter 'obfuscate' is not compatible with keyword 'date'
2668 abort: template filter 'obfuscate' is not compatible with keyword 'date'
2663 [255]
2669 [255]
2664
2670
2665 Behind the scenes, this will throw a ValueError
2671 Behind the scenes, this will throw a ValueError
2666
2672
2667 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
2673 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
2668 abort: template filter 'shortdate' is not compatible with keyword 'desc'
2674 abort: template filter 'shortdate' is not compatible with keyword 'desc'
2669 [255]
2675 [255]
2670
2676
2671 Behind the scenes, this will throw AttributeError
2677 Behind the scenes, this will throw AttributeError
2672
2678
2673 $ hg log -l 3 --template 'line: {date|escape}\n'
2679 $ hg log -l 3 --template 'line: {date|escape}\n'
2674 abort: template filter 'escape' is not compatible with keyword 'date'
2680 abort: template filter 'escape' is not compatible with keyword 'date'
2675 [255]
2681 [255]
2676
2682
2677 $ hg log -l 3 --template 'line: {extras|localdate}\n'
2683 $ hg log -l 3 --template 'line: {extras|localdate}\n'
2678 hg: parse error: localdate expects a date information
2684 hg: parse error: localdate expects a date information
2679 [255]
2685 [255]
2680
2686
2681 Behind the scenes, this will throw ValueError
2687 Behind the scenes, this will throw ValueError
2682
2688
2683 $ hg tip --template '{author|email|date}\n'
2689 $ hg tip --template '{author|email|date}\n'
2684 hg: parse error: date expects a date information
2690 hg: parse error: date expects a date information
2685 [255]
2691 [255]
2686
2692
2687 $ hg tip -T '{author|email|shortdate}\n'
2693 $ hg tip -T '{author|email|shortdate}\n'
2688 abort: template filter 'shortdate' is not compatible with keyword 'author'
2694 abort: template filter 'shortdate' is not compatible with keyword 'author'
2689 [255]
2695 [255]
2690
2696
2691 $ hg tip -T '{get(extras, "branch")|shortdate}\n'
2697 $ hg tip -T '{get(extras, "branch")|shortdate}\n'
2692 abort: incompatible use of template filter 'shortdate'
2698 abort: incompatible use of template filter 'shortdate'
2693 [255]
2699 [255]
2694
2700
2695 Error in nested template:
2701 Error in nested template:
2696
2702
2697 $ hg log -T '{"date'
2703 $ hg log -T '{"date'
2698 hg: parse error at 2: unterminated string
2704 hg: parse error at 2: unterminated string
2699 [255]
2705 [255]
2700
2706
2701 $ hg log -T '{"foo{date|?}"}'
2707 $ hg log -T '{"foo{date|?}"}'
2702 hg: parse error at 11: syntax error
2708 hg: parse error at 11: syntax error
2703 [255]
2709 [255]
2704
2710
2705 Thrown an error if a template function doesn't exist
2711 Thrown an error if a template function doesn't exist
2706
2712
2707 $ hg tip --template '{foo()}\n'
2713 $ hg tip --template '{foo()}\n'
2708 hg: parse error: unknown function 'foo'
2714 hg: parse error: unknown function 'foo'
2709 [255]
2715 [255]
2710
2716
2711 Pass generator object created by template function to filter
2717 Pass generator object created by template function to filter
2712
2718
2713 $ hg log -l 1 --template '{if(author, author)|user}\n'
2719 $ hg log -l 1 --template '{if(author, author)|user}\n'
2714 test
2720 test
2715
2721
2716 Test index keyword:
2722 Test index keyword:
2717
2723
2718 $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n'
2724 $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n'
2719 10 0:a 1:b 2:fifth 3:fourth 4:third
2725 10 0:a 1:b 2:fifth 3:fourth 4:third
2720 11 0:a
2726 11 0:a
2721
2727
2722 $ hg branches -T '{index} {branch}\n'
2728 $ hg branches -T '{index} {branch}\n'
2723 0 default
2729 0 default
2724 1 foo
2730 1 foo
2725
2731
2726 Test diff function:
2732 Test diff function:
2727
2733
2728 $ hg diff -c 8
2734 $ hg diff -c 8
2729 diff -r 29114dbae42b -r 95c24699272e fourth
2735 diff -r 29114dbae42b -r 95c24699272e fourth
2730 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2736 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2731 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2737 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2732 @@ -0,0 +1,1 @@
2738 @@ -0,0 +1,1 @@
2733 +second
2739 +second
2734 diff -r 29114dbae42b -r 95c24699272e second
2740 diff -r 29114dbae42b -r 95c24699272e second
2735 --- a/second Mon Jan 12 13:46:40 1970 +0000
2741 --- a/second Mon Jan 12 13:46:40 1970 +0000
2736 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2742 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2737 @@ -1,1 +0,0 @@
2743 @@ -1,1 +0,0 @@
2738 -second
2744 -second
2739 diff -r 29114dbae42b -r 95c24699272e third
2745 diff -r 29114dbae42b -r 95c24699272e third
2740 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2746 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2741 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2747 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2742 @@ -0,0 +1,1 @@
2748 @@ -0,0 +1,1 @@
2743 +third
2749 +third
2744
2750
2745 $ hg log -r 8 -T "{diff()}"
2751 $ hg log -r 8 -T "{diff()}"
2746 diff -r 29114dbae42b -r 95c24699272e fourth
2752 diff -r 29114dbae42b -r 95c24699272e fourth
2747 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2753 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2748 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2754 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2749 @@ -0,0 +1,1 @@
2755 @@ -0,0 +1,1 @@
2750 +second
2756 +second
2751 diff -r 29114dbae42b -r 95c24699272e second
2757 diff -r 29114dbae42b -r 95c24699272e second
2752 --- a/second Mon Jan 12 13:46:40 1970 +0000
2758 --- a/second Mon Jan 12 13:46:40 1970 +0000
2753 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2759 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2754 @@ -1,1 +0,0 @@
2760 @@ -1,1 +0,0 @@
2755 -second
2761 -second
2756 diff -r 29114dbae42b -r 95c24699272e third
2762 diff -r 29114dbae42b -r 95c24699272e third
2757 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2763 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2758 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2764 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2759 @@ -0,0 +1,1 @@
2765 @@ -0,0 +1,1 @@
2760 +third
2766 +third
2761
2767
2762 $ hg log -r 8 -T "{diff('glob:f*')}"
2768 $ hg log -r 8 -T "{diff('glob:f*')}"
2763 diff -r 29114dbae42b -r 95c24699272e fourth
2769 diff -r 29114dbae42b -r 95c24699272e fourth
2764 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2770 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2765 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2771 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2766 @@ -0,0 +1,1 @@
2772 @@ -0,0 +1,1 @@
2767 +second
2773 +second
2768
2774
2769 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
2775 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
2770 diff -r 29114dbae42b -r 95c24699272e second
2776 diff -r 29114dbae42b -r 95c24699272e second
2771 --- a/second Mon Jan 12 13:46:40 1970 +0000
2777 --- a/second Mon Jan 12 13:46:40 1970 +0000
2772 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2778 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2773 @@ -1,1 +0,0 @@
2779 @@ -1,1 +0,0 @@
2774 -second
2780 -second
2775 diff -r 29114dbae42b -r 95c24699272e third
2781 diff -r 29114dbae42b -r 95c24699272e third
2776 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2782 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2777 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2783 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2778 @@ -0,0 +1,1 @@
2784 @@ -0,0 +1,1 @@
2779 +third
2785 +third
2780
2786
2781 $ hg log -r 8 -T "{diff('FOURTH'|lower)}"
2787 $ hg log -r 8 -T "{diff('FOURTH'|lower)}"
2782 diff -r 29114dbae42b -r 95c24699272e fourth
2788 diff -r 29114dbae42b -r 95c24699272e fourth
2783 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2789 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2784 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2790 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2785 @@ -0,0 +1,1 @@
2791 @@ -0,0 +1,1 @@
2786 +second
2792 +second
2787
2793
2788 $ cd ..
2794 $ cd ..
2789
2795
2790
2796
2791 latesttag:
2797 latesttag:
2792
2798
2793 $ hg init latesttag
2799 $ hg init latesttag
2794 $ cd latesttag
2800 $ cd latesttag
2795
2801
2796 $ echo a > file
2802 $ echo a > file
2797 $ hg ci -Am a -d '0 0'
2803 $ hg ci -Am a -d '0 0'
2798 adding file
2804 adding file
2799
2805
2800 $ echo b >> file
2806 $ echo b >> file
2801 $ hg ci -m b -d '1 0'
2807 $ hg ci -m b -d '1 0'
2802
2808
2803 $ echo c >> head1
2809 $ echo c >> head1
2804 $ hg ci -Am h1c -d '2 0'
2810 $ hg ci -Am h1c -d '2 0'
2805 adding head1
2811 adding head1
2806
2812
2807 $ hg update -q 1
2813 $ hg update -q 1
2808 $ echo d >> head2
2814 $ echo d >> head2
2809 $ hg ci -Am h2d -d '3 0'
2815 $ hg ci -Am h2d -d '3 0'
2810 adding head2
2816 adding head2
2811 created new head
2817 created new head
2812
2818
2813 $ echo e >> head2
2819 $ echo e >> head2
2814 $ hg ci -m h2e -d '4 0'
2820 $ hg ci -m h2e -d '4 0'
2815
2821
2816 $ hg merge -q
2822 $ hg merge -q
2817 $ hg ci -m merge -d '5 -3600'
2823 $ hg ci -m merge -d '5 -3600'
2818
2824
2819 No tag set:
2825 No tag set:
2820
2826
2821 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2827 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2822 5: null+5
2828 5: null+5
2823 4: null+4
2829 4: null+4
2824 3: null+3
2830 3: null+3
2825 2: null+3
2831 2: null+3
2826 1: null+2
2832 1: null+2
2827 0: null+1
2833 0: null+1
2828
2834
2829 One common tag: longest path wins:
2835 One common tag: longest path wins:
2830
2836
2831 $ hg tag -r 1 -m t1 -d '6 0' t1
2837 $ hg tag -r 1 -m t1 -d '6 0' t1
2832 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2838 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2833 6: t1+4
2839 6: t1+4
2834 5: t1+3
2840 5: t1+3
2835 4: t1+2
2841 4: t1+2
2836 3: t1+1
2842 3: t1+1
2837 2: t1+1
2843 2: t1+1
2838 1: t1+0
2844 1: t1+0
2839 0: null+1
2845 0: null+1
2840
2846
2841 One ancestor tag: more recent wins:
2847 One ancestor tag: more recent wins:
2842
2848
2843 $ hg tag -r 2 -m t2 -d '7 0' t2
2849 $ hg tag -r 2 -m t2 -d '7 0' t2
2844 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2850 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2845 7: t2+3
2851 7: t2+3
2846 6: t2+2
2852 6: t2+2
2847 5: t2+1
2853 5: t2+1
2848 4: t1+2
2854 4: t1+2
2849 3: t1+1
2855 3: t1+1
2850 2: t2+0
2856 2: t2+0
2851 1: t1+0
2857 1: t1+0
2852 0: null+1
2858 0: null+1
2853
2859
2854 Two branch tags: more recent wins:
2860 Two branch tags: more recent wins:
2855
2861
2856 $ hg tag -r 3 -m t3 -d '8 0' t3
2862 $ hg tag -r 3 -m t3 -d '8 0' t3
2857 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2863 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2858 8: t3+5
2864 8: t3+5
2859 7: t3+4
2865 7: t3+4
2860 6: t3+3
2866 6: t3+3
2861 5: t3+2
2867 5: t3+2
2862 4: t3+1
2868 4: t3+1
2863 3: t3+0
2869 3: t3+0
2864 2: t2+0
2870 2: t2+0
2865 1: t1+0
2871 1: t1+0
2866 0: null+1
2872 0: null+1
2867
2873
2868 Merged tag overrides:
2874 Merged tag overrides:
2869
2875
2870 $ hg tag -r 5 -m t5 -d '9 0' t5
2876 $ hg tag -r 5 -m t5 -d '9 0' t5
2871 $ hg tag -r 3 -m at3 -d '10 0' at3
2877 $ hg tag -r 3 -m at3 -d '10 0' at3
2872 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2878 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2873 10: t5+5
2879 10: t5+5
2874 9: t5+4
2880 9: t5+4
2875 8: t5+3
2881 8: t5+3
2876 7: t5+2
2882 7: t5+2
2877 6: t5+1
2883 6: t5+1
2878 5: t5+0
2884 5: t5+0
2879 4: at3:t3+1
2885 4: at3:t3+1
2880 3: at3:t3+0
2886 3: at3:t3+0
2881 2: t2+0
2887 2: t2+0
2882 1: t1+0
2888 1: t1+0
2883 0: null+1
2889 0: null+1
2884
2890
2885 $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
2891 $ hg log --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
2886 10: t5+5,5
2892 10: t5+5,5
2887 9: t5+4,4
2893 9: t5+4,4
2888 8: t5+3,3
2894 8: t5+3,3
2889 7: t5+2,2
2895 7: t5+2,2
2890 6: t5+1,1
2896 6: t5+1,1
2891 5: t5+0,0
2897 5: t5+0,0
2892 4: at3+1,1 t3+1,1
2898 4: at3+1,1 t3+1,1
2893 3: at3+0,0 t3+0,0
2899 3: at3+0,0 t3+0,0
2894 2: t2+0,0
2900 2: t2+0,0
2895 1: t1+0,0
2901 1: t1+0,0
2896 0: null+1,1
2902 0: null+1,1
2897
2903
2898 $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n"
2904 $ hg log --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n"
2899 10: t3, C: 8, D: 7
2905 10: t3, C: 8, D: 7
2900 9: t3, C: 7, D: 6
2906 9: t3, C: 7, D: 6
2901 8: t3, C: 6, D: 5
2907 8: t3, C: 6, D: 5
2902 7: t3, C: 5, D: 4
2908 7: t3, C: 5, D: 4
2903 6: t3, C: 4, D: 3
2909 6: t3, C: 4, D: 3
2904 5: t3, C: 3, D: 2
2910 5: t3, C: 3, D: 2
2905 4: t3, C: 1, D: 1
2911 4: t3, C: 1, D: 1
2906 3: t3, C: 0, D: 0
2912 3: t3, C: 0, D: 0
2907 2: t1, C: 1, D: 1
2913 2: t1, C: 1, D: 1
2908 1: t1, C: 0, D: 0
2914 1: t1, C: 0, D: 0
2909 0: null, C: 1, D: 1
2915 0: null, C: 1, D: 1
2910
2916
2911 $ cd ..
2917 $ cd ..
2912
2918
2913
2919
2914 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2920 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2915 if it is a relative path
2921 if it is a relative path
2916
2922
2917 $ mkdir -p home/styles
2923 $ mkdir -p home/styles
2918
2924
2919 $ cat > home/styles/teststyle <<EOF
2925 $ cat > home/styles/teststyle <<EOF
2920 > changeset = 'test {rev}:{node|short}\n'
2926 > changeset = 'test {rev}:{node|short}\n'
2921 > EOF
2927 > EOF
2922
2928
2923 $ HOME=`pwd`/home; export HOME
2929 $ HOME=`pwd`/home; export HOME
2924
2930
2925 $ cat > latesttag/.hg/hgrc <<EOF
2931 $ cat > latesttag/.hg/hgrc <<EOF
2926 > [ui]
2932 > [ui]
2927 > style = ~/styles/teststyle
2933 > style = ~/styles/teststyle
2928 > EOF
2934 > EOF
2929
2935
2930 $ hg -R latesttag tip
2936 $ hg -R latesttag tip
2931 test 10:9b4a630e5f5f
2937 test 10:9b4a630e5f5f
2932
2938
2933 Test recursive showlist template (issue1989):
2939 Test recursive showlist template (issue1989):
2934
2940
2935 $ cat > style1989 <<EOF
2941 $ cat > style1989 <<EOF
2936 > changeset = '{file_mods}{manifest}{extras}'
2942 > changeset = '{file_mods}{manifest}{extras}'
2937 > file_mod = 'M|{author|person}\n'
2943 > file_mod = 'M|{author|person}\n'
2938 > manifest = '{rev},{author}\n'
2944 > manifest = '{rev},{author}\n'
2939 > extra = '{key}: {author}\n'
2945 > extra = '{key}: {author}\n'
2940 > EOF
2946 > EOF
2941
2947
2942 $ hg -R latesttag log -r tip --style=style1989
2948 $ hg -R latesttag log -r tip --style=style1989
2943 M|test
2949 M|test
2944 10,test
2950 10,test
2945 branch: test
2951 branch: test
2946
2952
2947 Test new-style inline templating:
2953 Test new-style inline templating:
2948
2954
2949 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2955 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2950 modified files: .hgtags
2956 modified files: .hgtags
2951
2957
2952
2958
2953 $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
2959 $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
2954 hg: parse error: keyword 'rev' is not iterable
2960 hg: parse error: keyword 'rev' is not iterable
2955 [255]
2961 [255]
2956 $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
2962 $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
2957 hg: parse error: None is not iterable
2963 hg: parse error: None is not iterable
2958 [255]
2964 [255]
2959
2965
2960 Test the sub function of templating for expansion:
2966 Test the sub function of templating for expansion:
2961
2967
2962 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2968 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2963 xx
2969 xx
2964
2970
2965 $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n'
2971 $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n'
2966 hg: parse error: sub got an invalid pattern: [
2972 hg: parse error: sub got an invalid pattern: [
2967 [255]
2973 [255]
2968 $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n'
2974 $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n'
2969 hg: parse error: sub got an invalid replacement: \1
2975 hg: parse error: sub got an invalid replacement: \1
2970 [255]
2976 [255]
2971
2977
2972 Test the strip function with chars specified:
2978 Test the strip function with chars specified:
2973
2979
2974 $ hg log -R latesttag --template '{desc}\n'
2980 $ hg log -R latesttag --template '{desc}\n'
2975 at3
2981 at3
2976 t5
2982 t5
2977 t3
2983 t3
2978 t2
2984 t2
2979 t1
2985 t1
2980 merge
2986 merge
2981 h2e
2987 h2e
2982 h2d
2988 h2d
2983 h1c
2989 h1c
2984 b
2990 b
2985 a
2991 a
2986
2992
2987 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2993 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2988 at3
2994 at3
2989 5
2995 5
2990 3
2996 3
2991 2
2997 2
2992 1
2998 1
2993 merg
2999 merg
2994 h2
3000 h2
2995 h2d
3001 h2d
2996 h1c
3002 h1c
2997 b
3003 b
2998 a
3004 a
2999
3005
3000 Test date format:
3006 Test date format:
3001
3007
3002 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
3008 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
3003 date: 70 01 01 10 +0000
3009 date: 70 01 01 10 +0000
3004 date: 70 01 01 09 +0000
3010 date: 70 01 01 09 +0000
3005 date: 70 01 01 08 +0000
3011 date: 70 01 01 08 +0000
3006 date: 70 01 01 07 +0000
3012 date: 70 01 01 07 +0000
3007 date: 70 01 01 06 +0000
3013 date: 70 01 01 06 +0000
3008 date: 70 01 01 05 +0100
3014 date: 70 01 01 05 +0100
3009 date: 70 01 01 04 +0000
3015 date: 70 01 01 04 +0000
3010 date: 70 01 01 03 +0000
3016 date: 70 01 01 03 +0000
3011 date: 70 01 01 02 +0000
3017 date: 70 01 01 02 +0000
3012 date: 70 01 01 01 +0000
3018 date: 70 01 01 01 +0000
3013 date: 70 01 01 00 +0000
3019 date: 70 01 01 00 +0000
3014
3020
3015 Test invalid date:
3021 Test invalid date:
3016
3022
3017 $ hg log -R latesttag -T '{date(rev)}\n'
3023 $ hg log -R latesttag -T '{date(rev)}\n'
3018 hg: parse error: date expects a date information
3024 hg: parse error: date expects a date information
3019 [255]
3025 [255]
3020
3026
3021 Test integer literal:
3027 Test integer literal:
3022
3028
3023 $ hg debugtemplate -v '{(0)}\n'
3029 $ hg debugtemplate -v '{(0)}\n'
3024 (template
3030 (template
3025 (group
3031 (group
3026 ('integer', '0'))
3032 ('integer', '0'))
3027 ('string', '\n'))
3033 ('string', '\n'))
3028 0
3034 0
3029 $ hg debugtemplate -v '{(123)}\n'
3035 $ hg debugtemplate -v '{(123)}\n'
3030 (template
3036 (template
3031 (group
3037 (group
3032 ('integer', '123'))
3038 ('integer', '123'))
3033 ('string', '\n'))
3039 ('string', '\n'))
3034 123
3040 123
3035 $ hg debugtemplate -v '{(-4)}\n'
3041 $ hg debugtemplate -v '{(-4)}\n'
3036 (template
3042 (template
3037 (group
3043 (group
3038 (negate
3044 (negate
3039 ('integer', '4')))
3045 ('integer', '4')))
3040 ('string', '\n'))
3046 ('string', '\n'))
3041 -4
3047 -4
3042 $ hg debugtemplate '{(-)}\n'
3048 $ hg debugtemplate '{(-)}\n'
3043 hg: parse error at 3: not a prefix: )
3049 hg: parse error at 3: not a prefix: )
3044 [255]
3050 [255]
3045 $ hg debugtemplate '{(-a)}\n'
3051 $ hg debugtemplate '{(-a)}\n'
3046 hg: parse error: negation needs an integer argument
3052 hg: parse error: negation needs an integer argument
3047 [255]
3053 [255]
3048
3054
3049 top-level integer literal is interpreted as symbol (i.e. variable name):
3055 top-level integer literal is interpreted as symbol (i.e. variable name):
3050
3056
3051 $ hg debugtemplate -D 1=one -v '{1}\n'
3057 $ hg debugtemplate -D 1=one -v '{1}\n'
3052 (template
3058 (template
3053 ('integer', '1')
3059 ('integer', '1')
3054 ('string', '\n'))
3060 ('string', '\n'))
3055 one
3061 one
3056 $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n'
3062 $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n'
3057 (template
3063 (template
3058 (func
3064 (func
3059 ('symbol', 'if')
3065 ('symbol', 'if')
3060 (list
3066 (list
3061 ('string', 't')
3067 ('string', 't')
3062 (template
3068 (template
3063 ('integer', '1'))))
3069 ('integer', '1'))))
3064 ('string', '\n'))
3070 ('string', '\n'))
3065 one
3071 one
3066 $ hg debugtemplate -D 1=one -v '{1|stringify}\n'
3072 $ hg debugtemplate -D 1=one -v '{1|stringify}\n'
3067 (template
3073 (template
3068 (|
3074 (|
3069 ('integer', '1')
3075 ('integer', '1')
3070 ('symbol', 'stringify'))
3076 ('symbol', 'stringify'))
3071 ('string', '\n'))
3077 ('string', '\n'))
3072 one
3078 one
3073
3079
3074 unless explicit symbol is expected:
3080 unless explicit symbol is expected:
3075
3081
3076 $ hg log -Ra -r0 -T '{desc|1}\n'
3082 $ hg log -Ra -r0 -T '{desc|1}\n'
3077 hg: parse error: expected a symbol, got 'integer'
3083 hg: parse error: expected a symbol, got 'integer'
3078 [255]
3084 [255]
3079 $ hg log -Ra -r0 -T '{1()}\n'
3085 $ hg log -Ra -r0 -T '{1()}\n'
3080 hg: parse error: expected a symbol, got 'integer'
3086 hg: parse error: expected a symbol, got 'integer'
3081 [255]
3087 [255]
3082
3088
3083 Test string literal:
3089 Test string literal:
3084
3090
3085 $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n'
3091 $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n'
3086 (template
3092 (template
3087 ('string', 'string with no template fragment')
3093 ('string', 'string with no template fragment')
3088 ('string', '\n'))
3094 ('string', '\n'))
3089 string with no template fragment
3095 string with no template fragment
3090 $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n'
3096 $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n'
3091 (template
3097 (template
3092 (template
3098 (template
3093 ('string', 'template: ')
3099 ('string', 'template: ')
3094 ('symbol', 'rev'))
3100 ('symbol', 'rev'))
3095 ('string', '\n'))
3101 ('string', '\n'))
3096 template: 0
3102 template: 0
3097 $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n'
3103 $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n'
3098 (template
3104 (template
3099 ('string', 'rawstring: {rev}')
3105 ('string', 'rawstring: {rev}')
3100 ('string', '\n'))
3106 ('string', '\n'))
3101 rawstring: {rev}
3107 rawstring: {rev}
3102 $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n'
3108 $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n'
3103 (template
3109 (template
3104 (%
3110 (%
3105 ('symbol', 'files')
3111 ('symbol', 'files')
3106 ('string', 'rawstring: {file}'))
3112 ('string', 'rawstring: {file}'))
3107 ('string', '\n'))
3113 ('string', '\n'))
3108 rawstring: {file}
3114 rawstring: {file}
3109
3115
3110 Test string escaping:
3116 Test string escaping:
3111
3117
3112 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3118 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3113 >
3119 >
3114 <>\n<[>
3120 <>\n<[>
3115 <>\n<]>
3121 <>\n<]>
3116 <>\n<
3122 <>\n<
3117
3123
3118 $ hg log -R latesttag -r 0 \
3124 $ hg log -R latesttag -r 0 \
3119 > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3125 > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3120 >
3126 >
3121 <>\n<[>
3127 <>\n<[>
3122 <>\n<]>
3128 <>\n<]>
3123 <>\n<
3129 <>\n<
3124
3130
3125 $ hg log -R latesttag -r 0 -T esc \
3131 $ hg log -R latesttag -r 0 -T esc \
3126 > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3132 > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3127 >
3133 >
3128 <>\n<[>
3134 <>\n<[>
3129 <>\n<]>
3135 <>\n<]>
3130 <>\n<
3136 <>\n<
3131
3137
3132 $ cat <<'EOF' > esctmpl
3138 $ cat <<'EOF' > esctmpl
3133 > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3139 > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
3134 > EOF
3140 > EOF
3135 $ hg log -R latesttag -r 0 --style ./esctmpl
3141 $ hg log -R latesttag -r 0 --style ./esctmpl
3136 >
3142 >
3137 <>\n<[>
3143 <>\n<[>
3138 <>\n<]>
3144 <>\n<]>
3139 <>\n<
3145 <>\n<
3140
3146
3141 Test string escaping of quotes:
3147 Test string escaping of quotes:
3142
3148
3143 $ hg log -Ra -r0 -T '{"\""}\n'
3149 $ hg log -Ra -r0 -T '{"\""}\n'
3144 "
3150 "
3145 $ hg log -Ra -r0 -T '{"\\\""}\n'
3151 $ hg log -Ra -r0 -T '{"\\\""}\n'
3146 \"
3152 \"
3147 $ hg log -Ra -r0 -T '{r"\""}\n'
3153 $ hg log -Ra -r0 -T '{r"\""}\n'
3148 \"
3154 \"
3149 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3155 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3150 \\\"
3156 \\\"
3151
3157
3152
3158
3153 $ hg log -Ra -r0 -T '{"\""}\n'
3159 $ hg log -Ra -r0 -T '{"\""}\n'
3154 "
3160 "
3155 $ hg log -Ra -r0 -T '{"\\\""}\n'
3161 $ hg log -Ra -r0 -T '{"\\\""}\n'
3156 \"
3162 \"
3157 $ hg log -Ra -r0 -T '{r"\""}\n'
3163 $ hg log -Ra -r0 -T '{r"\""}\n'
3158 \"
3164 \"
3159 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3165 $ hg log -Ra -r0 -T '{r"\\\""}\n'
3160 \\\"
3166 \\\"
3161
3167
3162 Test exception in quoted template. single backslash before quotation mark is
3168 Test exception in quoted template. single backslash before quotation mark is
3163 stripped before parsing:
3169 stripped before parsing:
3164
3170
3165 $ cat <<'EOF' > escquotetmpl
3171 $ cat <<'EOF' > escquotetmpl
3166 > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
3172 > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
3167 > EOF
3173 > EOF
3168 $ cd latesttag
3174 $ cd latesttag
3169 $ hg log -r 2 --style ../escquotetmpl
3175 $ hg log -r 2 --style ../escquotetmpl
3170 " \" \" \\" head1
3176 " \" \" \\" head1
3171
3177
3172 $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"'
3178 $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"'
3173 valid
3179 valid
3174 $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'"
3180 $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'"
3175 valid
3181 valid
3176
3182
3177 Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested
3183 Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested
3178 _evalifliteral() templates (issue4733):
3184 _evalifliteral() templates (issue4733):
3179
3185
3180 $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n'
3186 $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n'
3181 "2
3187 "2
3182 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n'
3188 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n'
3183 "2
3189 "2
3184 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n'
3190 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n'
3185 "2
3191 "2
3186
3192
3187 $ hg log -r 2 -T '{if(rev, "\\\"")}\n'
3193 $ hg log -r 2 -T '{if(rev, "\\\"")}\n'
3188 \"
3194 \"
3189 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n'
3195 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n'
3190 \"
3196 \"
3191 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3197 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3192 \"
3198 \"
3193
3199
3194 $ hg log -r 2 -T '{if(rev, r"\\\"")}\n'
3200 $ hg log -r 2 -T '{if(rev, r"\\\"")}\n'
3195 \\\"
3201 \\\"
3196 $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n'
3202 $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n'
3197 \\\"
3203 \\\"
3198 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3204 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
3199 \\\"
3205 \\\"
3200
3206
3201 escaped single quotes and errors:
3207 escaped single quotes and errors:
3202
3208
3203 $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n'
3209 $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n'
3204 foo
3210 foo
3205 $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n'
3211 $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n'
3206 foo
3212 foo
3207 $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n'
3213 $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n'
3208 hg: parse error at 21: unterminated string
3214 hg: parse error at 21: unterminated string
3209 [255]
3215 [255]
3210 $ hg log -r 2 -T '{if(rev, \"\\"")}\n'
3216 $ hg log -r 2 -T '{if(rev, \"\\"")}\n'
3211 hg: parse error: trailing \ in string
3217 hg: parse error: trailing \ in string
3212 [255]
3218 [255]
3213 $ hg log -r 2 -T '{if(rev, r\"\\"")}\n'
3219 $ hg log -r 2 -T '{if(rev, r\"\\"")}\n'
3214 hg: parse error: trailing \ in string
3220 hg: parse error: trailing \ in string
3215 [255]
3221 [255]
3216
3222
3217 $ cd ..
3223 $ cd ..
3218
3224
3219 Test leading backslashes:
3225 Test leading backslashes:
3220
3226
3221 $ cd latesttag
3227 $ cd latesttag
3222 $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n'
3228 $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n'
3223 {rev} {file}
3229 {rev} {file}
3224 $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n'
3230 $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n'
3225 \2 \head1
3231 \2 \head1
3226 $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n'
3232 $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n'
3227 \{rev} \{file}
3233 \{rev} \{file}
3228 $ cd ..
3234 $ cd ..
3229
3235
3230 Test leading backslashes in "if" expression (issue4714):
3236 Test leading backslashes in "if" expression (issue4714):
3231
3237
3232 $ cd latesttag
3238 $ cd latesttag
3233 $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n'
3239 $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n'
3234 {rev} \{rev}
3240 {rev} \{rev}
3235 $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n'
3241 $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n'
3236 \2 \\{rev}
3242 \2 \\{rev}
3237 $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n'
3243 $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n'
3238 \{rev} \\\{rev}
3244 \{rev} \\\{rev}
3239 $ cd ..
3245 $ cd ..
3240
3246
3241 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
3247 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
3242
3248
3243 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
3249 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
3244 \x6e
3250 \x6e
3245 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
3251 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
3246 \x5c\x786e
3252 \x5c\x786e
3247 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
3253 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
3248 \x6e
3254 \x6e
3249 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
3255 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
3250 \x5c\x786e
3256 \x5c\x786e
3251
3257
3252 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
3258 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
3253 \x6e
3259 \x6e
3254 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
3260 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
3255 \x5c\x786e
3261 \x5c\x786e
3256 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
3262 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
3257 \x6e
3263 \x6e
3258 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
3264 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
3259 \x5c\x786e
3265 \x5c\x786e
3260
3266
3261 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
3267 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
3262 fourth
3268 fourth
3263 second
3269 second
3264 third
3270 third
3265 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
3271 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
3266 fourth\nsecond\nthird
3272 fourth\nsecond\nthird
3267
3273
3268 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
3274 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
3269 <p>
3275 <p>
3270 1st
3276 1st
3271 </p>
3277 </p>
3272 <p>
3278 <p>
3273 2nd
3279 2nd
3274 </p>
3280 </p>
3275 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
3281 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
3276 <p>
3282 <p>
3277 1st\n\n2nd
3283 1st\n\n2nd
3278 </p>
3284 </p>
3279 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
3285 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
3280 1st
3286 1st
3281
3287
3282 2nd
3288 2nd
3283
3289
3284 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
3290 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
3285 o perso
3291 o perso
3286 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
3292 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
3287 no person
3293 no person
3288 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
3294 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
3289 o perso
3295 o perso
3290 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
3296 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
3291 no perso
3297 no perso
3292
3298
3293 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
3299 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
3294 -o perso-
3300 -o perso-
3295 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
3301 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
3296 no person
3302 no person
3297 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
3303 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
3298 \x2do perso\x2d
3304 \x2do perso\x2d
3299 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
3305 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
3300 -o perso-
3306 -o perso-
3301 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
3307 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
3302 \x2do perso\x6e
3308 \x2do perso\x6e
3303
3309
3304 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
3310 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
3305 fourth
3311 fourth
3306 second
3312 second
3307 third
3313 third
3308
3314
3309 Test string escaping in nested expression:
3315 Test string escaping in nested expression:
3310
3316
3311 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
3317 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
3312 fourth\x6esecond\x6ethird
3318 fourth\x6esecond\x6ethird
3313 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
3319 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
3314 fourth\x6esecond\x6ethird
3320 fourth\x6esecond\x6ethird
3315
3321
3316 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
3322 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
3317 fourth\x6esecond\x6ethird
3323 fourth\x6esecond\x6ethird
3318 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
3324 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
3319 fourth\x5c\x786esecond\x5c\x786ethird
3325 fourth\x5c\x786esecond\x5c\x786ethird
3320
3326
3321 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
3327 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
3322 3:\x6eo user, \x6eo domai\x6e
3328 3:\x6eo user, \x6eo domai\x6e
3323 4:\x5c\x786eew bra\x5c\x786ech
3329 4:\x5c\x786eew bra\x5c\x786ech
3324
3330
3325 Test quotes in nested expression are evaluated just like a $(command)
3331 Test quotes in nested expression are evaluated just like a $(command)
3326 substitution in POSIX shells:
3332 substitution in POSIX shells:
3327
3333
3328 $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n'
3334 $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n'
3329 8:95c24699272e
3335 8:95c24699272e
3330 $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n'
3336 $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n'
3331 {8} "95c24699272e"
3337 {8} "95c24699272e"
3332
3338
3333 Test recursive evaluation:
3339 Test recursive evaluation:
3334
3340
3335 $ hg init r
3341 $ hg init r
3336 $ cd r
3342 $ cd r
3337 $ echo a > a
3343 $ echo a > a
3338 $ hg ci -Am '{rev}'
3344 $ hg ci -Am '{rev}'
3339 adding a
3345 adding a
3340 $ hg log -r 0 --template '{if(rev, desc)}\n'
3346 $ hg log -r 0 --template '{if(rev, desc)}\n'
3341 {rev}
3347 {rev}
3342 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
3348 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
3343 test 0
3349 test 0
3344
3350
3345 $ hg branch -q 'text.{rev}'
3351 $ hg branch -q 'text.{rev}'
3346 $ echo aa >> aa
3352 $ echo aa >> aa
3347 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
3353 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
3348
3354
3349 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
3355 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
3350 {node|short}desc to
3356 {node|short}desc to
3351 text.{rev}be wrapped
3357 text.{rev}be wrapped
3352 text.{rev}desc to be
3358 text.{rev}desc to be
3353 text.{rev}wrapped (no-eol)
3359 text.{rev}wrapped (no-eol)
3354 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
3360 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
3355 bcc7ff960b8e:desc to
3361 bcc7ff960b8e:desc to
3356 text.1:be wrapped
3362 text.1:be wrapped
3357 text.1:desc to be
3363 text.1:desc to be
3358 text.1:wrapped (no-eol)
3364 text.1:wrapped (no-eol)
3359 $ hg log -l1 -T '{fill(desc, date, "", "")}\n'
3365 $ hg log -l1 -T '{fill(desc, date, "", "")}\n'
3360 hg: parse error: fill expects an integer width
3366 hg: parse error: fill expects an integer width
3361 [255]
3367 [255]
3362
3368
3363 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
3369 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
3364 bcc7ff960b8e:desc to be
3370 bcc7ff960b8e:desc to be
3365 termwidth.1:wrapped desc
3371 termwidth.1:wrapped desc
3366 termwidth.1:to be wrapped (no-eol)
3372 termwidth.1:to be wrapped (no-eol)
3367
3373
3368 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
3374 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
3369 {node|short} (no-eol)
3375 {node|short} (no-eol)
3370 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
3376 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
3371 bcc-ff---b-e (no-eol)
3377 bcc-ff---b-e (no-eol)
3372
3378
3373 $ cat >> .hg/hgrc <<EOF
3379 $ cat >> .hg/hgrc <<EOF
3374 > [extensions]
3380 > [extensions]
3375 > color=
3381 > color=
3376 > [color]
3382 > [color]
3377 > mode=ansi
3383 > mode=ansi
3378 > text.{rev} = red
3384 > text.{rev} = red
3379 > text.1 = green
3385 > text.1 = green
3380 > EOF
3386 > EOF
3381 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
3387 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
3382 \x1b[0;31mtext\x1b[0m (esc)
3388 \x1b[0;31mtext\x1b[0m (esc)
3383 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
3389 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
3384 \x1b[0;32mtext\x1b[0m (esc)
3390 \x1b[0;32mtext\x1b[0m (esc)
3385
3391
3386 color effect can be specified without quoting:
3392 color effect can be specified without quoting:
3387
3393
3388 $ hg log --color=always -l 1 --template '{label(red, "text\n")}'
3394 $ hg log --color=always -l 1 --template '{label(red, "text\n")}'
3389 \x1b[0;31mtext\x1b[0m (esc)
3395 \x1b[0;31mtext\x1b[0m (esc)
3390
3396
3391 color effects can be nested (issue5413)
3397 color effects can be nested (issue5413)
3392
3398
3393 $ hg debugtemplate --color=always \
3399 $ hg debugtemplate --color=always \
3394 > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n'
3400 > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n'
3395 \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc)
3401 \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc)
3396
3402
3397 pad() should interact well with color codes (issue5416)
3403 pad() should interact well with color codes (issue5416)
3398
3404
3399 $ hg debugtemplate --color=always \
3405 $ hg debugtemplate --color=always \
3400 > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n'
3406 > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n'
3401 \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc)
3407 \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc)
3402
3408
3403 label should be no-op if color is disabled:
3409 label should be no-op if color is disabled:
3404
3410
3405 $ hg log --color=never -l 1 --template '{label(red, "text\n")}'
3411 $ hg log --color=never -l 1 --template '{label(red, "text\n")}'
3406 text
3412 text
3407 $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}'
3413 $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}'
3408 text
3414 text
3409
3415
3410 Test branches inside if statement:
3416 Test branches inside if statement:
3411
3417
3412 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
3418 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
3413 no
3419 no
3414
3420
3415 Test dict constructor:
3421 Test dict constructor:
3416
3422
3417 $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n'
3423 $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n'
3418 y=f7769ec2ab97 x=0
3424 y=f7769ec2ab97 x=0
3419 $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}'
3425 $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}'
3420 x=0
3426 x=0
3421 y=f7769ec2ab97
3427 y=f7769ec2ab97
3422 $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n'
3428 $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n'
3423 {"x": 0, "y": "f7769ec2ab97"}
3429 {"x": 0, "y": "f7769ec2ab97"}
3424 $ hg log -r 0 -T '{dict()|json}\n'
3430 $ hg log -r 0 -T '{dict()|json}\n'
3425 {}
3431 {}
3426
3432
3427 $ hg log -r 0 -T '{dict(rev, node=node|short)}\n'
3433 $ hg log -r 0 -T '{dict(rev, node=node|short)}\n'
3428 rev=0 node=f7769ec2ab97
3434 rev=0 node=f7769ec2ab97
3429 $ hg log -r 0 -T '{dict(rev, node|short)}\n'
3435 $ hg log -r 0 -T '{dict(rev, node|short)}\n'
3430 rev=0 node=f7769ec2ab97
3436 rev=0 node=f7769ec2ab97
3431
3437
3432 $ hg log -r 0 -T '{dict(rev, rev=rev)}\n'
3438 $ hg log -r 0 -T '{dict(rev, rev=rev)}\n'
3433 hg: parse error: duplicated dict key 'rev' inferred
3439 hg: parse error: duplicated dict key 'rev' inferred
3434 [255]
3440 [255]
3435 $ hg log -r 0 -T '{dict(node, node|short)}\n'
3441 $ hg log -r 0 -T '{dict(node, node|short)}\n'
3436 hg: parse error: duplicated dict key 'node' inferred
3442 hg: parse error: duplicated dict key 'node' inferred
3437 [255]
3443 [255]
3438 $ hg log -r 0 -T '{dict(1 + 2)}'
3444 $ hg log -r 0 -T '{dict(1 + 2)}'
3439 hg: parse error: dict key cannot be inferred
3445 hg: parse error: dict key cannot be inferred
3440 [255]
3446 [255]
3441
3447
3442 $ hg log -r 0 -T '{dict(x=rev, x=node)}'
3448 $ hg log -r 0 -T '{dict(x=rev, x=node)}'
3443 hg: parse error: dict got multiple values for keyword argument 'x'
3449 hg: parse error: dict got multiple values for keyword argument 'x'
3444 [255]
3450 [255]
3445
3451
3446 Test get function:
3452 Test get function:
3447
3453
3448 $ hg log -r 0 --template '{get(extras, "branch")}\n'
3454 $ hg log -r 0 --template '{get(extras, "branch")}\n'
3449 default
3455 default
3450 $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n'
3456 $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n'
3451 default
3457 default
3452 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
3458 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
3453 hg: parse error: get() expects a dict as first argument
3459 hg: parse error: get() expects a dict as first argument
3454 [255]
3460 [255]
3455
3461
3456 Test json filter applied to hybrid object:
3462 Test json filter applied to hybrid object:
3457
3463
3458 $ hg log -r0 -T '{files|json}\n'
3464 $ hg log -r0 -T '{files|json}\n'
3459 ["a"]
3465 ["a"]
3460 $ hg log -r0 -T '{extras|json}\n'
3466 $ hg log -r0 -T '{extras|json}\n'
3461 {"branch": "default"}
3467 {"branch": "default"}
3462
3468
3463 Test localdate(date, tz) function:
3469 Test localdate(date, tz) function:
3464
3470
3465 $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n'
3471 $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n'
3466 1970-01-01 09:00 +0900
3472 1970-01-01 09:00 +0900
3467 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n'
3473 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n'
3468 1970-01-01 00:00 +0000
3474 1970-01-01 00:00 +0000
3469 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n'
3475 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n'
3470 hg: parse error: localdate expects a timezone
3476 hg: parse error: localdate expects a timezone
3471 [255]
3477 [255]
3472 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n'
3478 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n'
3473 1970-01-01 02:00 +0200
3479 1970-01-01 02:00 +0200
3474 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n'
3480 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n'
3475 1970-01-01 00:00 +0000
3481 1970-01-01 00:00 +0000
3476 $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n'
3482 $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n'
3477 1970-01-01 00:00 +0000
3483 1970-01-01 00:00 +0000
3478 $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n'
3484 $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n'
3479 hg: parse error: localdate expects a timezone
3485 hg: parse error: localdate expects a timezone
3480 [255]
3486 [255]
3481 $ hg log -r0 -T '{localdate(date, date)|isodate}\n'
3487 $ hg log -r0 -T '{localdate(date, date)|isodate}\n'
3482 hg: parse error: localdate expects a timezone
3488 hg: parse error: localdate expects a timezone
3483 [255]
3489 [255]
3484
3490
3485 Test shortest(node) function:
3491 Test shortest(node) function:
3486
3492
3487 $ echo b > b
3493 $ echo b > b
3488 $ hg ci -qAm b
3494 $ hg ci -qAm b
3489 $ hg log --template '{shortest(node)}\n'
3495 $ hg log --template '{shortest(node)}\n'
3490 e777
3496 e777
3491 bcc7
3497 bcc7
3492 f776
3498 f776
3493 $ hg log --template '{shortest(node, 10)}\n'
3499 $ hg log --template '{shortest(node, 10)}\n'
3494 e777603221
3500 e777603221
3495 bcc7ff960b
3501 bcc7ff960b
3496 f7769ec2ab
3502 f7769ec2ab
3497 $ hg log --template '{node|shortest}\n' -l1
3503 $ hg log --template '{node|shortest}\n' -l1
3498 e777
3504 e777
3499
3505
3500 $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n'
3506 $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n'
3501 f7769ec2ab
3507 f7769ec2ab
3502 $ hg log -r 0 -T '{shortest(node, "not an int")}\n'
3508 $ hg log -r 0 -T '{shortest(node, "not an int")}\n'
3503 hg: parse error: shortest() expects an integer minlength
3509 hg: parse error: shortest() expects an integer minlength
3504 [255]
3510 [255]
3505
3511
3506 $ hg log -r 'wdir()' -T '{node|shortest}\n'
3512 $ hg log -r 'wdir()' -T '{node|shortest}\n'
3507 ffff
3513 ffff
3508
3514
3509 $ cd ..
3515 $ cd ..
3510
3516
3511 Test shortest(node) with the repo having short hash collision:
3517 Test shortest(node) with the repo having short hash collision:
3512
3518
3513 $ hg init hashcollision
3519 $ hg init hashcollision
3514 $ cd hashcollision
3520 $ cd hashcollision
3515 $ cat <<EOF >> .hg/hgrc
3521 $ cat <<EOF >> .hg/hgrc
3516 > [experimental]
3522 > [experimental]
3517 > evolution = createmarkers
3523 > evolution = createmarkers
3518 > EOF
3524 > EOF
3519 $ echo 0 > a
3525 $ echo 0 > a
3520 $ hg ci -qAm 0
3526 $ hg ci -qAm 0
3521 $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do
3527 $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do
3522 > hg up -q 0
3528 > hg up -q 0
3523 > echo $i > a
3529 > echo $i > a
3524 > hg ci -qm $i
3530 > hg ci -qm $i
3525 > done
3531 > done
3526 $ hg up -q null
3532 $ hg up -q null
3527 $ hg log -r0: -T '{rev}:{node}\n'
3533 $ hg log -r0: -T '{rev}:{node}\n'
3528 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a
3534 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a
3529 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc
3535 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc
3530 2:11407b3f1b9c3e76a79c1ec5373924df096f0499
3536 2:11407b3f1b9c3e76a79c1ec5373924df096f0499
3531 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4
3537 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4
3532 4:10776689e627b465361ad5c296a20a487e153ca4
3538 4:10776689e627b465361ad5c296a20a487e153ca4
3533 5:a00be79088084cb3aff086ab799f8790e01a976b
3539 5:a00be79088084cb3aff086ab799f8790e01a976b
3534 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6
3540 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6
3535 7:a0457b3450b8e1b778f1163b31a435802987fe5d
3541 7:a0457b3450b8e1b778f1163b31a435802987fe5d
3536 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a
3542 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a
3537 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48
3543 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48
3538 10:c562ddd9c94164376c20b86b0b4991636a3bf84f
3544 10:c562ddd9c94164376c20b86b0b4991636a3bf84f
3539 $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b
3545 $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b
3540 $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48
3546 $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48
3541 $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f
3547 $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f
3542
3548
3543 nodes starting with '11' (we don't have the revision number '11' though)
3549 nodes starting with '11' (we don't have the revision number '11' though)
3544
3550
3545 $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n'
3551 $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n'
3546 1:1142
3552 1:1142
3547 2:1140
3553 2:1140
3548 3:11d
3554 3:11d
3549
3555
3550 '5:a00' is hidden, but still we have two nodes starting with 'a0'
3556 '5:a00' is hidden, but still we have two nodes starting with 'a0'
3551
3557
3552 $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n'
3558 $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n'
3553 6:a0b
3559 6:a0b
3554 7:a04
3560 7:a04
3555
3561
3556 node '10' conflicts with the revision number '10' even if it is hidden
3562 node '10' conflicts with the revision number '10' even if it is hidden
3557 (we could exclude hidden revision numbers, but currently we don't)
3563 (we could exclude hidden revision numbers, but currently we don't)
3558
3564
3559 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n'
3565 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n'
3560 4:107
3566 4:107
3561 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden
3567 $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden
3562 4:107
3568 4:107
3563
3569
3564 node 'c562' should be unique if the other 'c562' nodes are hidden
3570 node 'c562' should be unique if the other 'c562' nodes are hidden
3565 (but we don't try the slow path to filter out hidden nodes for now)
3571 (but we don't try the slow path to filter out hidden nodes for now)
3566
3572
3567 $ hg log -r 8 -T '{rev}:{node|shortest}\n'
3573 $ hg log -r 8 -T '{rev}:{node|shortest}\n'
3568 8:c5625
3574 8:c5625
3569 $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden
3575 $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden
3570 8:c5625
3576 8:c5625
3571 9:c5623
3577 9:c5623
3572 10:c562d
3578 10:c562d
3573
3579
3574 $ cd ..
3580 $ cd ..
3575
3581
3576 Test pad function
3582 Test pad function
3577
3583
3578 $ cd r
3584 $ cd r
3579
3585
3580 $ hg log --template '{pad(rev, 20)} {author|user}\n'
3586 $ hg log --template '{pad(rev, 20)} {author|user}\n'
3581 2 test
3587 2 test
3582 1 {node|short}
3588 1 {node|short}
3583 0 test
3589 0 test
3584
3590
3585 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
3591 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
3586 2 test
3592 2 test
3587 1 {node|short}
3593 1 {node|short}
3588 0 test
3594 0 test
3589
3595
3590 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
3596 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
3591 2------------------- test
3597 2------------------- test
3592 1------------------- {node|short}
3598 1------------------- {node|short}
3593 0------------------- test
3599 0------------------- test
3594
3600
3595 Test template string in pad function
3601 Test template string in pad function
3596
3602
3597 $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n'
3603 $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n'
3598 {0} test
3604 {0} test
3599
3605
3600 $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n'
3606 $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n'
3601 \{rev} test
3607 \{rev} test
3602
3608
3603 Test width argument passed to pad function
3609 Test width argument passed to pad function
3604
3610
3605 $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n'
3611 $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n'
3606 0 test
3612 0 test
3607 $ hg log -r 0 -T '{pad(rev, "not an int")}\n'
3613 $ hg log -r 0 -T '{pad(rev, "not an int")}\n'
3608 hg: parse error: pad() expects an integer width
3614 hg: parse error: pad() expects an integer width
3609 [255]
3615 [255]
3610
3616
3611 Test invalid fillchar passed to pad function
3617 Test invalid fillchar passed to pad function
3612
3618
3613 $ hg log -r 0 -T '{pad(rev, 10, "")}\n'
3619 $ hg log -r 0 -T '{pad(rev, 10, "")}\n'
3614 hg: parse error: pad() expects a single fill character
3620 hg: parse error: pad() expects a single fill character
3615 [255]
3621 [255]
3616 $ hg log -r 0 -T '{pad(rev, 10, "--")}\n'
3622 $ hg log -r 0 -T '{pad(rev, 10, "--")}\n'
3617 hg: parse error: pad() expects a single fill character
3623 hg: parse error: pad() expects a single fill character
3618 [255]
3624 [255]
3619
3625
3620 Test boolean argument passed to pad function
3626 Test boolean argument passed to pad function
3621
3627
3622 no crash
3628 no crash
3623
3629
3624 $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n'
3630 $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n'
3625 ---------0
3631 ---------0
3626
3632
3627 string/literal
3633 string/literal
3628
3634
3629 $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n'
3635 $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n'
3630 ---------0
3636 ---------0
3631 $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n'
3637 $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n'
3632 0---------
3638 0---------
3633 $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n'
3639 $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n'
3634 0---------
3640 0---------
3635
3641
3636 unknown keyword is evaluated to ''
3642 unknown keyword is evaluated to ''
3637
3643
3638 $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n'
3644 $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n'
3639 0---------
3645 0---------
3640
3646
3641 Test separate function
3647 Test separate function
3642
3648
3643 $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n'
3649 $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n'
3644 a-b-c
3650 a-b-c
3645 $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n'
3651 $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n'
3646 0:f7769ec2ab97 test default
3652 0:f7769ec2ab97 test default
3647 $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n'
3653 $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n'
3648 a \x1b[0;31mb\x1b[0m c d (esc)
3654 a \x1b[0;31mb\x1b[0m c d (esc)
3649
3655
3650 Test boolean expression/literal passed to if function
3656 Test boolean expression/literal passed to if function
3651
3657
3652 $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n'
3658 $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n'
3653 rev 0 is True
3659 rev 0 is True
3654 $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n'
3660 $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n'
3655 literal 0 is True as well
3661 literal 0 is True as well
3656 $ hg log -r 0 -T '{if("", "", "empty string is False")}\n'
3662 $ hg log -r 0 -T '{if("", "", "empty string is False")}\n'
3657 empty string is False
3663 empty string is False
3658 $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n'
3664 $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n'
3659 empty list is False
3665 empty list is False
3660 $ hg log -r 0 -T '{if(true, "true is True")}\n'
3666 $ hg log -r 0 -T '{if(true, "true is True")}\n'
3661 true is True
3667 true is True
3662 $ hg log -r 0 -T '{if(false, "", "false is False")}\n'
3668 $ hg log -r 0 -T '{if(false, "", "false is False")}\n'
3663 false is False
3669 false is False
3664 $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n'
3670 $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n'
3665 non-empty string is True
3671 non-empty string is True
3666
3672
3667 Test ifcontains function
3673 Test ifcontains function
3668
3674
3669 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
3675 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
3670 2 is in the string
3676 2 is in the string
3671 1 is not
3677 1 is not
3672 0 is in the string
3678 0 is in the string
3673
3679
3674 $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n'
3680 $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n'
3675 2 is in the string
3681 2 is in the string
3676 1 is not
3682 1 is not
3677 0 is in the string
3683 0 is in the string
3678
3684
3679 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
3685 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
3680 2 did not add a
3686 2 did not add a
3681 1 did not add a
3687 1 did not add a
3682 0 added a
3688 0 added a
3683
3689
3684 $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n'
3690 $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n'
3685 2 is parent of 1
3691 2 is parent of 1
3686 1
3692 1
3687 0
3693 0
3688
3694
3689 Test revset function
3695 Test revset function
3690
3696
3691 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
3697 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
3692 2 current rev
3698 2 current rev
3693 1 not current rev
3699 1 not current rev
3694 0 not current rev
3700 0 not current rev
3695
3701
3696 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
3702 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
3697 2 match rev
3703 2 match rev
3698 1 match rev
3704 1 match rev
3699 0 not match rev
3705 0 not match rev
3700
3706
3701 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
3707 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
3702 2 Parents: 1
3708 2 Parents: 1
3703 1 Parents: 0
3709 1 Parents: 0
3704 0 Parents:
3710 0 Parents:
3705
3711
3706 $ cat >> .hg/hgrc <<EOF
3712 $ cat >> .hg/hgrc <<EOF
3707 > [revsetalias]
3713 > [revsetalias]
3708 > myparents(\$1) = parents(\$1)
3714 > myparents(\$1) = parents(\$1)
3709 > EOF
3715 > EOF
3710 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
3716 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
3711 2 Parents: 1
3717 2 Parents: 1
3712 1 Parents: 0
3718 1 Parents: 0
3713 0 Parents:
3719 0 Parents:
3714
3720
3715 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
3721 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
3716 Rev: 2
3722 Rev: 2
3717 Ancestor: 0
3723 Ancestor: 0
3718 Ancestor: 1
3724 Ancestor: 1
3719 Ancestor: 2
3725 Ancestor: 2
3720
3726
3721 Rev: 1
3727 Rev: 1
3722 Ancestor: 0
3728 Ancestor: 0
3723 Ancestor: 1
3729 Ancestor: 1
3724
3730
3725 Rev: 0
3731 Rev: 0
3726 Ancestor: 0
3732 Ancestor: 0
3727
3733
3728 $ hg log --template '{revset("TIP"|lower)}\n' -l1
3734 $ hg log --template '{revset("TIP"|lower)}\n' -l1
3729 2
3735 2
3730
3736
3731 $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1
3737 $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1
3732 2
3738 2
3733
3739
3734 a list template is evaluated for each item of revset/parents
3740 a list template is evaluated for each item of revset/parents
3735
3741
3736 $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n'
3742 $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n'
3737 2 p: 1:bcc7ff960b8e
3743 2 p: 1:bcc7ff960b8e
3738 1 p: 0:f7769ec2ab97
3744 1 p: 0:f7769ec2ab97
3739 0 p:
3745 0 p:
3740
3746
3741 $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n'
3747 $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n'
3742 2 p: 1:bcc7ff960b8e -1:000000000000
3748 2 p: 1:bcc7ff960b8e -1:000000000000
3743 1 p: 0:f7769ec2ab97 -1:000000000000
3749 1 p: 0:f7769ec2ab97 -1:000000000000
3744 0 p: -1:000000000000 -1:000000000000
3750 0 p: -1:000000000000 -1:000000000000
3745
3751
3746 therefore, 'revcache' should be recreated for each rev
3752 therefore, 'revcache' should be recreated for each rev
3747
3753
3748 $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n'
3754 $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n'
3749 2 aa b
3755 2 aa b
3750 p
3756 p
3751 1
3757 1
3752 p a
3758 p a
3753 0 a
3759 0 a
3754 p
3760 p
3755
3761
3756 $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n'
3762 $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n'
3757 2 aa b
3763 2 aa b
3758 p
3764 p
3759 1
3765 1
3760 p a
3766 p a
3761 0 a
3767 0 a
3762 p
3768 p
3763
3769
3764 a revset item must be evaluated as an integer revision, not an offset from tip
3770 a revset item must be evaluated as an integer revision, not an offset from tip
3765
3771
3766 $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n'
3772 $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n'
3767 -1:000000000000
3773 -1:000000000000
3768 $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n'
3774 $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n'
3769 -1:000000000000
3775 -1:000000000000
3770
3776
3771 join() should pick '{rev}' from revset items:
3777 join() should pick '{rev}' from revset items:
3772
3778
3773 $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6
3779 $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6
3774 4, 5
3780 4, 5
3775
3781
3776 on the other hand, parents are formatted as '{rev}:{node|formatnode}' by
3782 on the other hand, parents are formatted as '{rev}:{node|formatnode}' by
3777 default. join() should agree with the default formatting:
3783 default. join() should agree with the default formatting:
3778
3784
3779 $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6
3785 $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6
3780 5:13207e5a10d9, 4:bbe44766e73d
3786 5:13207e5a10d9, 4:bbe44766e73d
3781
3787
3782 $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug
3788 $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug
3783 5:13207e5a10d9fd28ec424934298e176197f2c67f,
3789 5:13207e5a10d9fd28ec424934298e176197f2c67f,
3784 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
3790 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
3785
3791
3786 Test files function
3792 Test files function
3787
3793
3788 $ hg log -T "{rev}\n{join(files('*'), '\n')}\n"
3794 $ hg log -T "{rev}\n{join(files('*'), '\n')}\n"
3789 2
3795 2
3790 a
3796 a
3791 aa
3797 aa
3792 b
3798 b
3793 1
3799 1
3794 a
3800 a
3795 0
3801 0
3796 a
3802 a
3797
3803
3798 $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n"
3804 $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n"
3799 2
3805 2
3800 aa
3806 aa
3801 1
3807 1
3802
3808
3803 0
3809 0
3804
3810
3805
3811
3806 Test relpath function
3812 Test relpath function
3807
3813
3808 $ hg log -r0 -T '{files % "{file|relpath}\n"}'
3814 $ hg log -r0 -T '{files % "{file|relpath}\n"}'
3809 a
3815 a
3810 $ cd ..
3816 $ cd ..
3811 $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}'
3817 $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}'
3812 r/a
3818 r/a
3813 $ cd r
3819 $ cd r
3814
3820
3815 Test active bookmark templating
3821 Test active bookmark templating
3816
3822
3817 $ hg book foo
3823 $ hg book foo
3818 $ hg book bar
3824 $ hg book bar
3819 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
3825 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
3820 2 bar* foo
3826 2 bar* foo
3821 1
3827 1
3822 0
3828 0
3823 $ hg log --template "{rev} {activebookmark}\n"
3829 $ hg log --template "{rev} {activebookmark}\n"
3824 2 bar
3830 2 bar
3825 1
3831 1
3826 0
3832 0
3827 $ hg bookmarks --inactive bar
3833 $ hg bookmarks --inactive bar
3828 $ hg log --template "{rev} {activebookmark}\n"
3834 $ hg log --template "{rev} {activebookmark}\n"
3829 2
3835 2
3830 1
3836 1
3831 0
3837 0
3832 $ hg book -r1 baz
3838 $ hg book -r1 baz
3833 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
3839 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
3834 2 bar foo
3840 2 bar foo
3835 1 baz
3841 1 baz
3836 0
3842 0
3837 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
3843 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
3838 2 t
3844 2 t
3839 1 f
3845 1 f
3840 0 f
3846 0 f
3841
3847
3842 Test namespaces dict
3848 Test namespaces dict
3843
3849
3844 $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n'
3850 $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n'
3845 2 bookmarks=bar,foo tags=tip branches=text.{rev}
3851 2 bookmarks=bar,foo tags=tip branches=text.{rev}
3846 1 bookmarks=baz tags= branches=text.{rev}
3852 1 bookmarks=baz tags= branches=text.{rev}
3847 0 bookmarks= tags= branches=default
3853 0 bookmarks= tags= branches=default
3848 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
3854 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
3849 bookmarks: bar foo
3855 bookmarks: bar foo
3850 tags: tip
3856 tags: tip
3851 branches: text.{rev}
3857 branches: text.{rev}
3852 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
3858 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
3853 bookmarks:
3859 bookmarks:
3854 bar
3860 bar
3855 foo
3861 foo
3856 tags:
3862 tags:
3857 tip
3863 tip
3858 branches:
3864 branches:
3859 text.{rev}
3865 text.{rev}
3860 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
3866 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
3861 bar
3867 bar
3862 foo
3868 foo
3863
3869
3864 Test stringify on sub expressions
3870 Test stringify on sub expressions
3865
3871
3866 $ cd ..
3872 $ cd ..
3867 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
3873 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
3868 fourth, second, third
3874 fourth, second, third
3869 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
3875 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
3870 abc
3876 abc
3871
3877
3872 Test splitlines
3878 Test splitlines
3873
3879
3874 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
3880 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
3875 @ foo Modify, add, remove, rename
3881 @ foo Modify, add, remove, rename
3876 |
3882 |
3877 o foo future
3883 o foo future
3878 |
3884 |
3879 o foo third
3885 o foo third
3880 |
3886 |
3881 o foo second
3887 o foo second
3882
3888
3883 o foo merge
3889 o foo merge
3884 |\
3890 |\
3885 | o foo new head
3891 | o foo new head
3886 | |
3892 | |
3887 o | foo new branch
3893 o | foo new branch
3888 |/
3894 |/
3889 o foo no user, no domain
3895 o foo no user, no domain
3890 |
3896 |
3891 o foo no person
3897 o foo no person
3892 |
3898 |
3893 o foo other 1
3899 o foo other 1
3894 | foo other 2
3900 | foo other 2
3895 | foo
3901 | foo
3896 | foo other 3
3902 | foo other 3
3897 o foo line 1
3903 o foo line 1
3898 foo line 2
3904 foo line 2
3899
3905
3900 $ hg log -R a -r0 -T '{desc|splitlines}\n'
3906 $ hg log -R a -r0 -T '{desc|splitlines}\n'
3901 line 1 line 2
3907 line 1 line 2
3902 $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n'
3908 $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n'
3903 line 1|line 2
3909 line 1|line 2
3904
3910
3905 Test startswith
3911 Test startswith
3906 $ hg log -Gv -R a --template "{startswith(desc)}"
3912 $ hg log -Gv -R a --template "{startswith(desc)}"
3907 hg: parse error: startswith expects two arguments
3913 hg: parse error: startswith expects two arguments
3908 [255]
3914 [255]
3909
3915
3910 $ hg log -Gv -R a --template "{startswith('line', desc)}"
3916 $ hg log -Gv -R a --template "{startswith('line', desc)}"
3911 @
3917 @
3912 |
3918 |
3913 o
3919 o
3914 |
3920 |
3915 o
3921 o
3916 |
3922 |
3917 o
3923 o
3918
3924
3919 o
3925 o
3920 |\
3926 |\
3921 | o
3927 | o
3922 | |
3928 | |
3923 o |
3929 o |
3924 |/
3930 |/
3925 o
3931 o
3926 |
3932 |
3927 o
3933 o
3928 |
3934 |
3929 o
3935 o
3930 |
3936 |
3931 o line 1
3937 o line 1
3932 line 2
3938 line 2
3933
3939
3934 Test bad template with better error message
3940 Test bad template with better error message
3935
3941
3936 $ hg log -Gv -R a --template '{desc|user()}'
3942 $ hg log -Gv -R a --template '{desc|user()}'
3937 hg: parse error: expected a symbol, got 'func'
3943 hg: parse error: expected a symbol, got 'func'
3938 [255]
3944 [255]
3939
3945
3940 Test word function (including index out of bounds graceful failure)
3946 Test word function (including index out of bounds graceful failure)
3941
3947
3942 $ hg log -Gv -R a --template "{word('1', desc)}"
3948 $ hg log -Gv -R a --template "{word('1', desc)}"
3943 @ add,
3949 @ add,
3944 |
3950 |
3945 o
3951 o
3946 |
3952 |
3947 o
3953 o
3948 |
3954 |
3949 o
3955 o
3950
3956
3951 o
3957 o
3952 |\
3958 |\
3953 | o head
3959 | o head
3954 | |
3960 | |
3955 o | branch
3961 o | branch
3956 |/
3962 |/
3957 o user,
3963 o user,
3958 |
3964 |
3959 o person
3965 o person
3960 |
3966 |
3961 o 1
3967 o 1
3962 |
3968 |
3963 o 1
3969 o 1
3964
3970
3965
3971
3966 Test word third parameter used as splitter
3972 Test word third parameter used as splitter
3967
3973
3968 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
3974 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
3969 @ M
3975 @ M
3970 |
3976 |
3971 o future
3977 o future
3972 |
3978 |
3973 o third
3979 o third
3974 |
3980 |
3975 o sec
3981 o sec
3976
3982
3977 o merge
3983 o merge
3978 |\
3984 |\
3979 | o new head
3985 | o new head
3980 | |
3986 | |
3981 o | new branch
3987 o | new branch
3982 |/
3988 |/
3983 o n
3989 o n
3984 |
3990 |
3985 o n
3991 o n
3986 |
3992 |
3987 o
3993 o
3988 |
3994 |
3989 o line 1
3995 o line 1
3990 line 2
3996 line 2
3991
3997
3992 Test word error messages for not enough and too many arguments
3998 Test word error messages for not enough and too many arguments
3993
3999
3994 $ hg log -Gv -R a --template "{word('0')}"
4000 $ hg log -Gv -R a --template "{word('0')}"
3995 hg: parse error: word expects two or three arguments, got 1
4001 hg: parse error: word expects two or three arguments, got 1
3996 [255]
4002 [255]
3997
4003
3998 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
4004 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
3999 hg: parse error: word expects two or three arguments, got 7
4005 hg: parse error: word expects two or three arguments, got 7
4000 [255]
4006 [255]
4001
4007
4002 Test word for integer literal
4008 Test word for integer literal
4003
4009
4004 $ hg log -R a --template "{word(2, desc)}\n" -r0
4010 $ hg log -R a --template "{word(2, desc)}\n" -r0
4005 line
4011 line
4006
4012
4007 Test word for invalid numbers
4013 Test word for invalid numbers
4008
4014
4009 $ hg log -Gv -R a --template "{word('a', desc)}"
4015 $ hg log -Gv -R a --template "{word('a', desc)}"
4010 hg: parse error: word expects an integer index
4016 hg: parse error: word expects an integer index
4011 [255]
4017 [255]
4012
4018
4013 Test word for out of range
4019 Test word for out of range
4014
4020
4015 $ hg log -R a --template "{word(10000, desc)}"
4021 $ hg log -R a --template "{word(10000, desc)}"
4016 $ hg log -R a --template "{word(-10000, desc)}"
4022 $ hg log -R a --template "{word(-10000, desc)}"
4017
4023
4018 Test indent and not adding to empty lines
4024 Test indent and not adding to empty lines
4019
4025
4020 $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a
4026 $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a
4021 -----
4027 -----
4022 > line 1
4028 > line 1
4023 >> line 2
4029 >> line 2
4024 -----
4030 -----
4025 > other 1
4031 > other 1
4026 >> other 2
4032 >> other 2
4027
4033
4028 >> other 3
4034 >> other 3
4029
4035
4030 Test with non-strings like dates
4036 Test with non-strings like dates
4031
4037
4032 $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a
4038 $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a
4033 1200000.00
4039 1200000.00
4034 1300000.00
4040 1300000.00
4035
4041
4036 Test broken string escapes:
4042 Test broken string escapes:
4037
4043
4038 $ hg log -T "bogus\\" -R a
4044 $ hg log -T "bogus\\" -R a
4039 hg: parse error: trailing \ in string
4045 hg: parse error: trailing \ in string
4040 [255]
4046 [255]
4041 $ hg log -T "\\xy" -R a
4047 $ hg log -T "\\xy" -R a
4042 hg: parse error: invalid \x escape
4048 hg: parse error: invalid \x escape
4043 [255]
4049 [255]
4044
4050
4045 json filter should escape HTML tags so that the output can be embedded in hgweb:
4051 json filter should escape HTML tags so that the output can be embedded in hgweb:
4046
4052
4047 $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1
4053 $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1
4048 "\u003cfoo@example.org\u003e"
4054 "\u003cfoo@example.org\u003e"
4049
4055
4050 Templater supports aliases of symbol and func() styles:
4056 Templater supports aliases of symbol and func() styles:
4051
4057
4052 $ hg clone -q a aliases
4058 $ hg clone -q a aliases
4053 $ cd aliases
4059 $ cd aliases
4054 $ cat <<EOF >> .hg/hgrc
4060 $ cat <<EOF >> .hg/hgrc
4055 > [templatealias]
4061 > [templatealias]
4056 > r = rev
4062 > r = rev
4057 > rn = "{r}:{node|short}"
4063 > rn = "{r}:{node|short}"
4058 > status(c, files) = files % "{c} {file}\n"
4064 > status(c, files) = files % "{c} {file}\n"
4059 > utcdate(d) = localdate(d, "UTC")
4065 > utcdate(d) = localdate(d, "UTC")
4060 > EOF
4066 > EOF
4061
4067
4062 $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n'
4068 $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n'
4063 (template
4069 (template
4064 ('symbol', 'rn')
4070 ('symbol', 'rn')
4065 ('string', ' ')
4071 ('string', ' ')
4066 (|
4072 (|
4067 (func
4073 (func
4068 ('symbol', 'utcdate')
4074 ('symbol', 'utcdate')
4069 ('symbol', 'date'))
4075 ('symbol', 'date'))
4070 ('symbol', 'isodate'))
4076 ('symbol', 'isodate'))
4071 ('string', '\n'))
4077 ('string', '\n'))
4072 * expanded:
4078 * expanded:
4073 (template
4079 (template
4074 (template
4080 (template
4075 ('symbol', 'rev')
4081 ('symbol', 'rev')
4076 ('string', ':')
4082 ('string', ':')
4077 (|
4083 (|
4078 ('symbol', 'node')
4084 ('symbol', 'node')
4079 ('symbol', 'short')))
4085 ('symbol', 'short')))
4080 ('string', ' ')
4086 ('string', ' ')
4081 (|
4087 (|
4082 (func
4088 (func
4083 ('symbol', 'localdate')
4089 ('symbol', 'localdate')
4084 (list
4090 (list
4085 ('symbol', 'date')
4091 ('symbol', 'date')
4086 ('string', 'UTC')))
4092 ('string', 'UTC')))
4087 ('symbol', 'isodate'))
4093 ('symbol', 'isodate'))
4088 ('string', '\n'))
4094 ('string', '\n'))
4089 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4095 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4090
4096
4091 $ hg debugtemplate -vr0 '{status("A", file_adds)}'
4097 $ hg debugtemplate -vr0 '{status("A", file_adds)}'
4092 (template
4098 (template
4093 (func
4099 (func
4094 ('symbol', 'status')
4100 ('symbol', 'status')
4095 (list
4101 (list
4096 ('string', 'A')
4102 ('string', 'A')
4097 ('symbol', 'file_adds'))))
4103 ('symbol', 'file_adds'))))
4098 * expanded:
4104 * expanded:
4099 (template
4105 (template
4100 (%
4106 (%
4101 ('symbol', 'file_adds')
4107 ('symbol', 'file_adds')
4102 (template
4108 (template
4103 ('string', 'A')
4109 ('string', 'A')
4104 ('string', ' ')
4110 ('string', ' ')
4105 ('symbol', 'file')
4111 ('symbol', 'file')
4106 ('string', '\n'))))
4112 ('string', '\n'))))
4107 A a
4113 A a
4108
4114
4109 A unary function alias can be called as a filter:
4115 A unary function alias can be called as a filter:
4110
4116
4111 $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n'
4117 $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n'
4112 (template
4118 (template
4113 (|
4119 (|
4114 (|
4120 (|
4115 ('symbol', 'date')
4121 ('symbol', 'date')
4116 ('symbol', 'utcdate'))
4122 ('symbol', 'utcdate'))
4117 ('symbol', 'isodate'))
4123 ('symbol', 'isodate'))
4118 ('string', '\n'))
4124 ('string', '\n'))
4119 * expanded:
4125 * expanded:
4120 (template
4126 (template
4121 (|
4127 (|
4122 (func
4128 (func
4123 ('symbol', 'localdate')
4129 ('symbol', 'localdate')
4124 (list
4130 (list
4125 ('symbol', 'date')
4131 ('symbol', 'date')
4126 ('string', 'UTC')))
4132 ('string', 'UTC')))
4127 ('symbol', 'isodate'))
4133 ('symbol', 'isodate'))
4128 ('string', '\n'))
4134 ('string', '\n'))
4129 1970-01-12 13:46 +0000
4135 1970-01-12 13:46 +0000
4130
4136
4131 Aliases should be applied only to command arguments and templates in hgrc.
4137 Aliases should be applied only to command arguments and templates in hgrc.
4132 Otherwise, our stock styles and web templates could be corrupted:
4138 Otherwise, our stock styles and web templates could be corrupted:
4133
4139
4134 $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n'
4140 $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n'
4135 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4141 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4136
4142
4137 $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"'
4143 $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"'
4138 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4144 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
4139
4145
4140 $ cat <<EOF > tmpl
4146 $ cat <<EOF > tmpl
4141 > changeset = 'nothing expanded:{rn}\n'
4147 > changeset = 'nothing expanded:{rn}\n'
4142 > EOF
4148 > EOF
4143 $ hg log -r0 --style ./tmpl
4149 $ hg log -r0 --style ./tmpl
4144 nothing expanded:
4150 nothing expanded:
4145
4151
4146 Aliases in formatter:
4152 Aliases in formatter:
4147
4153
4148 $ hg branches -T '{pad(branch, 7)} {rn}\n'
4154 $ hg branches -T '{pad(branch, 7)} {rn}\n'
4149 default 6:d41e714fe50d
4155 default 6:d41e714fe50d
4150 foo 4:bbe44766e73d
4156 foo 4:bbe44766e73d
4151
4157
4152 Aliases should honor HGPLAIN:
4158 Aliases should honor HGPLAIN:
4153
4159
4154 $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n'
4160 $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n'
4155 nothing expanded:
4161 nothing expanded:
4156 $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n'
4162 $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n'
4157 0:1e4e1b8f71e0
4163 0:1e4e1b8f71e0
4158
4164
4159 Unparsable alias:
4165 Unparsable alias:
4160
4166
4161 $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}'
4167 $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}'
4162 (template
4168 (template
4163 ('symbol', 'bad'))
4169 ('symbol', 'bad'))
4164 abort: bad definition of template alias "bad": at 2: not a prefix: end
4170 abort: bad definition of template alias "bad": at 2: not a prefix: end
4165 [255]
4171 [255]
4166 $ hg log --config templatealias.bad='x(' -T '{bad}'
4172 $ hg log --config templatealias.bad='x(' -T '{bad}'
4167 abort: bad definition of template alias "bad": at 2: not a prefix: end
4173 abort: bad definition of template alias "bad": at 2: not a prefix: end
4168 [255]
4174 [255]
4169
4175
4170 $ cd ..
4176 $ cd ..
4171
4177
4172 Set up repository for non-ascii encoding tests:
4178 Set up repository for non-ascii encoding tests:
4173
4179
4174 $ hg init nonascii
4180 $ hg init nonascii
4175 $ cd nonascii
4181 $ cd nonascii
4176 $ python <<EOF
4182 $ python <<EOF
4177 > open('latin1', 'w').write('\xe9')
4183 > open('latin1', 'w').write('\xe9')
4178 > open('utf-8', 'w').write('\xc3\xa9')
4184 > open('utf-8', 'w').write('\xc3\xa9')
4179 > EOF
4185 > EOF
4180 $ HGENCODING=utf-8 hg branch -q `cat utf-8`
4186 $ HGENCODING=utf-8 hg branch -q `cat utf-8`
4181 $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8
4187 $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8
4182
4188
4183 json filter should try round-trip conversion to utf-8:
4189 json filter should try round-trip conversion to utf-8:
4184
4190
4185 $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0
4191 $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0
4186 "\u00e9"
4192 "\u00e9"
4187 $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0
4193 $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0
4188 "non-ascii branch: \u00e9"
4194 "non-ascii branch: \u00e9"
4189
4195
4190 json filter takes input as utf-8b:
4196 json filter takes input as utf-8b:
4191
4197
4192 $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1
4198 $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1
4193 "\u00e9"
4199 "\u00e9"
4194 $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1
4200 $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1
4195 "\udce9"
4201 "\udce9"
4196
4202
4197 utf8 filter:
4203 utf8 filter:
4198
4204
4199 $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0
4205 $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0
4200 round-trip: c3a9
4206 round-trip: c3a9
4201 $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1
4207 $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1
4202 decoded: c3a9
4208 decoded: c3a9
4203 $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1
4209 $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1
4204 abort: decoding near * (glob)
4210 abort: decoding near * (glob)
4205 [255]
4211 [255]
4206 $ hg log -T "invalid type: {rev|utf8}\n" -r0
4212 $ hg log -T "invalid type: {rev|utf8}\n" -r0
4207 abort: template filter 'utf8' is not compatible with keyword 'rev'
4213 abort: template filter 'utf8' is not compatible with keyword 'rev'
4208 [255]
4214 [255]
4209
4215
4210 pad width:
4216 pad width:
4211
4217
4212 $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n"
4218 $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n"
4213 \xc3\xa9- (esc)
4219 \xc3\xa9- (esc)
4214
4220
4215 $ cd ..
4221 $ cd ..
4216
4222
4217 Test that template function in extension is registered as expected
4223 Test that template function in extension is registered as expected
4218
4224
4219 $ cd a
4225 $ cd a
4220
4226
4221 $ cat <<EOF > $TESTTMP/customfunc.py
4227 $ cat <<EOF > $TESTTMP/customfunc.py
4222 > from mercurial import registrar
4228 > from mercurial import registrar
4223 >
4229 >
4224 > templatefunc = registrar.templatefunc()
4230 > templatefunc = registrar.templatefunc()
4225 >
4231 >
4226 > @templatefunc('custom()')
4232 > @templatefunc('custom()')
4227 > def custom(context, mapping, args):
4233 > def custom(context, mapping, args):
4228 > return 'custom'
4234 > return 'custom'
4229 > EOF
4235 > EOF
4230 $ cat <<EOF > .hg/hgrc
4236 $ cat <<EOF > .hg/hgrc
4231 > [extensions]
4237 > [extensions]
4232 > customfunc = $TESTTMP/customfunc.py
4238 > customfunc = $TESTTMP/customfunc.py
4233 > EOF
4239 > EOF
4234
4240
4235 $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true
4241 $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true
4236 custom
4242 custom
4237
4243
4238 $ cd ..
4244 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now