##// END OF EJS Templates
test-command-template: test the phase template more precisely...
Jordi Gutiérrez Hermoso -
r24929:6fb98463 default
parent child Browse files
Show More
@@ -1,2634 +1,2674 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 Second branch starting at nullrev:
32 Second branch starting at nullrev:
33
33
34 $ hg update null
34 $ hg update null
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
36 $ echo second > second
36 $ echo second > second
37 $ hg add second
37 $ hg add second
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
39 created new head
39 created new head
40
40
41 $ echo third > third
41 $ echo third > third
42 $ hg add third
42 $ hg add third
43 $ hg mv second fourth
43 $ hg mv second fourth
44 $ hg commit -m third -d "2020-01-01 10:01"
44 $ hg commit -m third -d "2020-01-01 10:01"
45
45
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
47 fourth (second)
47 fourth (second)
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
49 second -> fourth
49 second -> fourth
50 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
50 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
51 8 t
51 8 t
52 7 f
52 7 f
53
53
54 Quoting for ui.logtemplate
54 Quoting for ui.logtemplate
55
55
56 $ hg tip --config "ui.logtemplate={rev}\n"
56 $ hg tip --config "ui.logtemplate={rev}\n"
57 8
57 8
58 $ hg tip --config "ui.logtemplate='{rev}\n'"
58 $ hg tip --config "ui.logtemplate='{rev}\n'"
59 8
59 8
60 $ hg tip --config 'ui.logtemplate="{rev}\n"'
60 $ hg tip --config 'ui.logtemplate="{rev}\n"'
61 8
61 8
62
62
63 Make sure user/global hgrc does not affect tests
63 Make sure user/global hgrc does not affect tests
64
64
65 $ echo '[ui]' > .hg/hgrc
65 $ echo '[ui]' > .hg/hgrc
66 $ echo 'logtemplate =' >> .hg/hgrc
66 $ echo 'logtemplate =' >> .hg/hgrc
67 $ echo 'style =' >> .hg/hgrc
67 $ echo 'style =' >> .hg/hgrc
68
68
69 Add some simple styles to settings
69 Add some simple styles to settings
70
70
71 $ echo '[templates]' >> .hg/hgrc
71 $ echo '[templates]' >> .hg/hgrc
72 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
72 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
73 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
73 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
74
74
75 $ hg log -l1 -Tsimple
75 $ hg log -l1 -Tsimple
76 8
76 8
77 $ hg log -l1 -Tsimple2
77 $ hg log -l1 -Tsimple2
78 8
78 8
79
79
80 Test templates and style maps in files:
80 Test templates and style maps in files:
81
81
82 $ echo "{rev}" > tmpl
82 $ echo "{rev}" > tmpl
83 $ hg log -l1 -T./tmpl
83 $ hg log -l1 -T./tmpl
84 8
84 8
85 $ hg log -l1 -Tblah/blah
85 $ hg log -l1 -Tblah/blah
86 blah/blah (no-eol)
86 blah/blah (no-eol)
87
87
88 $ printf 'changeset = "{rev}\\n"\n' > map-simple
88 $ printf 'changeset = "{rev}\\n"\n' > map-simple
89 $ hg log -l1 -T./map-simple
89 $ hg log -l1 -T./map-simple
90 8
90 8
91
91
92 Template should precede style option
92 Template should precede style option
93
93
94 $ hg log -l1 --style default -T '{rev}\n'
94 $ hg log -l1 --style default -T '{rev}\n'
95 8
95 8
96
96
97 Add a commit with empty description, to ensure that the templates
97 Add a commit with empty description, to ensure that the templates
98 following below omit it properly.
98 following below omit it properly.
99
99
100 $ echo c >> c
100 $ echo c >> c
101 $ hg add c
101 $ hg add c
102 $ hg commit -qm ' '
102 $ hg commit -qm ' '
103
103
104 Default style is like normal output. Phases style should be the same
104 Default style is like normal output. Phases style should be the same
105 as default style, except for extra phase lines.
105 as default style, except for extra phase lines.
106
106
107 $ hg log > log.out
107 $ hg log > log.out
108 $ hg log --style default > style.out
108 $ hg log --style default > style.out
109 $ cmp log.out style.out || diff -u log.out style.out
109 $ cmp log.out style.out || diff -u log.out style.out
110 $ hg log -T phases > phases.out
110 $ hg log -T phases > phases.out
111 $ diff -u log.out phases.out | grep "phase:"
111 $ diff -U 0 log.out phases.out | grep -v '^---\|^+++'
112 @@ -2,0 +3 @@
112 +phase: draft
113 +phase: draft
114 @@ -6,0 +8 @@
113 +phase: draft
115 +phase: draft
116 @@ -11,0 +14 @@
114 +phase: draft
117 +phase: draft
118 @@ -17,0 +21 @@
115 +phase: draft
119 +phase: draft
120 @@ -24,0 +29 @@
116 +phase: draft
121 +phase: draft
122 @@ -31,0 +37 @@
117 +phase: draft
123 +phase: draft
124 @@ -36,0 +43 @@
118 +phase: draft
125 +phase: draft
126 @@ -41,0 +49 @@
119 +phase: draft
127 +phase: draft
128 @@ -46,0 +55 @@
120 +phase: draft
129 +phase: draft
130 @@ -51,0 +61 @@
121 +phase: draft
131 +phase: draft
122
132
123 $ hg log -v > log.out
133 $ hg log -v > log.out
124 $ hg log -v --style default > style.out
134 $ hg log -v --style default > style.out
125 $ cmp log.out style.out || diff -u log.out style.out
135 $ cmp log.out style.out || diff -u log.out style.out
126 $ hg log -v -T phases > phases.out
136 $ hg log -v -T phases > phases.out
127 $ diff -u log.out phases.out | grep phase:
137 $ diff -U 0 log.out phases.out | grep -v '^---\|^+++'
138 @@ -2,0 +3 @@
128 +phase: draft
139 +phase: draft
140 @@ -7,0 +9 @@
129 +phase: draft
141 +phase: draft
142 @@ -15,0 +18 @@
130 +phase: draft
143 +phase: draft
144 @@ -24,0 +28 @@
131 +phase: draft
145 +phase: draft
146 @@ -33,0 +38 @@
132 +phase: draft
147 +phase: draft
148 @@ -43,0 +49 @@
133 +phase: draft
149 +phase: draft
150 @@ -50,0 +57 @@
134 +phase: draft
151 +phase: draft
152 @@ -58,0 +66 @@
135 +phase: draft
153 +phase: draft
154 @@ -66,0 +75 @@
136 +phase: draft
155 +phase: draft
156 @@ -77,0 +87 @@
137 +phase: draft
157 +phase: draft
138
158
139 $ hg log -q > log.out
159 $ hg log -q > log.out
140 $ hg log -q --style default > style.out
160 $ hg log -q --style default > style.out
141 $ cmp log.out style.out || diff -u log.out style.out
161 $ cmp log.out style.out || diff -u log.out style.out
142 $ hg log -q -T phases > phases.out
162 $ hg log -q -T phases > phases.out
143 $ cmp log.out phases.out || diff -u log.out phases.out
163 $ cmp log.out phases.out || diff -u log.out phases.out
144
164
145 $ hg log --debug > log.out
165 $ hg log --debug > log.out
146 $ hg log --debug --style default > style.out
166 $ hg log --debug --style default > style.out
147 $ cmp log.out style.out || diff -u log.out style.out
167 $ cmp log.out style.out || diff -u log.out style.out
148 $ hg log --debug -T phases > phases.out
168 $ hg log --debug -T phases > phases.out
149 $ cmp log.out phases.out || diff -u log.out phases.out
169 $ cmp log.out phases.out || diff -u log.out phases.out
150
170
151 Default style should also preserve color information (issue2866):
171 Default style should also preserve color information (issue2866):
152
172
153 $ cp $HGRCPATH $HGRCPATH-bak
173 $ cp $HGRCPATH $HGRCPATH-bak
154 $ cat <<EOF >> $HGRCPATH
174 $ cat <<EOF >> $HGRCPATH
155 > [extensions]
175 > [extensions]
156 > color=
176 > color=
157 > EOF
177 > EOF
158
178
159 $ hg --color=debug log > log.out
179 $ hg --color=debug log > log.out
160 $ hg --color=debug log --style default > style.out
180 $ hg --color=debug log --style default > style.out
161 $ cmp log.out style.out || diff -u log.out style.out
181 $ cmp log.out style.out || diff -u log.out style.out
162 $ hg --color=debug log -T phases > phases.out
182 $ hg --color=debug log -T phases > phases.out
163 $ diff -u log.out phases.out | grep phase:
183 $ diff -U 0 log.out phases.out | grep -v '^---\|^+++'
184 @@ -2,0 +3 @@
164 +[log.phase|phase: draft]
185 +[log.phase|phase: draft]
186 @@ -6,0 +8 @@
165 +[log.phase|phase: draft]
187 +[log.phase|phase: draft]
188 @@ -11,0 +14 @@
166 +[log.phase|phase: draft]
189 +[log.phase|phase: draft]
190 @@ -17,0 +21 @@
167 +[log.phase|phase: draft]
191 +[log.phase|phase: draft]
192 @@ -24,0 +29 @@
168 +[log.phase|phase: draft]
193 +[log.phase|phase: draft]
194 @@ -31,0 +37 @@
169 +[log.phase|phase: draft]
195 +[log.phase|phase: draft]
196 @@ -36,0 +43 @@
170 +[log.phase|phase: draft]
197 +[log.phase|phase: draft]
198 @@ -41,0 +49 @@
171 +[log.phase|phase: draft]
199 +[log.phase|phase: draft]
200 @@ -46,0 +55 @@
172 +[log.phase|phase: draft]
201 +[log.phase|phase: draft]
202 @@ -51,0 +61 @@
173 +[log.phase|phase: draft]
203 +[log.phase|phase: draft]
174
204
175 $ hg --color=debug -v log > log.out
205 $ hg --color=debug -v log > log.out
176 $ hg --color=debug -v log --style default > style.out
206 $ hg --color=debug -v log --style default > style.out
177 $ cmp log.out style.out || diff -u log.out style.out
207 $ cmp log.out style.out || diff -u log.out style.out
178 $ hg --color=debug -v log -T phases > phases.out
208 $ hg --color=debug -v log -T phases > phases.out
179 $ diff -u log.out phases.out | grep phase:
209 $ diff -U 0 log.out phases.out | grep -v '^---\|^+++'
210 @@ -2,0 +3 @@
180 +[log.phase|phase: draft]
211 +[log.phase|phase: draft]
212 @@ -7,0 +9 @@
181 +[log.phase|phase: draft]
213 +[log.phase|phase: draft]
214 @@ -15,0 +18 @@
182 +[log.phase|phase: draft]
215 +[log.phase|phase: draft]
216 @@ -24,0 +28 @@
183 +[log.phase|phase: draft]
217 +[log.phase|phase: draft]
218 @@ -33,0 +38 @@
184 +[log.phase|phase: draft]
219 +[log.phase|phase: draft]
220 @@ -43,0 +49 @@
185 +[log.phase|phase: draft]
221 +[log.phase|phase: draft]
222 @@ -50,0 +57 @@
186 +[log.phase|phase: draft]
223 +[log.phase|phase: draft]
224 @@ -58,0 +66 @@
187 +[log.phase|phase: draft]
225 +[log.phase|phase: draft]
226 @@ -66,0 +75 @@
188 +[log.phase|phase: draft]
227 +[log.phase|phase: draft]
228 @@ -77,0 +87 @@
189 +[log.phase|phase: draft]
229 +[log.phase|phase: draft]
190
230
191 $ hg --color=debug -q log > log.out
231 $ hg --color=debug -q log > log.out
192 $ hg --color=debug -q log --style default > style.out
232 $ hg --color=debug -q log --style default > style.out
193 $ cmp log.out style.out || diff -u log.out style.out
233 $ cmp log.out style.out || diff -u log.out style.out
194 $ hg --color=debug -q log -T phases > phases.out
234 $ hg --color=debug -q log -T phases > phases.out
195 $ cmp log.out phases.out || diff -u log.out phases.out
235 $ cmp log.out phases.out || diff -u log.out phases.out
196
236
197 $ hg --color=debug --debug log > log.out
237 $ hg --color=debug --debug log > log.out
198 $ hg --color=debug --debug log --style default > style.out
238 $ hg --color=debug --debug log --style default > style.out
199 $ cmp log.out style.out || diff -u log.out style.out
239 $ cmp log.out style.out || diff -u log.out style.out
200 $ hg --color=debug --debug log -T phases > phases.out
240 $ hg --color=debug --debug log -T phases > phases.out
201 $ cmp log.out phases.out || diff -u log.out phases.out
241 $ cmp log.out phases.out || diff -u log.out phases.out
202
242
203 $ mv $HGRCPATH-bak $HGRCPATH
243 $ mv $HGRCPATH-bak $HGRCPATH
204
244
205 Remove commit with empty commit message, so as to not pollute further
245 Remove commit with empty commit message, so as to not pollute further
206 tests.
246 tests.
207
247
208 $ hg --config extensions.strip= strip -q .
248 $ hg --config extensions.strip= strip -q .
209
249
210 Revision with no copies (used to print a traceback):
250 Revision with no copies (used to print a traceback):
211
251
212 $ hg tip -v --template '\n'
252 $ hg tip -v --template '\n'
213
253
214
254
215 Compact style works:
255 Compact style works:
216
256
217 $ hg log -Tcompact
257 $ hg log -Tcompact
218 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
258 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
219 third
259 third
220
260
221 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
261 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
222 second
262 second
223
263
224 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
264 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
225 merge
265 merge
226
266
227 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
267 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
228 new head
268 new head
229
269
230 4 bbe44766e73d 1970-01-17 04:53 +0000 person
270 4 bbe44766e73d 1970-01-17 04:53 +0000 person
231 new branch
271 new branch
232
272
233 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
273 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
234 no user, no domain
274 no user, no domain
235
275
236 2 97054abb4ab8 1970-01-14 21:20 +0000 other
276 2 97054abb4ab8 1970-01-14 21:20 +0000 other
237 no person
277 no person
238
278
239 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
279 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
240 other 1
280 other 1
241
281
242 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
282 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
243 line 1
283 line 1
244
284
245
285
246 $ hg log -v --style compact
286 $ hg log -v --style compact
247 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
287 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
248 third
288 third
249
289
250 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
290 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
251 second
291 second
252
292
253 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
293 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
254 merge
294 merge
255
295
256 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
296 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
257 new head
297 new head
258
298
259 4 bbe44766e73d 1970-01-17 04:53 +0000 person
299 4 bbe44766e73d 1970-01-17 04:53 +0000 person
260 new branch
300 new branch
261
301
262 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
302 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
263 no user, no domain
303 no user, no domain
264
304
265 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
305 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
266 no person
306 no person
267
307
268 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
308 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
269 other 1
309 other 1
270 other 2
310 other 2
271
311
272 other 3
312 other 3
273
313
274 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
314 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
275 line 1
315 line 1
276 line 2
316 line 2
277
317
278
318
279 $ hg log --debug --style compact
319 $ hg log --debug --style compact
280 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
320 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
281 third
321 third
282
322
283 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
323 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
284 second
324 second
285
325
286 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
326 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
287 merge
327 merge
288
328
289 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
329 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
290 new head
330 new head
291
331
292 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
332 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
293 new branch
333 new branch
294
334
295 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
335 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
296 no user, no domain
336 no user, no domain
297
337
298 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
338 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
299 no person
339 no person
300
340
301 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
341 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
302 other 1
342 other 1
303 other 2
343 other 2
304
344
305 other 3
345 other 3
306
346
307 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
347 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
308 line 1
348 line 1
309 line 2
349 line 2
310
350
311
351
312 Test xml styles:
352 Test xml styles:
313
353
314 $ hg log --style xml
354 $ hg log --style xml
315 <?xml version="1.0"?>
355 <?xml version="1.0"?>
316 <log>
356 <log>
317 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
357 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
318 <tag>tip</tag>
358 <tag>tip</tag>
319 <author email="test">test</author>
359 <author email="test">test</author>
320 <date>2020-01-01T10:01:00+00:00</date>
360 <date>2020-01-01T10:01:00+00:00</date>
321 <msg xml:space="preserve">third</msg>
361 <msg xml:space="preserve">third</msg>
322 </logentry>
362 </logentry>
323 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
363 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
324 <parent revision="-1" node="0000000000000000000000000000000000000000" />
364 <parent revision="-1" node="0000000000000000000000000000000000000000" />
325 <author email="user@hostname">User Name</author>
365 <author email="user@hostname">User Name</author>
326 <date>1970-01-12T13:46:40+00:00</date>
366 <date>1970-01-12T13:46:40+00:00</date>
327 <msg xml:space="preserve">second</msg>
367 <msg xml:space="preserve">second</msg>
328 </logentry>
368 </logentry>
329 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
369 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
330 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
370 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
331 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
371 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
332 <author email="person">person</author>
372 <author email="person">person</author>
333 <date>1970-01-18T08:40:01+00:00</date>
373 <date>1970-01-18T08:40:01+00:00</date>
334 <msg xml:space="preserve">merge</msg>
374 <msg xml:space="preserve">merge</msg>
335 </logentry>
375 </logentry>
336 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
376 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
337 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
377 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
338 <author email="person">person</author>
378 <author email="person">person</author>
339 <date>1970-01-18T08:40:00+00:00</date>
379 <date>1970-01-18T08:40:00+00:00</date>
340 <msg xml:space="preserve">new head</msg>
380 <msg xml:space="preserve">new head</msg>
341 </logentry>
381 </logentry>
342 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
382 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
343 <branch>foo</branch>
383 <branch>foo</branch>
344 <author email="person">person</author>
384 <author email="person">person</author>
345 <date>1970-01-17T04:53:20+00:00</date>
385 <date>1970-01-17T04:53:20+00:00</date>
346 <msg xml:space="preserve">new branch</msg>
386 <msg xml:space="preserve">new branch</msg>
347 </logentry>
387 </logentry>
348 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
388 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
349 <author email="person">person</author>
389 <author email="person">person</author>
350 <date>1970-01-16T01:06:40+00:00</date>
390 <date>1970-01-16T01:06:40+00:00</date>
351 <msg xml:space="preserve">no user, no domain</msg>
391 <msg xml:space="preserve">no user, no domain</msg>
352 </logentry>
392 </logentry>
353 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
393 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
354 <author email="other@place">other</author>
394 <author email="other@place">other</author>
355 <date>1970-01-14T21:20:00+00:00</date>
395 <date>1970-01-14T21:20:00+00:00</date>
356 <msg xml:space="preserve">no person</msg>
396 <msg xml:space="preserve">no person</msg>
357 </logentry>
397 </logentry>
358 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
398 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
359 <author email="other@place">A. N. Other</author>
399 <author email="other@place">A. N. Other</author>
360 <date>1970-01-13T17:33:20+00:00</date>
400 <date>1970-01-13T17:33:20+00:00</date>
361 <msg xml:space="preserve">other 1
401 <msg xml:space="preserve">other 1
362 other 2
402 other 2
363
403
364 other 3</msg>
404 other 3</msg>
365 </logentry>
405 </logentry>
366 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
406 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
367 <author email="user@hostname">User Name</author>
407 <author email="user@hostname">User Name</author>
368 <date>1970-01-12T13:46:40+00:00</date>
408 <date>1970-01-12T13:46:40+00:00</date>
369 <msg xml:space="preserve">line 1
409 <msg xml:space="preserve">line 1
370 line 2</msg>
410 line 2</msg>
371 </logentry>
411 </logentry>
372 </log>
412 </log>
373
413
374 $ hg log -v --style xml
414 $ hg log -v --style xml
375 <?xml version="1.0"?>
415 <?xml version="1.0"?>
376 <log>
416 <log>
377 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
417 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
378 <tag>tip</tag>
418 <tag>tip</tag>
379 <author email="test">test</author>
419 <author email="test">test</author>
380 <date>2020-01-01T10:01:00+00:00</date>
420 <date>2020-01-01T10:01:00+00:00</date>
381 <msg xml:space="preserve">third</msg>
421 <msg xml:space="preserve">third</msg>
382 <paths>
422 <paths>
383 <path action="A">fourth</path>
423 <path action="A">fourth</path>
384 <path action="A">third</path>
424 <path action="A">third</path>
385 <path action="R">second</path>
425 <path action="R">second</path>
386 </paths>
426 </paths>
387 <copies>
427 <copies>
388 <copy source="second">fourth</copy>
428 <copy source="second">fourth</copy>
389 </copies>
429 </copies>
390 </logentry>
430 </logentry>
391 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
431 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
392 <parent revision="-1" node="0000000000000000000000000000000000000000" />
432 <parent revision="-1" node="0000000000000000000000000000000000000000" />
393 <author email="user@hostname">User Name</author>
433 <author email="user@hostname">User Name</author>
394 <date>1970-01-12T13:46:40+00:00</date>
434 <date>1970-01-12T13:46:40+00:00</date>
395 <msg xml:space="preserve">second</msg>
435 <msg xml:space="preserve">second</msg>
396 <paths>
436 <paths>
397 <path action="A">second</path>
437 <path action="A">second</path>
398 </paths>
438 </paths>
399 </logentry>
439 </logentry>
400 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
440 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
401 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
441 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
402 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
442 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
403 <author email="person">person</author>
443 <author email="person">person</author>
404 <date>1970-01-18T08:40:01+00:00</date>
444 <date>1970-01-18T08:40:01+00:00</date>
405 <msg xml:space="preserve">merge</msg>
445 <msg xml:space="preserve">merge</msg>
406 <paths>
446 <paths>
407 </paths>
447 </paths>
408 </logentry>
448 </logentry>
409 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
449 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
410 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
450 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
411 <author email="person">person</author>
451 <author email="person">person</author>
412 <date>1970-01-18T08:40:00+00:00</date>
452 <date>1970-01-18T08:40:00+00:00</date>
413 <msg xml:space="preserve">new head</msg>
453 <msg xml:space="preserve">new head</msg>
414 <paths>
454 <paths>
415 <path action="A">d</path>
455 <path action="A">d</path>
416 </paths>
456 </paths>
417 </logentry>
457 </logentry>
418 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
458 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
419 <branch>foo</branch>
459 <branch>foo</branch>
420 <author email="person">person</author>
460 <author email="person">person</author>
421 <date>1970-01-17T04:53:20+00:00</date>
461 <date>1970-01-17T04:53:20+00:00</date>
422 <msg xml:space="preserve">new branch</msg>
462 <msg xml:space="preserve">new branch</msg>
423 <paths>
463 <paths>
424 </paths>
464 </paths>
425 </logentry>
465 </logentry>
426 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
466 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
427 <author email="person">person</author>
467 <author email="person">person</author>
428 <date>1970-01-16T01:06:40+00:00</date>
468 <date>1970-01-16T01:06:40+00:00</date>
429 <msg xml:space="preserve">no user, no domain</msg>
469 <msg xml:space="preserve">no user, no domain</msg>
430 <paths>
470 <paths>
431 <path action="M">c</path>
471 <path action="M">c</path>
432 </paths>
472 </paths>
433 </logentry>
473 </logentry>
434 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
474 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
435 <author email="other@place">other</author>
475 <author email="other@place">other</author>
436 <date>1970-01-14T21:20:00+00:00</date>
476 <date>1970-01-14T21:20:00+00:00</date>
437 <msg xml:space="preserve">no person</msg>
477 <msg xml:space="preserve">no person</msg>
438 <paths>
478 <paths>
439 <path action="A">c</path>
479 <path action="A">c</path>
440 </paths>
480 </paths>
441 </logentry>
481 </logentry>
442 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
482 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
443 <author email="other@place">A. N. Other</author>
483 <author email="other@place">A. N. Other</author>
444 <date>1970-01-13T17:33:20+00:00</date>
484 <date>1970-01-13T17:33:20+00:00</date>
445 <msg xml:space="preserve">other 1
485 <msg xml:space="preserve">other 1
446 other 2
486 other 2
447
487
448 other 3</msg>
488 other 3</msg>
449 <paths>
489 <paths>
450 <path action="A">b</path>
490 <path action="A">b</path>
451 </paths>
491 </paths>
452 </logentry>
492 </logentry>
453 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
493 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
454 <author email="user@hostname">User Name</author>
494 <author email="user@hostname">User Name</author>
455 <date>1970-01-12T13:46:40+00:00</date>
495 <date>1970-01-12T13:46:40+00:00</date>
456 <msg xml:space="preserve">line 1
496 <msg xml:space="preserve">line 1
457 line 2</msg>
497 line 2</msg>
458 <paths>
498 <paths>
459 <path action="A">a</path>
499 <path action="A">a</path>
460 </paths>
500 </paths>
461 </logentry>
501 </logentry>
462 </log>
502 </log>
463
503
464 $ hg log --debug --style xml
504 $ hg log --debug --style xml
465 <?xml version="1.0"?>
505 <?xml version="1.0"?>
466 <log>
506 <log>
467 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
507 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
468 <tag>tip</tag>
508 <tag>tip</tag>
469 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
509 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
470 <parent revision="-1" node="0000000000000000000000000000000000000000" />
510 <parent revision="-1" node="0000000000000000000000000000000000000000" />
471 <author email="test">test</author>
511 <author email="test">test</author>
472 <date>2020-01-01T10:01:00+00:00</date>
512 <date>2020-01-01T10:01:00+00:00</date>
473 <msg xml:space="preserve">third</msg>
513 <msg xml:space="preserve">third</msg>
474 <paths>
514 <paths>
475 <path action="A">fourth</path>
515 <path action="A">fourth</path>
476 <path action="A">third</path>
516 <path action="A">third</path>
477 <path action="R">second</path>
517 <path action="R">second</path>
478 </paths>
518 </paths>
479 <copies>
519 <copies>
480 <copy source="second">fourth</copy>
520 <copy source="second">fourth</copy>
481 </copies>
521 </copies>
482 <extra key="branch">default</extra>
522 <extra key="branch">default</extra>
483 </logentry>
523 </logentry>
484 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
524 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
485 <parent revision="-1" node="0000000000000000000000000000000000000000" />
525 <parent revision="-1" node="0000000000000000000000000000000000000000" />
486 <parent revision="-1" node="0000000000000000000000000000000000000000" />
526 <parent revision="-1" node="0000000000000000000000000000000000000000" />
487 <author email="user@hostname">User Name</author>
527 <author email="user@hostname">User Name</author>
488 <date>1970-01-12T13:46:40+00:00</date>
528 <date>1970-01-12T13:46:40+00:00</date>
489 <msg xml:space="preserve">second</msg>
529 <msg xml:space="preserve">second</msg>
490 <paths>
530 <paths>
491 <path action="A">second</path>
531 <path action="A">second</path>
492 </paths>
532 </paths>
493 <extra key="branch">default</extra>
533 <extra key="branch">default</extra>
494 </logentry>
534 </logentry>
495 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
535 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
496 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
536 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
497 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
537 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
498 <author email="person">person</author>
538 <author email="person">person</author>
499 <date>1970-01-18T08:40:01+00:00</date>
539 <date>1970-01-18T08:40:01+00:00</date>
500 <msg xml:space="preserve">merge</msg>
540 <msg xml:space="preserve">merge</msg>
501 <paths>
541 <paths>
502 </paths>
542 </paths>
503 <extra key="branch">default</extra>
543 <extra key="branch">default</extra>
504 </logentry>
544 </logentry>
505 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
545 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
506 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
546 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
507 <parent revision="-1" node="0000000000000000000000000000000000000000" />
547 <parent revision="-1" node="0000000000000000000000000000000000000000" />
508 <author email="person">person</author>
548 <author email="person">person</author>
509 <date>1970-01-18T08:40:00+00:00</date>
549 <date>1970-01-18T08:40:00+00:00</date>
510 <msg xml:space="preserve">new head</msg>
550 <msg xml:space="preserve">new head</msg>
511 <paths>
551 <paths>
512 <path action="A">d</path>
552 <path action="A">d</path>
513 </paths>
553 </paths>
514 <extra key="branch">default</extra>
554 <extra key="branch">default</extra>
515 </logentry>
555 </logentry>
516 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
556 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
517 <branch>foo</branch>
557 <branch>foo</branch>
518 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
558 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
519 <parent revision="-1" node="0000000000000000000000000000000000000000" />
559 <parent revision="-1" node="0000000000000000000000000000000000000000" />
520 <author email="person">person</author>
560 <author email="person">person</author>
521 <date>1970-01-17T04:53:20+00:00</date>
561 <date>1970-01-17T04:53:20+00:00</date>
522 <msg xml:space="preserve">new branch</msg>
562 <msg xml:space="preserve">new branch</msg>
523 <paths>
563 <paths>
524 </paths>
564 </paths>
525 <extra key="branch">foo</extra>
565 <extra key="branch">foo</extra>
526 </logentry>
566 </logentry>
527 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
567 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
528 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
568 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
529 <parent revision="-1" node="0000000000000000000000000000000000000000" />
569 <parent revision="-1" node="0000000000000000000000000000000000000000" />
530 <author email="person">person</author>
570 <author email="person">person</author>
531 <date>1970-01-16T01:06:40+00:00</date>
571 <date>1970-01-16T01:06:40+00:00</date>
532 <msg xml:space="preserve">no user, no domain</msg>
572 <msg xml:space="preserve">no user, no domain</msg>
533 <paths>
573 <paths>
534 <path action="M">c</path>
574 <path action="M">c</path>
535 </paths>
575 </paths>
536 <extra key="branch">default</extra>
576 <extra key="branch">default</extra>
537 </logentry>
577 </logentry>
538 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
578 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
539 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
579 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
540 <parent revision="-1" node="0000000000000000000000000000000000000000" />
580 <parent revision="-1" node="0000000000000000000000000000000000000000" />
541 <author email="other@place">other</author>
581 <author email="other@place">other</author>
542 <date>1970-01-14T21:20:00+00:00</date>
582 <date>1970-01-14T21:20:00+00:00</date>
543 <msg xml:space="preserve">no person</msg>
583 <msg xml:space="preserve">no person</msg>
544 <paths>
584 <paths>
545 <path action="A">c</path>
585 <path action="A">c</path>
546 </paths>
586 </paths>
547 <extra key="branch">default</extra>
587 <extra key="branch">default</extra>
548 </logentry>
588 </logentry>
549 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
589 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
550 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
590 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
551 <parent revision="-1" node="0000000000000000000000000000000000000000" />
591 <parent revision="-1" node="0000000000000000000000000000000000000000" />
552 <author email="other@place">A. N. Other</author>
592 <author email="other@place">A. N. Other</author>
553 <date>1970-01-13T17:33:20+00:00</date>
593 <date>1970-01-13T17:33:20+00:00</date>
554 <msg xml:space="preserve">other 1
594 <msg xml:space="preserve">other 1
555 other 2
595 other 2
556
596
557 other 3</msg>
597 other 3</msg>
558 <paths>
598 <paths>
559 <path action="A">b</path>
599 <path action="A">b</path>
560 </paths>
600 </paths>
561 <extra key="branch">default</extra>
601 <extra key="branch">default</extra>
562 </logentry>
602 </logentry>
563 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
603 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
564 <parent revision="-1" node="0000000000000000000000000000000000000000" />
604 <parent revision="-1" node="0000000000000000000000000000000000000000" />
565 <parent revision="-1" node="0000000000000000000000000000000000000000" />
605 <parent revision="-1" node="0000000000000000000000000000000000000000" />
566 <author email="user@hostname">User Name</author>
606 <author email="user@hostname">User Name</author>
567 <date>1970-01-12T13:46:40+00:00</date>
607 <date>1970-01-12T13:46:40+00:00</date>
568 <msg xml:space="preserve">line 1
608 <msg xml:space="preserve">line 1
569 line 2</msg>
609 line 2</msg>
570 <paths>
610 <paths>
571 <path action="A">a</path>
611 <path action="A">a</path>
572 </paths>
612 </paths>
573 <extra key="branch">default</extra>
613 <extra key="branch">default</extra>
574 </logentry>
614 </logentry>
575 </log>
615 </log>
576
616
577
617
578 Test JSON style:
618 Test JSON style:
579
619
580 $ hg log -k nosuch -Tjson
620 $ hg log -k nosuch -Tjson
581 []
621 []
582
622
583 $ hg log -qr . -Tjson
623 $ hg log -qr . -Tjson
584 [
624 [
585 {
625 {
586 "rev": 8,
626 "rev": 8,
587 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
627 "node": "95c24699272ef57d062b8bccc32c878bf841784a"
588 }
628 }
589 ]
629 ]
590
630
591 $ hg log -vpr . -Tjson --stat
631 $ hg log -vpr . -Tjson --stat
592 [
632 [
593 {
633 {
594 "rev": 8,
634 "rev": 8,
595 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
635 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
596 "branch": "default",
636 "branch": "default",
597 "phase": "draft",
637 "phase": "draft",
598 "user": "test",
638 "user": "test",
599 "date": [1577872860, 0],
639 "date": [1577872860, 0],
600 "desc": "third",
640 "desc": "third",
601 "bookmarks": [],
641 "bookmarks": [],
602 "tags": ["tip"],
642 "tags": ["tip"],
603 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
643 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
604 "files": ["fourth", "second", "third"],
644 "files": ["fourth", "second", "third"],
605 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
645 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
606 "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"
646 "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"
607 }
647 }
608 ]
648 ]
609
649
610 honor --git but not format-breaking diffopts
650 honor --git but not format-breaking diffopts
611 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
651 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
612 [
652 [
613 {
653 {
614 "rev": 8,
654 "rev": 8,
615 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
655 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
616 "branch": "default",
656 "branch": "default",
617 "phase": "draft",
657 "phase": "draft",
618 "user": "test",
658 "user": "test",
619 "date": [1577872860, 0],
659 "date": [1577872860, 0],
620 "desc": "third",
660 "desc": "third",
621 "bookmarks": [],
661 "bookmarks": [],
622 "tags": ["tip"],
662 "tags": ["tip"],
623 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
663 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
624 "files": ["fourth", "second", "third"],
664 "files": ["fourth", "second", "third"],
625 "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"
665 "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"
626 }
666 }
627 ]
667 ]
628
668
629 $ hg log -T json
669 $ hg log -T json
630 [
670 [
631 {
671 {
632 "rev": 8,
672 "rev": 8,
633 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
673 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
634 "branch": "default",
674 "branch": "default",
635 "phase": "draft",
675 "phase": "draft",
636 "user": "test",
676 "user": "test",
637 "date": [1577872860, 0],
677 "date": [1577872860, 0],
638 "desc": "third",
678 "desc": "third",
639 "bookmarks": [],
679 "bookmarks": [],
640 "tags": ["tip"],
680 "tags": ["tip"],
641 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
681 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"]
642 },
682 },
643 {
683 {
644 "rev": 7,
684 "rev": 7,
645 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
685 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
646 "branch": "default",
686 "branch": "default",
647 "phase": "draft",
687 "phase": "draft",
648 "user": "User Name <user@hostname>",
688 "user": "User Name <user@hostname>",
649 "date": [1000000, 0],
689 "date": [1000000, 0],
650 "desc": "second",
690 "desc": "second",
651 "bookmarks": [],
691 "bookmarks": [],
652 "tags": [],
692 "tags": [],
653 "parents": ["0000000000000000000000000000000000000000"]
693 "parents": ["0000000000000000000000000000000000000000"]
654 },
694 },
655 {
695 {
656 "rev": 6,
696 "rev": 6,
657 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
697 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
658 "branch": "default",
698 "branch": "default",
659 "phase": "draft",
699 "phase": "draft",
660 "user": "person",
700 "user": "person",
661 "date": [1500001, 0],
701 "date": [1500001, 0],
662 "desc": "merge",
702 "desc": "merge",
663 "bookmarks": [],
703 "bookmarks": [],
664 "tags": [],
704 "tags": [],
665 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
705 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"]
666 },
706 },
667 {
707 {
668 "rev": 5,
708 "rev": 5,
669 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
709 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
670 "branch": "default",
710 "branch": "default",
671 "phase": "draft",
711 "phase": "draft",
672 "user": "person",
712 "user": "person",
673 "date": [1500000, 0],
713 "date": [1500000, 0],
674 "desc": "new head",
714 "desc": "new head",
675 "bookmarks": [],
715 "bookmarks": [],
676 "tags": [],
716 "tags": [],
677 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
717 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
678 },
718 },
679 {
719 {
680 "rev": 4,
720 "rev": 4,
681 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
721 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
682 "branch": "foo",
722 "branch": "foo",
683 "phase": "draft",
723 "phase": "draft",
684 "user": "person",
724 "user": "person",
685 "date": [1400000, 0],
725 "date": [1400000, 0],
686 "desc": "new branch",
726 "desc": "new branch",
687 "bookmarks": [],
727 "bookmarks": [],
688 "tags": [],
728 "tags": [],
689 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
729 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"]
690 },
730 },
691 {
731 {
692 "rev": 3,
732 "rev": 3,
693 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
733 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
694 "branch": "default",
734 "branch": "default",
695 "phase": "draft",
735 "phase": "draft",
696 "user": "person",
736 "user": "person",
697 "date": [1300000, 0],
737 "date": [1300000, 0],
698 "desc": "no user, no domain",
738 "desc": "no user, no domain",
699 "bookmarks": [],
739 "bookmarks": [],
700 "tags": [],
740 "tags": [],
701 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
741 "parents": ["97054abb4ab824450e9164180baf491ae0078465"]
702 },
742 },
703 {
743 {
704 "rev": 2,
744 "rev": 2,
705 "node": "97054abb4ab824450e9164180baf491ae0078465",
745 "node": "97054abb4ab824450e9164180baf491ae0078465",
706 "branch": "default",
746 "branch": "default",
707 "phase": "draft",
747 "phase": "draft",
708 "user": "other@place",
748 "user": "other@place",
709 "date": [1200000, 0],
749 "date": [1200000, 0],
710 "desc": "no person",
750 "desc": "no person",
711 "bookmarks": [],
751 "bookmarks": [],
712 "tags": [],
752 "tags": [],
713 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
753 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"]
714 },
754 },
715 {
755 {
716 "rev": 1,
756 "rev": 1,
717 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
757 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
718 "branch": "default",
758 "branch": "default",
719 "phase": "draft",
759 "phase": "draft",
720 "user": "A. N. Other <other@place>",
760 "user": "A. N. Other <other@place>",
721 "date": [1100000, 0],
761 "date": [1100000, 0],
722 "desc": "other 1\nother 2\n\nother 3",
762 "desc": "other 1\nother 2\n\nother 3",
723 "bookmarks": [],
763 "bookmarks": [],
724 "tags": [],
764 "tags": [],
725 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
765 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"]
726 },
766 },
727 {
767 {
728 "rev": 0,
768 "rev": 0,
729 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
769 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
730 "branch": "default",
770 "branch": "default",
731 "phase": "draft",
771 "phase": "draft",
732 "user": "User Name <user@hostname>",
772 "user": "User Name <user@hostname>",
733 "date": [1000000, 0],
773 "date": [1000000, 0],
734 "desc": "line 1\nline 2",
774 "desc": "line 1\nline 2",
735 "bookmarks": [],
775 "bookmarks": [],
736 "tags": [],
776 "tags": [],
737 "parents": ["0000000000000000000000000000000000000000"]
777 "parents": ["0000000000000000000000000000000000000000"]
738 }
778 }
739 ]
779 ]
740
780
741 $ hg heads -v -Tjson
781 $ hg heads -v -Tjson
742 [
782 [
743 {
783 {
744 "rev": 8,
784 "rev": 8,
745 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
785 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
746 "branch": "default",
786 "branch": "default",
747 "phase": "draft",
787 "phase": "draft",
748 "user": "test",
788 "user": "test",
749 "date": [1577872860, 0],
789 "date": [1577872860, 0],
750 "desc": "third",
790 "desc": "third",
751 "bookmarks": [],
791 "bookmarks": [],
752 "tags": ["tip"],
792 "tags": ["tip"],
753 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
793 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
754 "files": ["fourth", "second", "third"]
794 "files": ["fourth", "second", "third"]
755 },
795 },
756 {
796 {
757 "rev": 6,
797 "rev": 6,
758 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
798 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
759 "branch": "default",
799 "branch": "default",
760 "phase": "draft",
800 "phase": "draft",
761 "user": "person",
801 "user": "person",
762 "date": [1500001, 0],
802 "date": [1500001, 0],
763 "desc": "merge",
803 "desc": "merge",
764 "bookmarks": [],
804 "bookmarks": [],
765 "tags": [],
805 "tags": [],
766 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
806 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
767 "files": []
807 "files": []
768 },
808 },
769 {
809 {
770 "rev": 4,
810 "rev": 4,
771 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
811 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
772 "branch": "foo",
812 "branch": "foo",
773 "phase": "draft",
813 "phase": "draft",
774 "user": "person",
814 "user": "person",
775 "date": [1400000, 0],
815 "date": [1400000, 0],
776 "desc": "new branch",
816 "desc": "new branch",
777 "bookmarks": [],
817 "bookmarks": [],
778 "tags": [],
818 "tags": [],
779 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
819 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
780 "files": []
820 "files": []
781 }
821 }
782 ]
822 ]
783
823
784 $ hg log --debug -Tjson
824 $ hg log --debug -Tjson
785 [
825 [
786 {
826 {
787 "rev": 8,
827 "rev": 8,
788 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
828 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
789 "branch": "default",
829 "branch": "default",
790 "phase": "draft",
830 "phase": "draft",
791 "user": "test",
831 "user": "test",
792 "date": [1577872860, 0],
832 "date": [1577872860, 0],
793 "desc": "third",
833 "desc": "third",
794 "bookmarks": [],
834 "bookmarks": [],
795 "tags": ["tip"],
835 "tags": ["tip"],
796 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
836 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
797 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
837 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
798 "extra": {"branch": "default"},
838 "extra": {"branch": "default"},
799 "modified": [],
839 "modified": [],
800 "added": ["fourth", "third"],
840 "added": ["fourth", "third"],
801 "removed": ["second"]
841 "removed": ["second"]
802 },
842 },
803 {
843 {
804 "rev": 7,
844 "rev": 7,
805 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
845 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
806 "branch": "default",
846 "branch": "default",
807 "phase": "draft",
847 "phase": "draft",
808 "user": "User Name <user@hostname>",
848 "user": "User Name <user@hostname>",
809 "date": [1000000, 0],
849 "date": [1000000, 0],
810 "desc": "second",
850 "desc": "second",
811 "bookmarks": [],
851 "bookmarks": [],
812 "tags": [],
852 "tags": [],
813 "parents": ["0000000000000000000000000000000000000000"],
853 "parents": ["0000000000000000000000000000000000000000"],
814 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
854 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
815 "extra": {"branch": "default"},
855 "extra": {"branch": "default"},
816 "modified": [],
856 "modified": [],
817 "added": ["second"],
857 "added": ["second"],
818 "removed": []
858 "removed": []
819 },
859 },
820 {
860 {
821 "rev": 6,
861 "rev": 6,
822 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
862 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
823 "branch": "default",
863 "branch": "default",
824 "phase": "draft",
864 "phase": "draft",
825 "user": "person",
865 "user": "person",
826 "date": [1500001, 0],
866 "date": [1500001, 0],
827 "desc": "merge",
867 "desc": "merge",
828 "bookmarks": [],
868 "bookmarks": [],
829 "tags": [],
869 "tags": [],
830 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
870 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
831 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
871 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
832 "extra": {"branch": "default"},
872 "extra": {"branch": "default"},
833 "modified": [],
873 "modified": [],
834 "added": [],
874 "added": [],
835 "removed": []
875 "removed": []
836 },
876 },
837 {
877 {
838 "rev": 5,
878 "rev": 5,
839 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
879 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
840 "branch": "default",
880 "branch": "default",
841 "phase": "draft",
881 "phase": "draft",
842 "user": "person",
882 "user": "person",
843 "date": [1500000, 0],
883 "date": [1500000, 0],
844 "desc": "new head",
884 "desc": "new head",
845 "bookmarks": [],
885 "bookmarks": [],
846 "tags": [],
886 "tags": [],
847 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
887 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
848 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
888 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
849 "extra": {"branch": "default"},
889 "extra": {"branch": "default"},
850 "modified": [],
890 "modified": [],
851 "added": ["d"],
891 "added": ["d"],
852 "removed": []
892 "removed": []
853 },
893 },
854 {
894 {
855 "rev": 4,
895 "rev": 4,
856 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
896 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
857 "branch": "foo",
897 "branch": "foo",
858 "phase": "draft",
898 "phase": "draft",
859 "user": "person",
899 "user": "person",
860 "date": [1400000, 0],
900 "date": [1400000, 0],
861 "desc": "new branch",
901 "desc": "new branch",
862 "bookmarks": [],
902 "bookmarks": [],
863 "tags": [],
903 "tags": [],
864 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
904 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
865 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
905 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
866 "extra": {"branch": "foo"},
906 "extra": {"branch": "foo"},
867 "modified": [],
907 "modified": [],
868 "added": [],
908 "added": [],
869 "removed": []
909 "removed": []
870 },
910 },
871 {
911 {
872 "rev": 3,
912 "rev": 3,
873 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
913 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
874 "branch": "default",
914 "branch": "default",
875 "phase": "draft",
915 "phase": "draft",
876 "user": "person",
916 "user": "person",
877 "date": [1300000, 0],
917 "date": [1300000, 0],
878 "desc": "no user, no domain",
918 "desc": "no user, no domain",
879 "bookmarks": [],
919 "bookmarks": [],
880 "tags": [],
920 "tags": [],
881 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
921 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
882 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
922 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
883 "extra": {"branch": "default"},
923 "extra": {"branch": "default"},
884 "modified": ["c"],
924 "modified": ["c"],
885 "added": [],
925 "added": [],
886 "removed": []
926 "removed": []
887 },
927 },
888 {
928 {
889 "rev": 2,
929 "rev": 2,
890 "node": "97054abb4ab824450e9164180baf491ae0078465",
930 "node": "97054abb4ab824450e9164180baf491ae0078465",
891 "branch": "default",
931 "branch": "default",
892 "phase": "draft",
932 "phase": "draft",
893 "user": "other@place",
933 "user": "other@place",
894 "date": [1200000, 0],
934 "date": [1200000, 0],
895 "desc": "no person",
935 "desc": "no person",
896 "bookmarks": [],
936 "bookmarks": [],
897 "tags": [],
937 "tags": [],
898 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
938 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
899 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
939 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
900 "extra": {"branch": "default"},
940 "extra": {"branch": "default"},
901 "modified": [],
941 "modified": [],
902 "added": ["c"],
942 "added": ["c"],
903 "removed": []
943 "removed": []
904 },
944 },
905 {
945 {
906 "rev": 1,
946 "rev": 1,
907 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
947 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
908 "branch": "default",
948 "branch": "default",
909 "phase": "draft",
949 "phase": "draft",
910 "user": "A. N. Other <other@place>",
950 "user": "A. N. Other <other@place>",
911 "date": [1100000, 0],
951 "date": [1100000, 0],
912 "desc": "other 1\nother 2\n\nother 3",
952 "desc": "other 1\nother 2\n\nother 3",
913 "bookmarks": [],
953 "bookmarks": [],
914 "tags": [],
954 "tags": [],
915 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
955 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
916 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
956 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
917 "extra": {"branch": "default"},
957 "extra": {"branch": "default"},
918 "modified": [],
958 "modified": [],
919 "added": ["b"],
959 "added": ["b"],
920 "removed": []
960 "removed": []
921 },
961 },
922 {
962 {
923 "rev": 0,
963 "rev": 0,
924 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
964 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
925 "branch": "default",
965 "branch": "default",
926 "phase": "draft",
966 "phase": "draft",
927 "user": "User Name <user@hostname>",
967 "user": "User Name <user@hostname>",
928 "date": [1000000, 0],
968 "date": [1000000, 0],
929 "desc": "line 1\nline 2",
969 "desc": "line 1\nline 2",
930 "bookmarks": [],
970 "bookmarks": [],
931 "tags": [],
971 "tags": [],
932 "parents": ["0000000000000000000000000000000000000000"],
972 "parents": ["0000000000000000000000000000000000000000"],
933 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
973 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
934 "extra": {"branch": "default"},
974 "extra": {"branch": "default"},
935 "modified": [],
975 "modified": [],
936 "added": ["a"],
976 "added": ["a"],
937 "removed": []
977 "removed": []
938 }
978 }
939 ]
979 ]
940
980
941 Error if style not readable:
981 Error if style not readable:
942
982
943 #if unix-permissions no-root
983 #if unix-permissions no-root
944 $ touch q
984 $ touch q
945 $ chmod 0 q
985 $ chmod 0 q
946 $ hg log --style ./q
986 $ hg log --style ./q
947 abort: Permission denied: ./q
987 abort: Permission denied: ./q
948 [255]
988 [255]
949 #endif
989 #endif
950
990
951 Error if no style:
991 Error if no style:
952
992
953 $ hg log --style notexist
993 $ hg log --style notexist
954 abort: style 'notexist' not found
994 abort: style 'notexist' not found
955 (available styles: bisect, changelog, compact, default, phases, xml)
995 (available styles: bisect, changelog, compact, default, phases, xml)
956 [255]
996 [255]
957
997
958 $ hg log -T list
998 $ hg log -T list
959 available styles: bisect, changelog, compact, default, phases, xml
999 available styles: bisect, changelog, compact, default, phases, xml
960 abort: specify a template
1000 abort: specify a template
961 [255]
1001 [255]
962
1002
963 Error if style missing key:
1003 Error if style missing key:
964
1004
965 $ echo 'q = q' > t
1005 $ echo 'q = q' > t
966 $ hg log --style ./t
1006 $ hg log --style ./t
967 abort: "changeset" not in template map
1007 abort: "changeset" not in template map
968 [255]
1008 [255]
969
1009
970 Error if style missing value:
1010 Error if style missing value:
971
1011
972 $ echo 'changeset =' > t
1012 $ echo 'changeset =' > t
973 $ hg log --style t
1013 $ hg log --style t
974 abort: t:1: missing value
1014 abort: t:1: missing value
975 [255]
1015 [255]
976
1016
977 Error if include fails:
1017 Error if include fails:
978
1018
979 $ echo 'changeset = q' >> t
1019 $ echo 'changeset = q' >> t
980 #if unix-permissions no-root
1020 #if unix-permissions no-root
981 $ hg log --style ./t
1021 $ hg log --style ./t
982 abort: template file ./q: Permission denied
1022 abort: template file ./q: Permission denied
983 [255]
1023 [255]
984 $ rm q
1024 $ rm q
985 #endif
1025 #endif
986
1026
987 Include works:
1027 Include works:
988
1028
989 $ echo '{rev}' > q
1029 $ echo '{rev}' > q
990 $ hg log --style ./t
1030 $ hg log --style ./t
991 8
1031 8
992 7
1032 7
993 6
1033 6
994 5
1034 5
995 4
1035 4
996 3
1036 3
997 2
1037 2
998 1
1038 1
999 0
1039 0
1000
1040
1001 Check that {phase} works correctly on parents:
1041 Check that {phase} works correctly on parents:
1002
1042
1003 $ cat << EOF > parentphase
1043 $ cat << EOF > parentphase
1004 > changeset_debug = '{rev} ({phase}):{parents}\n'
1044 > changeset_debug = '{rev} ({phase}):{parents}\n'
1005 > parent = ' {rev} ({phase})'
1045 > parent = ' {rev} ({phase})'
1006 > EOF
1046 > EOF
1007 $ hg phase -r 5 --public
1047 $ hg phase -r 5 --public
1008 $ hg phase -r 7 --secret --force
1048 $ hg phase -r 7 --secret --force
1009 $ hg log --debug -G --style ./parentphase
1049 $ hg log --debug -G --style ./parentphase
1010 @ 8 (secret): 7 (secret) -1 (public)
1050 @ 8 (secret): 7 (secret) -1 (public)
1011 |
1051 |
1012 o 7 (secret): -1 (public) -1 (public)
1052 o 7 (secret): -1 (public) -1 (public)
1013
1053
1014 o 6 (draft): 5 (public) 4 (draft)
1054 o 6 (draft): 5 (public) 4 (draft)
1015 |\
1055 |\
1016 | o 5 (public): 3 (public) -1 (public)
1056 | o 5 (public): 3 (public) -1 (public)
1017 | |
1057 | |
1018 o | 4 (draft): 3 (public) -1 (public)
1058 o | 4 (draft): 3 (public) -1 (public)
1019 |/
1059 |/
1020 o 3 (public): 2 (public) -1 (public)
1060 o 3 (public): 2 (public) -1 (public)
1021 |
1061 |
1022 o 2 (public): 1 (public) -1 (public)
1062 o 2 (public): 1 (public) -1 (public)
1023 |
1063 |
1024 o 1 (public): 0 (public) -1 (public)
1064 o 1 (public): 0 (public) -1 (public)
1025 |
1065 |
1026 o 0 (public): -1 (public) -1 (public)
1066 o 0 (public): -1 (public) -1 (public)
1027
1067
1028
1068
1029 Missing non-standard names give no error (backward compatibility):
1069 Missing non-standard names give no error (backward compatibility):
1030
1070
1031 $ echo "changeset = '{c}'" > t
1071 $ echo "changeset = '{c}'" > t
1032 $ hg log --style ./t
1072 $ hg log --style ./t
1033
1073
1034 Defining non-standard name works:
1074 Defining non-standard name works:
1035
1075
1036 $ cat <<EOF > t
1076 $ cat <<EOF > t
1037 > changeset = '{c}'
1077 > changeset = '{c}'
1038 > c = q
1078 > c = q
1039 > EOF
1079 > EOF
1040 $ hg log --style ./t
1080 $ hg log --style ./t
1041 8
1081 8
1042 7
1082 7
1043 6
1083 6
1044 5
1084 5
1045 4
1085 4
1046 3
1086 3
1047 2
1087 2
1048 1
1088 1
1049 0
1089 0
1050
1090
1051 ui.style works:
1091 ui.style works:
1052
1092
1053 $ echo '[ui]' > .hg/hgrc
1093 $ echo '[ui]' > .hg/hgrc
1054 $ echo 'style = t' >> .hg/hgrc
1094 $ echo 'style = t' >> .hg/hgrc
1055 $ hg log
1095 $ hg log
1056 8
1096 8
1057 7
1097 7
1058 6
1098 6
1059 5
1099 5
1060 4
1100 4
1061 3
1101 3
1062 2
1102 2
1063 1
1103 1
1064 0
1104 0
1065
1105
1066
1106
1067 Issue338:
1107 Issue338:
1068
1108
1069 $ hg log --style=changelog > changelog
1109 $ hg log --style=changelog > changelog
1070
1110
1071 $ cat changelog
1111 $ cat changelog
1072 2020-01-01 test <test>
1112 2020-01-01 test <test>
1073
1113
1074 * fourth, second, third:
1114 * fourth, second, third:
1075 third
1115 third
1076 [95c24699272e] [tip]
1116 [95c24699272e] [tip]
1077
1117
1078 1970-01-12 User Name <user@hostname>
1118 1970-01-12 User Name <user@hostname>
1079
1119
1080 * second:
1120 * second:
1081 second
1121 second
1082 [29114dbae42b]
1122 [29114dbae42b]
1083
1123
1084 1970-01-18 person <person>
1124 1970-01-18 person <person>
1085
1125
1086 * merge
1126 * merge
1087 [d41e714fe50d]
1127 [d41e714fe50d]
1088
1128
1089 * d:
1129 * d:
1090 new head
1130 new head
1091 [13207e5a10d9]
1131 [13207e5a10d9]
1092
1132
1093 1970-01-17 person <person>
1133 1970-01-17 person <person>
1094
1134
1095 * new branch
1135 * new branch
1096 [bbe44766e73d] <foo>
1136 [bbe44766e73d] <foo>
1097
1137
1098 1970-01-16 person <person>
1138 1970-01-16 person <person>
1099
1139
1100 * c:
1140 * c:
1101 no user, no domain
1141 no user, no domain
1102 [10e46f2dcbf4]
1142 [10e46f2dcbf4]
1103
1143
1104 1970-01-14 other <other@place>
1144 1970-01-14 other <other@place>
1105
1145
1106 * c:
1146 * c:
1107 no person
1147 no person
1108 [97054abb4ab8]
1148 [97054abb4ab8]
1109
1149
1110 1970-01-13 A. N. Other <other@place>
1150 1970-01-13 A. N. Other <other@place>
1111
1151
1112 * b:
1152 * b:
1113 other 1 other 2
1153 other 1 other 2
1114
1154
1115 other 3
1155 other 3
1116 [b608e9d1a3f0]
1156 [b608e9d1a3f0]
1117
1157
1118 1970-01-12 User Name <user@hostname>
1158 1970-01-12 User Name <user@hostname>
1119
1159
1120 * a:
1160 * a:
1121 line 1 line 2
1161 line 1 line 2
1122 [1e4e1b8f71e0]
1162 [1e4e1b8f71e0]
1123
1163
1124
1164
1125 Issue2130: xml output for 'hg heads' is malformed
1165 Issue2130: xml output for 'hg heads' is malformed
1126
1166
1127 $ hg heads --style changelog
1167 $ hg heads --style changelog
1128 2020-01-01 test <test>
1168 2020-01-01 test <test>
1129
1169
1130 * fourth, second, third:
1170 * fourth, second, third:
1131 third
1171 third
1132 [95c24699272e] [tip]
1172 [95c24699272e] [tip]
1133
1173
1134 1970-01-18 person <person>
1174 1970-01-18 person <person>
1135
1175
1136 * merge
1176 * merge
1137 [d41e714fe50d]
1177 [d41e714fe50d]
1138
1178
1139 1970-01-17 person <person>
1179 1970-01-17 person <person>
1140
1180
1141 * new branch
1181 * new branch
1142 [bbe44766e73d] <foo>
1182 [bbe44766e73d] <foo>
1143
1183
1144
1184
1145 Keys work:
1185 Keys work:
1146
1186
1147 $ for key in author branch branches date desc file_adds file_dels file_mods \
1187 $ for key in author branch branches date desc file_adds file_dels file_mods \
1148 > file_copies file_copies_switch files \
1188 > file_copies file_copies_switch files \
1149 > manifest node parents rev tags diffstat extras \
1189 > manifest node parents rev tags diffstat extras \
1150 > p1rev p2rev p1node p2node; do
1190 > p1rev p2rev p1node p2node; do
1151 > for mode in '' --verbose --debug; do
1191 > for mode in '' --verbose --debug; do
1152 > hg log $mode --template "$key$mode: {$key}\n"
1192 > hg log $mode --template "$key$mode: {$key}\n"
1153 > done
1193 > done
1154 > done
1194 > done
1155 author: test
1195 author: test
1156 author: User Name <user@hostname>
1196 author: User Name <user@hostname>
1157 author: person
1197 author: person
1158 author: person
1198 author: person
1159 author: person
1199 author: person
1160 author: person
1200 author: person
1161 author: other@place
1201 author: other@place
1162 author: A. N. Other <other@place>
1202 author: A. N. Other <other@place>
1163 author: User Name <user@hostname>
1203 author: User Name <user@hostname>
1164 author--verbose: test
1204 author--verbose: test
1165 author--verbose: User Name <user@hostname>
1205 author--verbose: User Name <user@hostname>
1166 author--verbose: person
1206 author--verbose: person
1167 author--verbose: person
1207 author--verbose: person
1168 author--verbose: person
1208 author--verbose: person
1169 author--verbose: person
1209 author--verbose: person
1170 author--verbose: other@place
1210 author--verbose: other@place
1171 author--verbose: A. N. Other <other@place>
1211 author--verbose: A. N. Other <other@place>
1172 author--verbose: User Name <user@hostname>
1212 author--verbose: User Name <user@hostname>
1173 author--debug: test
1213 author--debug: test
1174 author--debug: User Name <user@hostname>
1214 author--debug: User Name <user@hostname>
1175 author--debug: person
1215 author--debug: person
1176 author--debug: person
1216 author--debug: person
1177 author--debug: person
1217 author--debug: person
1178 author--debug: person
1218 author--debug: person
1179 author--debug: other@place
1219 author--debug: other@place
1180 author--debug: A. N. Other <other@place>
1220 author--debug: A. N. Other <other@place>
1181 author--debug: User Name <user@hostname>
1221 author--debug: User Name <user@hostname>
1182 branch: default
1222 branch: default
1183 branch: default
1223 branch: default
1184 branch: default
1224 branch: default
1185 branch: default
1225 branch: default
1186 branch: foo
1226 branch: foo
1187 branch: default
1227 branch: default
1188 branch: default
1228 branch: default
1189 branch: default
1229 branch: default
1190 branch: default
1230 branch: default
1191 branch--verbose: default
1231 branch--verbose: default
1192 branch--verbose: default
1232 branch--verbose: default
1193 branch--verbose: default
1233 branch--verbose: default
1194 branch--verbose: default
1234 branch--verbose: default
1195 branch--verbose: foo
1235 branch--verbose: foo
1196 branch--verbose: default
1236 branch--verbose: default
1197 branch--verbose: default
1237 branch--verbose: default
1198 branch--verbose: default
1238 branch--verbose: default
1199 branch--verbose: default
1239 branch--verbose: default
1200 branch--debug: default
1240 branch--debug: default
1201 branch--debug: default
1241 branch--debug: default
1202 branch--debug: default
1242 branch--debug: default
1203 branch--debug: default
1243 branch--debug: default
1204 branch--debug: foo
1244 branch--debug: foo
1205 branch--debug: default
1245 branch--debug: default
1206 branch--debug: default
1246 branch--debug: default
1207 branch--debug: default
1247 branch--debug: default
1208 branch--debug: default
1248 branch--debug: default
1209 branches:
1249 branches:
1210 branches:
1250 branches:
1211 branches:
1251 branches:
1212 branches:
1252 branches:
1213 branches: foo
1253 branches: foo
1214 branches:
1254 branches:
1215 branches:
1255 branches:
1216 branches:
1256 branches:
1217 branches:
1257 branches:
1218 branches--verbose:
1258 branches--verbose:
1219 branches--verbose:
1259 branches--verbose:
1220 branches--verbose:
1260 branches--verbose:
1221 branches--verbose:
1261 branches--verbose:
1222 branches--verbose: foo
1262 branches--verbose: foo
1223 branches--verbose:
1263 branches--verbose:
1224 branches--verbose:
1264 branches--verbose:
1225 branches--verbose:
1265 branches--verbose:
1226 branches--verbose:
1266 branches--verbose:
1227 branches--debug:
1267 branches--debug:
1228 branches--debug:
1268 branches--debug:
1229 branches--debug:
1269 branches--debug:
1230 branches--debug:
1270 branches--debug:
1231 branches--debug: foo
1271 branches--debug: foo
1232 branches--debug:
1272 branches--debug:
1233 branches--debug:
1273 branches--debug:
1234 branches--debug:
1274 branches--debug:
1235 branches--debug:
1275 branches--debug:
1236 date: 1577872860.00
1276 date: 1577872860.00
1237 date: 1000000.00
1277 date: 1000000.00
1238 date: 1500001.00
1278 date: 1500001.00
1239 date: 1500000.00
1279 date: 1500000.00
1240 date: 1400000.00
1280 date: 1400000.00
1241 date: 1300000.00
1281 date: 1300000.00
1242 date: 1200000.00
1282 date: 1200000.00
1243 date: 1100000.00
1283 date: 1100000.00
1244 date: 1000000.00
1284 date: 1000000.00
1245 date--verbose: 1577872860.00
1285 date--verbose: 1577872860.00
1246 date--verbose: 1000000.00
1286 date--verbose: 1000000.00
1247 date--verbose: 1500001.00
1287 date--verbose: 1500001.00
1248 date--verbose: 1500000.00
1288 date--verbose: 1500000.00
1249 date--verbose: 1400000.00
1289 date--verbose: 1400000.00
1250 date--verbose: 1300000.00
1290 date--verbose: 1300000.00
1251 date--verbose: 1200000.00
1291 date--verbose: 1200000.00
1252 date--verbose: 1100000.00
1292 date--verbose: 1100000.00
1253 date--verbose: 1000000.00
1293 date--verbose: 1000000.00
1254 date--debug: 1577872860.00
1294 date--debug: 1577872860.00
1255 date--debug: 1000000.00
1295 date--debug: 1000000.00
1256 date--debug: 1500001.00
1296 date--debug: 1500001.00
1257 date--debug: 1500000.00
1297 date--debug: 1500000.00
1258 date--debug: 1400000.00
1298 date--debug: 1400000.00
1259 date--debug: 1300000.00
1299 date--debug: 1300000.00
1260 date--debug: 1200000.00
1300 date--debug: 1200000.00
1261 date--debug: 1100000.00
1301 date--debug: 1100000.00
1262 date--debug: 1000000.00
1302 date--debug: 1000000.00
1263 desc: third
1303 desc: third
1264 desc: second
1304 desc: second
1265 desc: merge
1305 desc: merge
1266 desc: new head
1306 desc: new head
1267 desc: new branch
1307 desc: new branch
1268 desc: no user, no domain
1308 desc: no user, no domain
1269 desc: no person
1309 desc: no person
1270 desc: other 1
1310 desc: other 1
1271 other 2
1311 other 2
1272
1312
1273 other 3
1313 other 3
1274 desc: line 1
1314 desc: line 1
1275 line 2
1315 line 2
1276 desc--verbose: third
1316 desc--verbose: third
1277 desc--verbose: second
1317 desc--verbose: second
1278 desc--verbose: merge
1318 desc--verbose: merge
1279 desc--verbose: new head
1319 desc--verbose: new head
1280 desc--verbose: new branch
1320 desc--verbose: new branch
1281 desc--verbose: no user, no domain
1321 desc--verbose: no user, no domain
1282 desc--verbose: no person
1322 desc--verbose: no person
1283 desc--verbose: other 1
1323 desc--verbose: other 1
1284 other 2
1324 other 2
1285
1325
1286 other 3
1326 other 3
1287 desc--verbose: line 1
1327 desc--verbose: line 1
1288 line 2
1328 line 2
1289 desc--debug: third
1329 desc--debug: third
1290 desc--debug: second
1330 desc--debug: second
1291 desc--debug: merge
1331 desc--debug: merge
1292 desc--debug: new head
1332 desc--debug: new head
1293 desc--debug: new branch
1333 desc--debug: new branch
1294 desc--debug: no user, no domain
1334 desc--debug: no user, no domain
1295 desc--debug: no person
1335 desc--debug: no person
1296 desc--debug: other 1
1336 desc--debug: other 1
1297 other 2
1337 other 2
1298
1338
1299 other 3
1339 other 3
1300 desc--debug: line 1
1340 desc--debug: line 1
1301 line 2
1341 line 2
1302 file_adds: fourth third
1342 file_adds: fourth third
1303 file_adds: second
1343 file_adds: second
1304 file_adds:
1344 file_adds:
1305 file_adds: d
1345 file_adds: d
1306 file_adds:
1346 file_adds:
1307 file_adds:
1347 file_adds:
1308 file_adds: c
1348 file_adds: c
1309 file_adds: b
1349 file_adds: b
1310 file_adds: a
1350 file_adds: a
1311 file_adds--verbose: fourth third
1351 file_adds--verbose: fourth third
1312 file_adds--verbose: second
1352 file_adds--verbose: second
1313 file_adds--verbose:
1353 file_adds--verbose:
1314 file_adds--verbose: d
1354 file_adds--verbose: d
1315 file_adds--verbose:
1355 file_adds--verbose:
1316 file_adds--verbose:
1356 file_adds--verbose:
1317 file_adds--verbose: c
1357 file_adds--verbose: c
1318 file_adds--verbose: b
1358 file_adds--verbose: b
1319 file_adds--verbose: a
1359 file_adds--verbose: a
1320 file_adds--debug: fourth third
1360 file_adds--debug: fourth third
1321 file_adds--debug: second
1361 file_adds--debug: second
1322 file_adds--debug:
1362 file_adds--debug:
1323 file_adds--debug: d
1363 file_adds--debug: d
1324 file_adds--debug:
1364 file_adds--debug:
1325 file_adds--debug:
1365 file_adds--debug:
1326 file_adds--debug: c
1366 file_adds--debug: c
1327 file_adds--debug: b
1367 file_adds--debug: b
1328 file_adds--debug: a
1368 file_adds--debug: a
1329 file_dels: second
1369 file_dels: second
1330 file_dels:
1370 file_dels:
1331 file_dels:
1371 file_dels:
1332 file_dels:
1372 file_dels:
1333 file_dels:
1373 file_dels:
1334 file_dels:
1374 file_dels:
1335 file_dels:
1375 file_dels:
1336 file_dels:
1376 file_dels:
1337 file_dels:
1377 file_dels:
1338 file_dels--verbose: second
1378 file_dels--verbose: second
1339 file_dels--verbose:
1379 file_dels--verbose:
1340 file_dels--verbose:
1380 file_dels--verbose:
1341 file_dels--verbose:
1381 file_dels--verbose:
1342 file_dels--verbose:
1382 file_dels--verbose:
1343 file_dels--verbose:
1383 file_dels--verbose:
1344 file_dels--verbose:
1384 file_dels--verbose:
1345 file_dels--verbose:
1385 file_dels--verbose:
1346 file_dels--verbose:
1386 file_dels--verbose:
1347 file_dels--debug: second
1387 file_dels--debug: second
1348 file_dels--debug:
1388 file_dels--debug:
1349 file_dels--debug:
1389 file_dels--debug:
1350 file_dels--debug:
1390 file_dels--debug:
1351 file_dels--debug:
1391 file_dels--debug:
1352 file_dels--debug:
1392 file_dels--debug:
1353 file_dels--debug:
1393 file_dels--debug:
1354 file_dels--debug:
1394 file_dels--debug:
1355 file_dels--debug:
1395 file_dels--debug:
1356 file_mods:
1396 file_mods:
1357 file_mods:
1397 file_mods:
1358 file_mods:
1398 file_mods:
1359 file_mods:
1399 file_mods:
1360 file_mods:
1400 file_mods:
1361 file_mods: c
1401 file_mods: c
1362 file_mods:
1402 file_mods:
1363 file_mods:
1403 file_mods:
1364 file_mods:
1404 file_mods:
1365 file_mods--verbose:
1405 file_mods--verbose:
1366 file_mods--verbose:
1406 file_mods--verbose:
1367 file_mods--verbose:
1407 file_mods--verbose:
1368 file_mods--verbose:
1408 file_mods--verbose:
1369 file_mods--verbose:
1409 file_mods--verbose:
1370 file_mods--verbose: c
1410 file_mods--verbose: c
1371 file_mods--verbose:
1411 file_mods--verbose:
1372 file_mods--verbose:
1412 file_mods--verbose:
1373 file_mods--verbose:
1413 file_mods--verbose:
1374 file_mods--debug:
1414 file_mods--debug:
1375 file_mods--debug:
1415 file_mods--debug:
1376 file_mods--debug:
1416 file_mods--debug:
1377 file_mods--debug:
1417 file_mods--debug:
1378 file_mods--debug:
1418 file_mods--debug:
1379 file_mods--debug: c
1419 file_mods--debug: c
1380 file_mods--debug:
1420 file_mods--debug:
1381 file_mods--debug:
1421 file_mods--debug:
1382 file_mods--debug:
1422 file_mods--debug:
1383 file_copies: fourth (second)
1423 file_copies: fourth (second)
1384 file_copies:
1424 file_copies:
1385 file_copies:
1425 file_copies:
1386 file_copies:
1426 file_copies:
1387 file_copies:
1427 file_copies:
1388 file_copies:
1428 file_copies:
1389 file_copies:
1429 file_copies:
1390 file_copies:
1430 file_copies:
1391 file_copies:
1431 file_copies:
1392 file_copies--verbose: fourth (second)
1432 file_copies--verbose: fourth (second)
1393 file_copies--verbose:
1433 file_copies--verbose:
1394 file_copies--verbose:
1434 file_copies--verbose:
1395 file_copies--verbose:
1435 file_copies--verbose:
1396 file_copies--verbose:
1436 file_copies--verbose:
1397 file_copies--verbose:
1437 file_copies--verbose:
1398 file_copies--verbose:
1438 file_copies--verbose:
1399 file_copies--verbose:
1439 file_copies--verbose:
1400 file_copies--verbose:
1440 file_copies--verbose:
1401 file_copies--debug: fourth (second)
1441 file_copies--debug: fourth (second)
1402 file_copies--debug:
1442 file_copies--debug:
1403 file_copies--debug:
1443 file_copies--debug:
1404 file_copies--debug:
1444 file_copies--debug:
1405 file_copies--debug:
1445 file_copies--debug:
1406 file_copies--debug:
1446 file_copies--debug:
1407 file_copies--debug:
1447 file_copies--debug:
1408 file_copies--debug:
1448 file_copies--debug:
1409 file_copies--debug:
1449 file_copies--debug:
1410 file_copies_switch:
1450 file_copies_switch:
1411 file_copies_switch:
1451 file_copies_switch:
1412 file_copies_switch:
1452 file_copies_switch:
1413 file_copies_switch:
1453 file_copies_switch:
1414 file_copies_switch:
1454 file_copies_switch:
1415 file_copies_switch:
1455 file_copies_switch:
1416 file_copies_switch:
1456 file_copies_switch:
1417 file_copies_switch:
1457 file_copies_switch:
1418 file_copies_switch:
1458 file_copies_switch:
1419 file_copies_switch--verbose:
1459 file_copies_switch--verbose:
1420 file_copies_switch--verbose:
1460 file_copies_switch--verbose:
1421 file_copies_switch--verbose:
1461 file_copies_switch--verbose:
1422 file_copies_switch--verbose:
1462 file_copies_switch--verbose:
1423 file_copies_switch--verbose:
1463 file_copies_switch--verbose:
1424 file_copies_switch--verbose:
1464 file_copies_switch--verbose:
1425 file_copies_switch--verbose:
1465 file_copies_switch--verbose:
1426 file_copies_switch--verbose:
1466 file_copies_switch--verbose:
1427 file_copies_switch--verbose:
1467 file_copies_switch--verbose:
1428 file_copies_switch--debug:
1468 file_copies_switch--debug:
1429 file_copies_switch--debug:
1469 file_copies_switch--debug:
1430 file_copies_switch--debug:
1470 file_copies_switch--debug:
1431 file_copies_switch--debug:
1471 file_copies_switch--debug:
1432 file_copies_switch--debug:
1472 file_copies_switch--debug:
1433 file_copies_switch--debug:
1473 file_copies_switch--debug:
1434 file_copies_switch--debug:
1474 file_copies_switch--debug:
1435 file_copies_switch--debug:
1475 file_copies_switch--debug:
1436 file_copies_switch--debug:
1476 file_copies_switch--debug:
1437 files: fourth second third
1477 files: fourth second third
1438 files: second
1478 files: second
1439 files:
1479 files:
1440 files: d
1480 files: d
1441 files:
1481 files:
1442 files: c
1482 files: c
1443 files: c
1483 files: c
1444 files: b
1484 files: b
1445 files: a
1485 files: a
1446 files--verbose: fourth second third
1486 files--verbose: fourth second third
1447 files--verbose: second
1487 files--verbose: second
1448 files--verbose:
1488 files--verbose:
1449 files--verbose: d
1489 files--verbose: d
1450 files--verbose:
1490 files--verbose:
1451 files--verbose: c
1491 files--verbose: c
1452 files--verbose: c
1492 files--verbose: c
1453 files--verbose: b
1493 files--verbose: b
1454 files--verbose: a
1494 files--verbose: a
1455 files--debug: fourth second third
1495 files--debug: fourth second third
1456 files--debug: second
1496 files--debug: second
1457 files--debug:
1497 files--debug:
1458 files--debug: d
1498 files--debug: d
1459 files--debug:
1499 files--debug:
1460 files--debug: c
1500 files--debug: c
1461 files--debug: c
1501 files--debug: c
1462 files--debug: b
1502 files--debug: b
1463 files--debug: a
1503 files--debug: a
1464 manifest: 6:94961b75a2da
1504 manifest: 6:94961b75a2da
1465 manifest: 5:f2dbc354b94e
1505 manifest: 5:f2dbc354b94e
1466 manifest: 4:4dc3def4f9b4
1506 manifest: 4:4dc3def4f9b4
1467 manifest: 4:4dc3def4f9b4
1507 manifest: 4:4dc3def4f9b4
1468 manifest: 3:cb5a1327723b
1508 manifest: 3:cb5a1327723b
1469 manifest: 3:cb5a1327723b
1509 manifest: 3:cb5a1327723b
1470 manifest: 2:6e0e82995c35
1510 manifest: 2:6e0e82995c35
1471 manifest: 1:4e8d705b1e53
1511 manifest: 1:4e8d705b1e53
1472 manifest: 0:a0c8bcbbb45c
1512 manifest: 0:a0c8bcbbb45c
1473 manifest--verbose: 6:94961b75a2da
1513 manifest--verbose: 6:94961b75a2da
1474 manifest--verbose: 5:f2dbc354b94e
1514 manifest--verbose: 5:f2dbc354b94e
1475 manifest--verbose: 4:4dc3def4f9b4
1515 manifest--verbose: 4:4dc3def4f9b4
1476 manifest--verbose: 4:4dc3def4f9b4
1516 manifest--verbose: 4:4dc3def4f9b4
1477 manifest--verbose: 3:cb5a1327723b
1517 manifest--verbose: 3:cb5a1327723b
1478 manifest--verbose: 3:cb5a1327723b
1518 manifest--verbose: 3:cb5a1327723b
1479 manifest--verbose: 2:6e0e82995c35
1519 manifest--verbose: 2:6e0e82995c35
1480 manifest--verbose: 1:4e8d705b1e53
1520 manifest--verbose: 1:4e8d705b1e53
1481 manifest--verbose: 0:a0c8bcbbb45c
1521 manifest--verbose: 0:a0c8bcbbb45c
1482 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1522 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
1483 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1523 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
1484 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1524 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1485 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1525 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
1486 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1526 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1487 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1527 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1488 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1528 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1489 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1529 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1490 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1530 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1491 node: 95c24699272ef57d062b8bccc32c878bf841784a
1531 node: 95c24699272ef57d062b8bccc32c878bf841784a
1492 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1532 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1493 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1533 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1494 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1534 node: 13207e5a10d9fd28ec424934298e176197f2c67f
1495 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1535 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1496 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1536 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1497 node: 97054abb4ab824450e9164180baf491ae0078465
1537 node: 97054abb4ab824450e9164180baf491ae0078465
1498 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1538 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1499 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1539 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1500 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1540 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
1501 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1541 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1502 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1542 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1503 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1543 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1504 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1544 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1505 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1545 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1506 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1546 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1507 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1547 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1508 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1548 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1509 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1549 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1510 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1550 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1511 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1551 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1512 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1552 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1513 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1553 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1514 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1554 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1515 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1555 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1516 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1556 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1517 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1557 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1518 parents:
1558 parents:
1519 parents: -1:000000000000
1559 parents: -1:000000000000
1520 parents: 5:13207e5a10d9 4:bbe44766e73d
1560 parents: 5:13207e5a10d9 4:bbe44766e73d
1521 parents: 3:10e46f2dcbf4
1561 parents: 3:10e46f2dcbf4
1522 parents:
1562 parents:
1523 parents:
1563 parents:
1524 parents:
1564 parents:
1525 parents:
1565 parents:
1526 parents:
1566 parents:
1527 parents--verbose:
1567 parents--verbose:
1528 parents--verbose: -1:000000000000
1568 parents--verbose: -1:000000000000
1529 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1569 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1530 parents--verbose: 3:10e46f2dcbf4
1570 parents--verbose: 3:10e46f2dcbf4
1531 parents--verbose:
1571 parents--verbose:
1532 parents--verbose:
1572 parents--verbose:
1533 parents--verbose:
1573 parents--verbose:
1534 parents--verbose:
1574 parents--verbose:
1535 parents--verbose:
1575 parents--verbose:
1536 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1576 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1537 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1577 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1538 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1578 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1539 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1579 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1540 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1580 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1541 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1581 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1542 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1582 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1543 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1583 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1544 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1584 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1545 rev: 8
1585 rev: 8
1546 rev: 7
1586 rev: 7
1547 rev: 6
1587 rev: 6
1548 rev: 5
1588 rev: 5
1549 rev: 4
1589 rev: 4
1550 rev: 3
1590 rev: 3
1551 rev: 2
1591 rev: 2
1552 rev: 1
1592 rev: 1
1553 rev: 0
1593 rev: 0
1554 rev--verbose: 8
1594 rev--verbose: 8
1555 rev--verbose: 7
1595 rev--verbose: 7
1556 rev--verbose: 6
1596 rev--verbose: 6
1557 rev--verbose: 5
1597 rev--verbose: 5
1558 rev--verbose: 4
1598 rev--verbose: 4
1559 rev--verbose: 3
1599 rev--verbose: 3
1560 rev--verbose: 2
1600 rev--verbose: 2
1561 rev--verbose: 1
1601 rev--verbose: 1
1562 rev--verbose: 0
1602 rev--verbose: 0
1563 rev--debug: 8
1603 rev--debug: 8
1564 rev--debug: 7
1604 rev--debug: 7
1565 rev--debug: 6
1605 rev--debug: 6
1566 rev--debug: 5
1606 rev--debug: 5
1567 rev--debug: 4
1607 rev--debug: 4
1568 rev--debug: 3
1608 rev--debug: 3
1569 rev--debug: 2
1609 rev--debug: 2
1570 rev--debug: 1
1610 rev--debug: 1
1571 rev--debug: 0
1611 rev--debug: 0
1572 tags: tip
1612 tags: tip
1573 tags:
1613 tags:
1574 tags:
1614 tags:
1575 tags:
1615 tags:
1576 tags:
1616 tags:
1577 tags:
1617 tags:
1578 tags:
1618 tags:
1579 tags:
1619 tags:
1580 tags:
1620 tags:
1581 tags--verbose: tip
1621 tags--verbose: tip
1582 tags--verbose:
1622 tags--verbose:
1583 tags--verbose:
1623 tags--verbose:
1584 tags--verbose:
1624 tags--verbose:
1585 tags--verbose:
1625 tags--verbose:
1586 tags--verbose:
1626 tags--verbose:
1587 tags--verbose:
1627 tags--verbose:
1588 tags--verbose:
1628 tags--verbose:
1589 tags--verbose:
1629 tags--verbose:
1590 tags--debug: tip
1630 tags--debug: tip
1591 tags--debug:
1631 tags--debug:
1592 tags--debug:
1632 tags--debug:
1593 tags--debug:
1633 tags--debug:
1594 tags--debug:
1634 tags--debug:
1595 tags--debug:
1635 tags--debug:
1596 tags--debug:
1636 tags--debug:
1597 tags--debug:
1637 tags--debug:
1598 tags--debug:
1638 tags--debug:
1599 diffstat: 3: +2/-1
1639 diffstat: 3: +2/-1
1600 diffstat: 1: +1/-0
1640 diffstat: 1: +1/-0
1601 diffstat: 0: +0/-0
1641 diffstat: 0: +0/-0
1602 diffstat: 1: +1/-0
1642 diffstat: 1: +1/-0
1603 diffstat: 0: +0/-0
1643 diffstat: 0: +0/-0
1604 diffstat: 1: +1/-0
1644 diffstat: 1: +1/-0
1605 diffstat: 1: +4/-0
1645 diffstat: 1: +4/-0
1606 diffstat: 1: +2/-0
1646 diffstat: 1: +2/-0
1607 diffstat: 1: +1/-0
1647 diffstat: 1: +1/-0
1608 diffstat--verbose: 3: +2/-1
1648 diffstat--verbose: 3: +2/-1
1609 diffstat--verbose: 1: +1/-0
1649 diffstat--verbose: 1: +1/-0
1610 diffstat--verbose: 0: +0/-0
1650 diffstat--verbose: 0: +0/-0
1611 diffstat--verbose: 1: +1/-0
1651 diffstat--verbose: 1: +1/-0
1612 diffstat--verbose: 0: +0/-0
1652 diffstat--verbose: 0: +0/-0
1613 diffstat--verbose: 1: +1/-0
1653 diffstat--verbose: 1: +1/-0
1614 diffstat--verbose: 1: +4/-0
1654 diffstat--verbose: 1: +4/-0
1615 diffstat--verbose: 1: +2/-0
1655 diffstat--verbose: 1: +2/-0
1616 diffstat--verbose: 1: +1/-0
1656 diffstat--verbose: 1: +1/-0
1617 diffstat--debug: 3: +2/-1
1657 diffstat--debug: 3: +2/-1
1618 diffstat--debug: 1: +1/-0
1658 diffstat--debug: 1: +1/-0
1619 diffstat--debug: 0: +0/-0
1659 diffstat--debug: 0: +0/-0
1620 diffstat--debug: 1: +1/-0
1660 diffstat--debug: 1: +1/-0
1621 diffstat--debug: 0: +0/-0
1661 diffstat--debug: 0: +0/-0
1622 diffstat--debug: 1: +1/-0
1662 diffstat--debug: 1: +1/-0
1623 diffstat--debug: 1: +4/-0
1663 diffstat--debug: 1: +4/-0
1624 diffstat--debug: 1: +2/-0
1664 diffstat--debug: 1: +2/-0
1625 diffstat--debug: 1: +1/-0
1665 diffstat--debug: 1: +1/-0
1626 extras: branch=default
1666 extras: branch=default
1627 extras: branch=default
1667 extras: branch=default
1628 extras: branch=default
1668 extras: branch=default
1629 extras: branch=default
1669 extras: branch=default
1630 extras: branch=foo
1670 extras: branch=foo
1631 extras: branch=default
1671 extras: branch=default
1632 extras: branch=default
1672 extras: branch=default
1633 extras: branch=default
1673 extras: branch=default
1634 extras: branch=default
1674 extras: branch=default
1635 extras--verbose: branch=default
1675 extras--verbose: branch=default
1636 extras--verbose: branch=default
1676 extras--verbose: branch=default
1637 extras--verbose: branch=default
1677 extras--verbose: branch=default
1638 extras--verbose: branch=default
1678 extras--verbose: branch=default
1639 extras--verbose: branch=foo
1679 extras--verbose: branch=foo
1640 extras--verbose: branch=default
1680 extras--verbose: branch=default
1641 extras--verbose: branch=default
1681 extras--verbose: branch=default
1642 extras--verbose: branch=default
1682 extras--verbose: branch=default
1643 extras--verbose: branch=default
1683 extras--verbose: branch=default
1644 extras--debug: branch=default
1684 extras--debug: branch=default
1645 extras--debug: branch=default
1685 extras--debug: branch=default
1646 extras--debug: branch=default
1686 extras--debug: branch=default
1647 extras--debug: branch=default
1687 extras--debug: branch=default
1648 extras--debug: branch=foo
1688 extras--debug: branch=foo
1649 extras--debug: branch=default
1689 extras--debug: branch=default
1650 extras--debug: branch=default
1690 extras--debug: branch=default
1651 extras--debug: branch=default
1691 extras--debug: branch=default
1652 extras--debug: branch=default
1692 extras--debug: branch=default
1653 p1rev: 7
1693 p1rev: 7
1654 p1rev: -1
1694 p1rev: -1
1655 p1rev: 5
1695 p1rev: 5
1656 p1rev: 3
1696 p1rev: 3
1657 p1rev: 3
1697 p1rev: 3
1658 p1rev: 2
1698 p1rev: 2
1659 p1rev: 1
1699 p1rev: 1
1660 p1rev: 0
1700 p1rev: 0
1661 p1rev: -1
1701 p1rev: -1
1662 p1rev--verbose: 7
1702 p1rev--verbose: 7
1663 p1rev--verbose: -1
1703 p1rev--verbose: -1
1664 p1rev--verbose: 5
1704 p1rev--verbose: 5
1665 p1rev--verbose: 3
1705 p1rev--verbose: 3
1666 p1rev--verbose: 3
1706 p1rev--verbose: 3
1667 p1rev--verbose: 2
1707 p1rev--verbose: 2
1668 p1rev--verbose: 1
1708 p1rev--verbose: 1
1669 p1rev--verbose: 0
1709 p1rev--verbose: 0
1670 p1rev--verbose: -1
1710 p1rev--verbose: -1
1671 p1rev--debug: 7
1711 p1rev--debug: 7
1672 p1rev--debug: -1
1712 p1rev--debug: -1
1673 p1rev--debug: 5
1713 p1rev--debug: 5
1674 p1rev--debug: 3
1714 p1rev--debug: 3
1675 p1rev--debug: 3
1715 p1rev--debug: 3
1676 p1rev--debug: 2
1716 p1rev--debug: 2
1677 p1rev--debug: 1
1717 p1rev--debug: 1
1678 p1rev--debug: 0
1718 p1rev--debug: 0
1679 p1rev--debug: -1
1719 p1rev--debug: -1
1680 p2rev: -1
1720 p2rev: -1
1681 p2rev: -1
1721 p2rev: -1
1682 p2rev: 4
1722 p2rev: 4
1683 p2rev: -1
1723 p2rev: -1
1684 p2rev: -1
1724 p2rev: -1
1685 p2rev: -1
1725 p2rev: -1
1686 p2rev: -1
1726 p2rev: -1
1687 p2rev: -1
1727 p2rev: -1
1688 p2rev: -1
1728 p2rev: -1
1689 p2rev--verbose: -1
1729 p2rev--verbose: -1
1690 p2rev--verbose: -1
1730 p2rev--verbose: -1
1691 p2rev--verbose: 4
1731 p2rev--verbose: 4
1692 p2rev--verbose: -1
1732 p2rev--verbose: -1
1693 p2rev--verbose: -1
1733 p2rev--verbose: -1
1694 p2rev--verbose: -1
1734 p2rev--verbose: -1
1695 p2rev--verbose: -1
1735 p2rev--verbose: -1
1696 p2rev--verbose: -1
1736 p2rev--verbose: -1
1697 p2rev--verbose: -1
1737 p2rev--verbose: -1
1698 p2rev--debug: -1
1738 p2rev--debug: -1
1699 p2rev--debug: -1
1739 p2rev--debug: -1
1700 p2rev--debug: 4
1740 p2rev--debug: 4
1701 p2rev--debug: -1
1741 p2rev--debug: -1
1702 p2rev--debug: -1
1742 p2rev--debug: -1
1703 p2rev--debug: -1
1743 p2rev--debug: -1
1704 p2rev--debug: -1
1744 p2rev--debug: -1
1705 p2rev--debug: -1
1745 p2rev--debug: -1
1706 p2rev--debug: -1
1746 p2rev--debug: -1
1707 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1747 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1708 p1node: 0000000000000000000000000000000000000000
1748 p1node: 0000000000000000000000000000000000000000
1709 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1749 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1710 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1750 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1711 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1751 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1712 p1node: 97054abb4ab824450e9164180baf491ae0078465
1752 p1node: 97054abb4ab824450e9164180baf491ae0078465
1713 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1753 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1714 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1754 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1715 p1node: 0000000000000000000000000000000000000000
1755 p1node: 0000000000000000000000000000000000000000
1716 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1756 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1717 p1node--verbose: 0000000000000000000000000000000000000000
1757 p1node--verbose: 0000000000000000000000000000000000000000
1718 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1758 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1719 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1759 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1720 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1760 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1721 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1761 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1722 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1762 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1723 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1763 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1724 p1node--verbose: 0000000000000000000000000000000000000000
1764 p1node--verbose: 0000000000000000000000000000000000000000
1725 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1765 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1726 p1node--debug: 0000000000000000000000000000000000000000
1766 p1node--debug: 0000000000000000000000000000000000000000
1727 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1767 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1728 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1768 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1729 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1769 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1730 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1770 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1731 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1771 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1732 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1772 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1733 p1node--debug: 0000000000000000000000000000000000000000
1773 p1node--debug: 0000000000000000000000000000000000000000
1734 p2node: 0000000000000000000000000000000000000000
1774 p2node: 0000000000000000000000000000000000000000
1735 p2node: 0000000000000000000000000000000000000000
1775 p2node: 0000000000000000000000000000000000000000
1736 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1776 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1737 p2node: 0000000000000000000000000000000000000000
1777 p2node: 0000000000000000000000000000000000000000
1738 p2node: 0000000000000000000000000000000000000000
1778 p2node: 0000000000000000000000000000000000000000
1739 p2node: 0000000000000000000000000000000000000000
1779 p2node: 0000000000000000000000000000000000000000
1740 p2node: 0000000000000000000000000000000000000000
1780 p2node: 0000000000000000000000000000000000000000
1741 p2node: 0000000000000000000000000000000000000000
1781 p2node: 0000000000000000000000000000000000000000
1742 p2node: 0000000000000000000000000000000000000000
1782 p2node: 0000000000000000000000000000000000000000
1743 p2node--verbose: 0000000000000000000000000000000000000000
1783 p2node--verbose: 0000000000000000000000000000000000000000
1744 p2node--verbose: 0000000000000000000000000000000000000000
1784 p2node--verbose: 0000000000000000000000000000000000000000
1745 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1785 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1746 p2node--verbose: 0000000000000000000000000000000000000000
1786 p2node--verbose: 0000000000000000000000000000000000000000
1747 p2node--verbose: 0000000000000000000000000000000000000000
1787 p2node--verbose: 0000000000000000000000000000000000000000
1748 p2node--verbose: 0000000000000000000000000000000000000000
1788 p2node--verbose: 0000000000000000000000000000000000000000
1749 p2node--verbose: 0000000000000000000000000000000000000000
1789 p2node--verbose: 0000000000000000000000000000000000000000
1750 p2node--verbose: 0000000000000000000000000000000000000000
1790 p2node--verbose: 0000000000000000000000000000000000000000
1751 p2node--verbose: 0000000000000000000000000000000000000000
1791 p2node--verbose: 0000000000000000000000000000000000000000
1752 p2node--debug: 0000000000000000000000000000000000000000
1792 p2node--debug: 0000000000000000000000000000000000000000
1753 p2node--debug: 0000000000000000000000000000000000000000
1793 p2node--debug: 0000000000000000000000000000000000000000
1754 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1794 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1755 p2node--debug: 0000000000000000000000000000000000000000
1795 p2node--debug: 0000000000000000000000000000000000000000
1756 p2node--debug: 0000000000000000000000000000000000000000
1796 p2node--debug: 0000000000000000000000000000000000000000
1757 p2node--debug: 0000000000000000000000000000000000000000
1797 p2node--debug: 0000000000000000000000000000000000000000
1758 p2node--debug: 0000000000000000000000000000000000000000
1798 p2node--debug: 0000000000000000000000000000000000000000
1759 p2node--debug: 0000000000000000000000000000000000000000
1799 p2node--debug: 0000000000000000000000000000000000000000
1760 p2node--debug: 0000000000000000000000000000000000000000
1800 p2node--debug: 0000000000000000000000000000000000000000
1761
1801
1762 Filters work:
1802 Filters work:
1763
1803
1764 $ hg log --template '{author|domain}\n'
1804 $ hg log --template '{author|domain}\n'
1765
1805
1766 hostname
1806 hostname
1767
1807
1768
1808
1769
1809
1770
1810
1771 place
1811 place
1772 place
1812 place
1773 hostname
1813 hostname
1774
1814
1775 $ hg log --template '{author|person}\n'
1815 $ hg log --template '{author|person}\n'
1776 test
1816 test
1777 User Name
1817 User Name
1778 person
1818 person
1779 person
1819 person
1780 person
1820 person
1781 person
1821 person
1782 other
1822 other
1783 A. N. Other
1823 A. N. Other
1784 User Name
1824 User Name
1785
1825
1786 $ hg log --template '{author|user}\n'
1826 $ hg log --template '{author|user}\n'
1787 test
1827 test
1788 user
1828 user
1789 person
1829 person
1790 person
1830 person
1791 person
1831 person
1792 person
1832 person
1793 other
1833 other
1794 other
1834 other
1795 user
1835 user
1796
1836
1797 $ hg log --template '{date|date}\n'
1837 $ hg log --template '{date|date}\n'
1798 Wed Jan 01 10:01:00 2020 +0000
1838 Wed Jan 01 10:01:00 2020 +0000
1799 Mon Jan 12 13:46:40 1970 +0000
1839 Mon Jan 12 13:46:40 1970 +0000
1800 Sun Jan 18 08:40:01 1970 +0000
1840 Sun Jan 18 08:40:01 1970 +0000
1801 Sun Jan 18 08:40:00 1970 +0000
1841 Sun Jan 18 08:40:00 1970 +0000
1802 Sat Jan 17 04:53:20 1970 +0000
1842 Sat Jan 17 04:53:20 1970 +0000
1803 Fri Jan 16 01:06:40 1970 +0000
1843 Fri Jan 16 01:06:40 1970 +0000
1804 Wed Jan 14 21:20:00 1970 +0000
1844 Wed Jan 14 21:20:00 1970 +0000
1805 Tue Jan 13 17:33:20 1970 +0000
1845 Tue Jan 13 17:33:20 1970 +0000
1806 Mon Jan 12 13:46:40 1970 +0000
1846 Mon Jan 12 13:46:40 1970 +0000
1807
1847
1808 $ hg log --template '{date|isodate}\n'
1848 $ hg log --template '{date|isodate}\n'
1809 2020-01-01 10:01 +0000
1849 2020-01-01 10:01 +0000
1810 1970-01-12 13:46 +0000
1850 1970-01-12 13:46 +0000
1811 1970-01-18 08:40 +0000
1851 1970-01-18 08:40 +0000
1812 1970-01-18 08:40 +0000
1852 1970-01-18 08:40 +0000
1813 1970-01-17 04:53 +0000
1853 1970-01-17 04:53 +0000
1814 1970-01-16 01:06 +0000
1854 1970-01-16 01:06 +0000
1815 1970-01-14 21:20 +0000
1855 1970-01-14 21:20 +0000
1816 1970-01-13 17:33 +0000
1856 1970-01-13 17:33 +0000
1817 1970-01-12 13:46 +0000
1857 1970-01-12 13:46 +0000
1818
1858
1819 $ hg log --template '{date|isodatesec}\n'
1859 $ hg log --template '{date|isodatesec}\n'
1820 2020-01-01 10:01:00 +0000
1860 2020-01-01 10:01:00 +0000
1821 1970-01-12 13:46:40 +0000
1861 1970-01-12 13:46:40 +0000
1822 1970-01-18 08:40:01 +0000
1862 1970-01-18 08:40:01 +0000
1823 1970-01-18 08:40:00 +0000
1863 1970-01-18 08:40:00 +0000
1824 1970-01-17 04:53:20 +0000
1864 1970-01-17 04:53:20 +0000
1825 1970-01-16 01:06:40 +0000
1865 1970-01-16 01:06:40 +0000
1826 1970-01-14 21:20:00 +0000
1866 1970-01-14 21:20:00 +0000
1827 1970-01-13 17:33:20 +0000
1867 1970-01-13 17:33:20 +0000
1828 1970-01-12 13:46:40 +0000
1868 1970-01-12 13:46:40 +0000
1829
1869
1830 $ hg log --template '{date|rfc822date}\n'
1870 $ hg log --template '{date|rfc822date}\n'
1831 Wed, 01 Jan 2020 10:01:00 +0000
1871 Wed, 01 Jan 2020 10:01:00 +0000
1832 Mon, 12 Jan 1970 13:46:40 +0000
1872 Mon, 12 Jan 1970 13:46:40 +0000
1833 Sun, 18 Jan 1970 08:40:01 +0000
1873 Sun, 18 Jan 1970 08:40:01 +0000
1834 Sun, 18 Jan 1970 08:40:00 +0000
1874 Sun, 18 Jan 1970 08:40:00 +0000
1835 Sat, 17 Jan 1970 04:53:20 +0000
1875 Sat, 17 Jan 1970 04:53:20 +0000
1836 Fri, 16 Jan 1970 01:06:40 +0000
1876 Fri, 16 Jan 1970 01:06:40 +0000
1837 Wed, 14 Jan 1970 21:20:00 +0000
1877 Wed, 14 Jan 1970 21:20:00 +0000
1838 Tue, 13 Jan 1970 17:33:20 +0000
1878 Tue, 13 Jan 1970 17:33:20 +0000
1839 Mon, 12 Jan 1970 13:46:40 +0000
1879 Mon, 12 Jan 1970 13:46:40 +0000
1840
1880
1841 $ hg log --template '{desc|firstline}\n'
1881 $ hg log --template '{desc|firstline}\n'
1842 third
1882 third
1843 second
1883 second
1844 merge
1884 merge
1845 new head
1885 new head
1846 new branch
1886 new branch
1847 no user, no domain
1887 no user, no domain
1848 no person
1888 no person
1849 other 1
1889 other 1
1850 line 1
1890 line 1
1851
1891
1852 $ hg log --template '{node|short}\n'
1892 $ hg log --template '{node|short}\n'
1853 95c24699272e
1893 95c24699272e
1854 29114dbae42b
1894 29114dbae42b
1855 d41e714fe50d
1895 d41e714fe50d
1856 13207e5a10d9
1896 13207e5a10d9
1857 bbe44766e73d
1897 bbe44766e73d
1858 10e46f2dcbf4
1898 10e46f2dcbf4
1859 97054abb4ab8
1899 97054abb4ab8
1860 b608e9d1a3f0
1900 b608e9d1a3f0
1861 1e4e1b8f71e0
1901 1e4e1b8f71e0
1862
1902
1863 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1903 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1864 <changeset author="test"/>
1904 <changeset author="test"/>
1865 <changeset author="User Name &lt;user@hostname&gt;"/>
1905 <changeset author="User Name &lt;user@hostname&gt;"/>
1866 <changeset author="person"/>
1906 <changeset author="person"/>
1867 <changeset author="person"/>
1907 <changeset author="person"/>
1868 <changeset author="person"/>
1908 <changeset author="person"/>
1869 <changeset author="person"/>
1909 <changeset author="person"/>
1870 <changeset author="other@place"/>
1910 <changeset author="other@place"/>
1871 <changeset author="A. N. Other &lt;other@place&gt;"/>
1911 <changeset author="A. N. Other &lt;other@place&gt;"/>
1872 <changeset author="User Name &lt;user@hostname&gt;"/>
1912 <changeset author="User Name &lt;user@hostname&gt;"/>
1873
1913
1874 $ hg log --template '{rev}: {children}\n'
1914 $ hg log --template '{rev}: {children}\n'
1875 8:
1915 8:
1876 7: 8:95c24699272e
1916 7: 8:95c24699272e
1877 6:
1917 6:
1878 5: 6:d41e714fe50d
1918 5: 6:d41e714fe50d
1879 4: 6:d41e714fe50d
1919 4: 6:d41e714fe50d
1880 3: 4:bbe44766e73d 5:13207e5a10d9
1920 3: 4:bbe44766e73d 5:13207e5a10d9
1881 2: 3:10e46f2dcbf4
1921 2: 3:10e46f2dcbf4
1882 1: 2:97054abb4ab8
1922 1: 2:97054abb4ab8
1883 0: 1:b608e9d1a3f0
1923 0: 1:b608e9d1a3f0
1884
1924
1885 Formatnode filter works:
1925 Formatnode filter works:
1886
1926
1887 $ hg -q log -r 0 --template '{node|formatnode}\n'
1927 $ hg -q log -r 0 --template '{node|formatnode}\n'
1888 1e4e1b8f71e0
1928 1e4e1b8f71e0
1889
1929
1890 $ hg log -r 0 --template '{node|formatnode}\n'
1930 $ hg log -r 0 --template '{node|formatnode}\n'
1891 1e4e1b8f71e0
1931 1e4e1b8f71e0
1892
1932
1893 $ hg -v log -r 0 --template '{node|formatnode}\n'
1933 $ hg -v log -r 0 --template '{node|formatnode}\n'
1894 1e4e1b8f71e0
1934 1e4e1b8f71e0
1895
1935
1896 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1936 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1897 1e4e1b8f71e05681d422154f5421e385fec3454f
1937 1e4e1b8f71e05681d422154f5421e385fec3454f
1898
1938
1899 Age filter:
1939 Age filter:
1900
1940
1901 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1941 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1902
1942
1903 >>> from datetime import datetime, timedelta
1943 >>> from datetime import datetime, timedelta
1904 >>> fp = open('a', 'w')
1944 >>> fp = open('a', 'w')
1905 >>> n = datetime.now() + timedelta(366 * 7)
1945 >>> n = datetime.now() + timedelta(366 * 7)
1906 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1946 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1907 >>> fp.close()
1947 >>> fp.close()
1908 $ hg add a
1948 $ hg add a
1909 $ hg commit -m future -d "`cat a`"
1949 $ hg commit -m future -d "`cat a`"
1910
1950
1911 $ hg log -l1 --template '{date|age}\n'
1951 $ hg log -l1 --template '{date|age}\n'
1912 7 years from now
1952 7 years from now
1913
1953
1914 Count filter:
1954 Count filter:
1915
1955
1916 $ hg log -l1 --template '{node|count} {node|short|count}\n'
1956 $ hg log -l1 --template '{node|count} {node|short|count}\n'
1917 40 12
1957 40 12
1918
1958
1919 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
1959 $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
1920 0 1 4
1960 0 1 4
1921
1961
1922 $ hg log -G --template '{rev}: children: {children|count}, \
1962 $ hg log -G --template '{rev}: children: {children|count}, \
1923 > tags: {tags|count}, file_adds: {file_adds|count}, \
1963 > tags: {tags|count}, file_adds: {file_adds|count}, \
1924 > ancestors: {revset("ancestors(%s)", rev)|count}'
1964 > ancestors: {revset("ancestors(%s)", rev)|count}'
1925 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
1965 @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3
1926 |
1966 |
1927 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
1967 o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2
1928 |
1968 |
1929 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
1969 o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1
1930
1970
1931 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
1971 o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7
1932 |\
1972 |\
1933 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
1973 | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5
1934 | |
1974 | |
1935 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
1975 o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5
1936 |/
1976 |/
1937 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
1977 o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4
1938 |
1978 |
1939 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
1979 o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3
1940 |
1980 |
1941 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
1981 o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2
1942 |
1982 |
1943 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
1983 o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1
1944
1984
1945
1985
1946 Upper/lower filters:
1986 Upper/lower filters:
1947
1987
1948 $ hg log -r0 --template '{branch|upper}\n'
1988 $ hg log -r0 --template '{branch|upper}\n'
1949 DEFAULT
1989 DEFAULT
1950 $ hg log -r0 --template '{author|lower}\n'
1990 $ hg log -r0 --template '{author|lower}\n'
1951 user name <user@hostname>
1991 user name <user@hostname>
1952 $ hg log -r0 --template '{date|upper}\n'
1992 $ hg log -r0 --template '{date|upper}\n'
1953 abort: template filter 'upper' is not compatible with keyword 'date'
1993 abort: template filter 'upper' is not compatible with keyword 'date'
1954 [255]
1994 [255]
1955
1995
1956 Error on syntax:
1996 Error on syntax:
1957
1997
1958 $ echo 'x = "f' >> t
1998 $ echo 'x = "f' >> t
1959 $ hg log
1999 $ hg log
1960 abort: t:3: unmatched quotes
2000 abort: t:3: unmatched quotes
1961 [255]
2001 [255]
1962
2002
1963 Behind the scenes, this will throw TypeError
2003 Behind the scenes, this will throw TypeError
1964
2004
1965 $ hg log -l 3 --template '{date|obfuscate}\n'
2005 $ hg log -l 3 --template '{date|obfuscate}\n'
1966 abort: template filter 'obfuscate' is not compatible with keyword 'date'
2006 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1967 [255]
2007 [255]
1968
2008
1969 Behind the scenes, this will throw a ValueError
2009 Behind the scenes, this will throw a ValueError
1970
2010
1971 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
2011 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1972 abort: template filter 'shortdate' is not compatible with keyword 'desc'
2012 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1973 [255]
2013 [255]
1974
2014
1975 Behind the scenes, this will throw AttributeError
2015 Behind the scenes, this will throw AttributeError
1976
2016
1977 $ hg log -l 3 --template 'line: {date|escape}\n'
2017 $ hg log -l 3 --template 'line: {date|escape}\n'
1978 abort: template filter 'escape' is not compatible with keyword 'date'
2018 abort: template filter 'escape' is not compatible with keyword 'date'
1979 [255]
2019 [255]
1980
2020
1981 Behind the scenes, this will throw ValueError
2021 Behind the scenes, this will throw ValueError
1982
2022
1983 $ hg tip --template '{author|email|date}\n'
2023 $ hg tip --template '{author|email|date}\n'
1984 abort: template filter 'datefilter' is not compatible with keyword 'author'
2024 abort: template filter 'datefilter' is not compatible with keyword 'author'
1985 [255]
2025 [255]
1986
2026
1987 Thrown an error if a template function doesn't exist
2027 Thrown an error if a template function doesn't exist
1988
2028
1989 $ hg tip --template '{foo()}\n'
2029 $ hg tip --template '{foo()}\n'
1990 hg: parse error: unknown function 'foo'
2030 hg: parse error: unknown function 'foo'
1991 [255]
2031 [255]
1992
2032
1993 Pass generator object created by template function to filter
2033 Pass generator object created by template function to filter
1994
2034
1995 $ hg log -l 1 --template '{if(author, author)|user}\n'
2035 $ hg log -l 1 --template '{if(author, author)|user}\n'
1996 test
2036 test
1997
2037
1998 Test diff function:
2038 Test diff function:
1999
2039
2000 $ hg diff -c 8
2040 $ hg diff -c 8
2001 diff -r 29114dbae42b -r 95c24699272e fourth
2041 diff -r 29114dbae42b -r 95c24699272e fourth
2002 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2042 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2003 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2043 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2004 @@ -0,0 +1,1 @@
2044 @@ -0,0 +1,1 @@
2005 +second
2045 +second
2006 diff -r 29114dbae42b -r 95c24699272e second
2046 diff -r 29114dbae42b -r 95c24699272e second
2007 --- a/second Mon Jan 12 13:46:40 1970 +0000
2047 --- a/second Mon Jan 12 13:46:40 1970 +0000
2008 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2048 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2009 @@ -1,1 +0,0 @@
2049 @@ -1,1 +0,0 @@
2010 -second
2050 -second
2011 diff -r 29114dbae42b -r 95c24699272e third
2051 diff -r 29114dbae42b -r 95c24699272e third
2012 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2052 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2013 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2053 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2014 @@ -0,0 +1,1 @@
2054 @@ -0,0 +1,1 @@
2015 +third
2055 +third
2016
2056
2017 $ hg log -r 8 -T "{diff()}"
2057 $ hg log -r 8 -T "{diff()}"
2018 diff -r 29114dbae42b -r 95c24699272e fourth
2058 diff -r 29114dbae42b -r 95c24699272e fourth
2019 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2059 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2020 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2060 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2021 @@ -0,0 +1,1 @@
2061 @@ -0,0 +1,1 @@
2022 +second
2062 +second
2023 diff -r 29114dbae42b -r 95c24699272e second
2063 diff -r 29114dbae42b -r 95c24699272e second
2024 --- a/second Mon Jan 12 13:46:40 1970 +0000
2064 --- a/second Mon Jan 12 13:46:40 1970 +0000
2025 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2065 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2026 @@ -1,1 +0,0 @@
2066 @@ -1,1 +0,0 @@
2027 -second
2067 -second
2028 diff -r 29114dbae42b -r 95c24699272e third
2068 diff -r 29114dbae42b -r 95c24699272e third
2029 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2069 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2030 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2070 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2031 @@ -0,0 +1,1 @@
2071 @@ -0,0 +1,1 @@
2032 +third
2072 +third
2033
2073
2034 $ hg log -r 8 -T "{diff('glob:f*')}"
2074 $ hg log -r 8 -T "{diff('glob:f*')}"
2035 diff -r 29114dbae42b -r 95c24699272e fourth
2075 diff -r 29114dbae42b -r 95c24699272e fourth
2036 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2076 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2037 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2077 +++ b/fourth Wed Jan 01 10:01:00 2020 +0000
2038 @@ -0,0 +1,1 @@
2078 @@ -0,0 +1,1 @@
2039 +second
2079 +second
2040
2080
2041 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
2081 $ hg log -r 8 -T "{diff('', 'glob:f*')}"
2042 diff -r 29114dbae42b -r 95c24699272e second
2082 diff -r 29114dbae42b -r 95c24699272e second
2043 --- a/second Mon Jan 12 13:46:40 1970 +0000
2083 --- a/second Mon Jan 12 13:46:40 1970 +0000
2044 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2084 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2045 @@ -1,1 +0,0 @@
2085 @@ -1,1 +0,0 @@
2046 -second
2086 -second
2047 diff -r 29114dbae42b -r 95c24699272e third
2087 diff -r 29114dbae42b -r 95c24699272e third
2048 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2088 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2049 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2089 +++ b/third Wed Jan 01 10:01:00 2020 +0000
2050 @@ -0,0 +1,1 @@
2090 @@ -0,0 +1,1 @@
2051 +third
2091 +third
2052
2092
2053 $ cd ..
2093 $ cd ..
2054
2094
2055
2095
2056 latesttag:
2096 latesttag:
2057
2097
2058 $ hg init latesttag
2098 $ hg init latesttag
2059 $ cd latesttag
2099 $ cd latesttag
2060
2100
2061 $ echo a > file
2101 $ echo a > file
2062 $ hg ci -Am a -d '0 0'
2102 $ hg ci -Am a -d '0 0'
2063 adding file
2103 adding file
2064
2104
2065 $ echo b >> file
2105 $ echo b >> file
2066 $ hg ci -m b -d '1 0'
2106 $ hg ci -m b -d '1 0'
2067
2107
2068 $ echo c >> head1
2108 $ echo c >> head1
2069 $ hg ci -Am h1c -d '2 0'
2109 $ hg ci -Am h1c -d '2 0'
2070 adding head1
2110 adding head1
2071
2111
2072 $ hg update -q 1
2112 $ hg update -q 1
2073 $ echo d >> head2
2113 $ echo d >> head2
2074 $ hg ci -Am h2d -d '3 0'
2114 $ hg ci -Am h2d -d '3 0'
2075 adding head2
2115 adding head2
2076 created new head
2116 created new head
2077
2117
2078 $ echo e >> head2
2118 $ echo e >> head2
2079 $ hg ci -m h2e -d '4 0'
2119 $ hg ci -m h2e -d '4 0'
2080
2120
2081 $ hg merge -q
2121 $ hg merge -q
2082 $ hg ci -m merge -d '5 -3600'
2122 $ hg ci -m merge -d '5 -3600'
2083
2123
2084 No tag set:
2124 No tag set:
2085
2125
2086 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2126 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2087 5: null+5
2127 5: null+5
2088 4: null+4
2128 4: null+4
2089 3: null+3
2129 3: null+3
2090 2: null+3
2130 2: null+3
2091 1: null+2
2131 1: null+2
2092 0: null+1
2132 0: null+1
2093
2133
2094 One common tag: longest path wins:
2134 One common tag: longest path wins:
2095
2135
2096 $ hg tag -r 1 -m t1 -d '6 0' t1
2136 $ hg tag -r 1 -m t1 -d '6 0' t1
2097 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2137 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2098 6: t1+4
2138 6: t1+4
2099 5: t1+3
2139 5: t1+3
2100 4: t1+2
2140 4: t1+2
2101 3: t1+1
2141 3: t1+1
2102 2: t1+1
2142 2: t1+1
2103 1: t1+0
2143 1: t1+0
2104 0: null+1
2144 0: null+1
2105
2145
2106 One ancestor tag: more recent wins:
2146 One ancestor tag: more recent wins:
2107
2147
2108 $ hg tag -r 2 -m t2 -d '7 0' t2
2148 $ hg tag -r 2 -m t2 -d '7 0' t2
2109 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2149 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2110 7: t2+3
2150 7: t2+3
2111 6: t2+2
2151 6: t2+2
2112 5: t2+1
2152 5: t2+1
2113 4: t1+2
2153 4: t1+2
2114 3: t1+1
2154 3: t1+1
2115 2: t2+0
2155 2: t2+0
2116 1: t1+0
2156 1: t1+0
2117 0: null+1
2157 0: null+1
2118
2158
2119 Two branch tags: more recent wins:
2159 Two branch tags: more recent wins:
2120
2160
2121 $ hg tag -r 3 -m t3 -d '8 0' t3
2161 $ hg tag -r 3 -m t3 -d '8 0' t3
2122 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2162 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2123 8: t3+5
2163 8: t3+5
2124 7: t3+4
2164 7: t3+4
2125 6: t3+3
2165 6: t3+3
2126 5: t3+2
2166 5: t3+2
2127 4: t3+1
2167 4: t3+1
2128 3: t3+0
2168 3: t3+0
2129 2: t2+0
2169 2: t2+0
2130 1: t1+0
2170 1: t1+0
2131 0: null+1
2171 0: null+1
2132
2172
2133 Merged tag overrides:
2173 Merged tag overrides:
2134
2174
2135 $ hg tag -r 5 -m t5 -d '9 0' t5
2175 $ hg tag -r 5 -m t5 -d '9 0' t5
2136 $ hg tag -r 3 -m at3 -d '10 0' at3
2176 $ hg tag -r 3 -m at3 -d '10 0' at3
2137 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2177 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
2138 10: t5+5
2178 10: t5+5
2139 9: t5+4
2179 9: t5+4
2140 8: t5+3
2180 8: t5+3
2141 7: t5+2
2181 7: t5+2
2142 6: t5+1
2182 6: t5+1
2143 5: t5+0
2183 5: t5+0
2144 4: at3:t3+1
2184 4: at3:t3+1
2145 3: at3:t3+0
2185 3: at3:t3+0
2146 2: t2+0
2186 2: t2+0
2147 1: t1+0
2187 1: t1+0
2148 0: null+1
2188 0: null+1
2149
2189
2150 $ cd ..
2190 $ cd ..
2151
2191
2152
2192
2153 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2193 Style path expansion: issue1948 - ui.style option doesn't work on OSX
2154 if it is a relative path
2194 if it is a relative path
2155
2195
2156 $ mkdir -p home/styles
2196 $ mkdir -p home/styles
2157
2197
2158 $ cat > home/styles/teststyle <<EOF
2198 $ cat > home/styles/teststyle <<EOF
2159 > changeset = 'test {rev}:{node|short}\n'
2199 > changeset = 'test {rev}:{node|short}\n'
2160 > EOF
2200 > EOF
2161
2201
2162 $ HOME=`pwd`/home; export HOME
2202 $ HOME=`pwd`/home; export HOME
2163
2203
2164 $ cat > latesttag/.hg/hgrc <<EOF
2204 $ cat > latesttag/.hg/hgrc <<EOF
2165 > [ui]
2205 > [ui]
2166 > style = ~/styles/teststyle
2206 > style = ~/styles/teststyle
2167 > EOF
2207 > EOF
2168
2208
2169 $ hg -R latesttag tip
2209 $ hg -R latesttag tip
2170 test 10:9b4a630e5f5f
2210 test 10:9b4a630e5f5f
2171
2211
2172 Test recursive showlist template (issue1989):
2212 Test recursive showlist template (issue1989):
2173
2213
2174 $ cat > style1989 <<EOF
2214 $ cat > style1989 <<EOF
2175 > changeset = '{file_mods}{manifest}{extras}'
2215 > changeset = '{file_mods}{manifest}{extras}'
2176 > file_mod = 'M|{author|person}\n'
2216 > file_mod = 'M|{author|person}\n'
2177 > manifest = '{rev},{author}\n'
2217 > manifest = '{rev},{author}\n'
2178 > extra = '{key}: {author}\n'
2218 > extra = '{key}: {author}\n'
2179 > EOF
2219 > EOF
2180
2220
2181 $ hg -R latesttag log -r tip --style=style1989
2221 $ hg -R latesttag log -r tip --style=style1989
2182 M|test
2222 M|test
2183 10,test
2223 10,test
2184 branch: test
2224 branch: test
2185
2225
2186 Test new-style inline templating:
2226 Test new-style inline templating:
2187
2227
2188 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2228 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
2189 modified files: .hgtags
2229 modified files: .hgtags
2190
2230
2191 Test the sub function of templating for expansion:
2231 Test the sub function of templating for expansion:
2192
2232
2193 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2233 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
2194 xx
2234 xx
2195
2235
2196 Test the strip function with chars specified:
2236 Test the strip function with chars specified:
2197
2237
2198 $ hg log -R latesttag --template '{desc}\n'
2238 $ hg log -R latesttag --template '{desc}\n'
2199 at3
2239 at3
2200 t5
2240 t5
2201 t3
2241 t3
2202 t2
2242 t2
2203 t1
2243 t1
2204 merge
2244 merge
2205 h2e
2245 h2e
2206 h2d
2246 h2d
2207 h1c
2247 h1c
2208 b
2248 b
2209 a
2249 a
2210
2250
2211 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2251 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
2212 at3
2252 at3
2213 5
2253 5
2214 3
2254 3
2215 2
2255 2
2216 1
2256 1
2217 merg
2257 merg
2218 h2
2258 h2
2219 h2d
2259 h2d
2220 h1c
2260 h1c
2221 b
2261 b
2222 a
2262 a
2223
2263
2224 Test date format:
2264 Test date format:
2225
2265
2226 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2266 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
2227 date: 70 01 01 10 +0000
2267 date: 70 01 01 10 +0000
2228 date: 70 01 01 09 +0000
2268 date: 70 01 01 09 +0000
2229 date: 70 01 01 08 +0000
2269 date: 70 01 01 08 +0000
2230 date: 70 01 01 07 +0000
2270 date: 70 01 01 07 +0000
2231 date: 70 01 01 06 +0000
2271 date: 70 01 01 06 +0000
2232 date: 70 01 01 05 +0100
2272 date: 70 01 01 05 +0100
2233 date: 70 01 01 04 +0000
2273 date: 70 01 01 04 +0000
2234 date: 70 01 01 03 +0000
2274 date: 70 01 01 03 +0000
2235 date: 70 01 01 02 +0000
2275 date: 70 01 01 02 +0000
2236 date: 70 01 01 01 +0000
2276 date: 70 01 01 01 +0000
2237 date: 70 01 01 00 +0000
2277 date: 70 01 01 00 +0000
2238
2278
2239 Test invalid date:
2279 Test invalid date:
2240
2280
2241 $ hg log -R latesttag -T '{date(rev)}\n'
2281 $ hg log -R latesttag -T '{date(rev)}\n'
2242 hg: parse error: date expects a date information
2282 hg: parse error: date expects a date information
2243 [255]
2283 [255]
2244
2284
2245 Test string escaping:
2285 Test string escaping:
2246
2286
2247 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
2287 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
2248 >
2288 >
2249 <>\n<[>
2289 <>\n<[>
2250 <>\n<]>
2290 <>\n<]>
2251 <>\n<
2291 <>\n<
2252
2292
2253 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
2293 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
2254
2294
2255 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
2295 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
2256 \x6e
2296 \x6e
2257 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
2297 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
2258 \x5c\x786e
2298 \x5c\x786e
2259 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
2299 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
2260 \x6e
2300 \x6e
2261 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
2301 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
2262 \x5c\x786e
2302 \x5c\x786e
2263
2303
2264 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
2304 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
2265 \x6e
2305 \x6e
2266 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
2306 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
2267 \x5c\x786e
2307 \x5c\x786e
2268 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
2308 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
2269 \x6e
2309 \x6e
2270 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
2310 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
2271 \x5c\x786e
2311 \x5c\x786e
2272
2312
2273 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
2313 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
2274 fourth
2314 fourth
2275 second
2315 second
2276 third
2316 third
2277 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
2317 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
2278 fourth\nsecond\nthird
2318 fourth\nsecond\nthird
2279
2319
2280 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
2320 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
2281 <p>
2321 <p>
2282 1st
2322 1st
2283 </p>
2323 </p>
2284 <p>
2324 <p>
2285 2nd
2325 2nd
2286 </p>
2326 </p>
2287 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
2327 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
2288 <p>
2328 <p>
2289 1st\n\n2nd
2329 1st\n\n2nd
2290 </p>
2330 </p>
2291 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
2331 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
2292 1st
2332 1st
2293
2333
2294 2nd
2334 2nd
2295
2335
2296 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
2336 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
2297 o perso
2337 o perso
2298 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
2338 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
2299 no person
2339 no person
2300 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
2340 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
2301 o perso
2341 o perso
2302 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
2342 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
2303 no perso
2343 no perso
2304
2344
2305 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
2345 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
2306 -o perso-
2346 -o perso-
2307 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
2347 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
2308 no person
2348 no person
2309 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
2349 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
2310 \x2do perso\x2d
2350 \x2do perso\x2d
2311 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
2351 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
2312 -o perso-
2352 -o perso-
2313 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
2353 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
2314 \x2do perso\x6e
2354 \x2do perso\x6e
2315
2355
2316 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
2356 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
2317 fourth
2357 fourth
2318 second
2358 second
2319 third
2359 third
2320 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
2360 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
2321 fourth\nsecond\nthird\n
2361 fourth\nsecond\nthird\n
2322
2362
2323 Test string escaping in nested expression:
2363 Test string escaping in nested expression:
2324
2364
2325 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
2365 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
2326 fourth\x6esecond\x6ethird
2366 fourth\x6esecond\x6ethird
2327 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
2367 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
2328 fourth\x6esecond\x6ethird
2368 fourth\x6esecond\x6ethird
2329
2369
2330 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
2370 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
2331 fourth\x6esecond\x6ethird
2371 fourth\x6esecond\x6ethird
2332 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
2372 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
2333 fourth\x5c\x786esecond\x5c\x786ethird
2373 fourth\x5c\x786esecond\x5c\x786ethird
2334
2374
2335 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
2375 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
2336 3:\x6eo user, \x6eo domai\x6e
2376 3:\x6eo user, \x6eo domai\x6e
2337 4:\x5c\x786eew bra\x5c\x786ech
2377 4:\x5c\x786eew bra\x5c\x786ech
2338
2378
2339 Test recursive evaluation:
2379 Test recursive evaluation:
2340
2380
2341 $ hg init r
2381 $ hg init r
2342 $ cd r
2382 $ cd r
2343 $ echo a > a
2383 $ echo a > a
2344 $ hg ci -Am '{rev}'
2384 $ hg ci -Am '{rev}'
2345 adding a
2385 adding a
2346 $ hg log -r 0 --template '{if(rev, desc)}\n'
2386 $ hg log -r 0 --template '{if(rev, desc)}\n'
2347 {rev}
2387 {rev}
2348 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
2388 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
2349 test 0
2389 test 0
2350
2390
2351 $ hg branch -q 'text.{rev}'
2391 $ hg branch -q 'text.{rev}'
2352 $ echo aa >> aa
2392 $ echo aa >> aa
2353 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
2393 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
2354
2394
2355 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
2395 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
2356 {node|short}desc to
2396 {node|short}desc to
2357 text.{rev}be wrapped
2397 text.{rev}be wrapped
2358 text.{rev}desc to be
2398 text.{rev}desc to be
2359 text.{rev}wrapped (no-eol)
2399 text.{rev}wrapped (no-eol)
2360 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
2400 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
2361 bcc7ff960b8e:desc to
2401 bcc7ff960b8e:desc to
2362 text.1:be wrapped
2402 text.1:be wrapped
2363 text.1:desc to be
2403 text.1:desc to be
2364 text.1:wrapped (no-eol)
2404 text.1:wrapped (no-eol)
2365
2405
2366 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
2406 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
2367 {node|short} (no-eol)
2407 {node|short} (no-eol)
2368 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
2408 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
2369 bcc-ff---b-e (no-eol)
2409 bcc-ff---b-e (no-eol)
2370
2410
2371 $ cat >> .hg/hgrc <<EOF
2411 $ cat >> .hg/hgrc <<EOF
2372 > [extensions]
2412 > [extensions]
2373 > color=
2413 > color=
2374 > [color]
2414 > [color]
2375 > mode=ansi
2415 > mode=ansi
2376 > text.{rev} = red
2416 > text.{rev} = red
2377 > text.1 = green
2417 > text.1 = green
2378 > EOF
2418 > EOF
2379 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
2419 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
2380 \x1b[0;31mtext\x1b[0m (esc)
2420 \x1b[0;31mtext\x1b[0m (esc)
2381 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
2421 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
2382 \x1b[0;32mtext\x1b[0m (esc)
2422 \x1b[0;32mtext\x1b[0m (esc)
2383
2423
2384 Test branches inside if statement:
2424 Test branches inside if statement:
2385
2425
2386 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
2426 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
2387 no
2427 no
2388
2428
2389 Test get function:
2429 Test get function:
2390
2430
2391 $ hg log -r 0 --template '{get(extras, "branch")}\n'
2431 $ hg log -r 0 --template '{get(extras, "branch")}\n'
2392 default
2432 default
2393 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
2433 $ hg log -r 0 --template '{get(files, "should_fail")}\n'
2394 hg: parse error: get() expects a dict as first argument
2434 hg: parse error: get() expects a dict as first argument
2395 [255]
2435 [255]
2396
2436
2397 Test shortest(node) function:
2437 Test shortest(node) function:
2398
2438
2399 $ echo b > b
2439 $ echo b > b
2400 $ hg ci -qAm b
2440 $ hg ci -qAm b
2401 $ hg log --template '{shortest(node)}\n'
2441 $ hg log --template '{shortest(node)}\n'
2402 e777
2442 e777
2403 bcc7
2443 bcc7
2404 f776
2444 f776
2405 $ hg log --template '{shortest(node, 10)}\n'
2445 $ hg log --template '{shortest(node, 10)}\n'
2406 e777603221
2446 e777603221
2407 bcc7ff960b
2447 bcc7ff960b
2408 f7769ec2ab
2448 f7769ec2ab
2409
2449
2410 Test pad function
2450 Test pad function
2411
2451
2412 $ hg log --template '{pad(rev, 20)} {author|user}\n'
2452 $ hg log --template '{pad(rev, 20)} {author|user}\n'
2413 2 test
2453 2 test
2414 1 {node|short}
2454 1 {node|short}
2415 0 test
2455 0 test
2416
2456
2417 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
2457 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
2418 2 test
2458 2 test
2419 1 {node|short}
2459 1 {node|short}
2420 0 test
2460 0 test
2421
2461
2422 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
2462 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
2423 2------------------- test
2463 2------------------- test
2424 1------------------- {node|short}
2464 1------------------- {node|short}
2425 0------------------- test
2465 0------------------- test
2426
2466
2427 Test ifcontains function
2467 Test ifcontains function
2428
2468
2429 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
2469 $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
2430 2 is in the string
2470 2 is in the string
2431 1 is not
2471 1 is not
2432 0 is in the string
2472 0 is in the string
2433
2473
2434 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
2474 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
2435 2 did not add a
2475 2 did not add a
2436 1 did not add a
2476 1 did not add a
2437 0 added a
2477 0 added a
2438
2478
2439 Test revset function
2479 Test revset function
2440
2480
2441 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
2481 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
2442 2 current rev
2482 2 current rev
2443 1 not current rev
2483 1 not current rev
2444 0 not current rev
2484 0 not current rev
2445
2485
2446 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
2486 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
2447 2 match rev
2487 2 match rev
2448 1 match rev
2488 1 match rev
2449 0 not match rev
2489 0 not match rev
2450
2490
2451 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
2491 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
2452 2 Parents: 1
2492 2 Parents: 1
2453 1 Parents: 0
2493 1 Parents: 0
2454 0 Parents:
2494 0 Parents:
2455
2495
2456 $ cat >> .hg/hgrc <<EOF
2496 $ cat >> .hg/hgrc <<EOF
2457 > [revsetalias]
2497 > [revsetalias]
2458 > myparents(\$1) = parents(\$1)
2498 > myparents(\$1) = parents(\$1)
2459 > EOF
2499 > EOF
2460 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
2500 $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n'
2461 2 Parents: 1
2501 2 Parents: 1
2462 1 Parents: 0
2502 1 Parents: 0
2463 0 Parents:
2503 0 Parents:
2464
2504
2465 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
2505 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
2466 Rev: 2
2506 Rev: 2
2467 Ancestor: 0
2507 Ancestor: 0
2468 Ancestor: 1
2508 Ancestor: 1
2469 Ancestor: 2
2509 Ancestor: 2
2470
2510
2471 Rev: 1
2511 Rev: 1
2472 Ancestor: 0
2512 Ancestor: 0
2473 Ancestor: 1
2513 Ancestor: 1
2474
2514
2475 Rev: 0
2515 Rev: 0
2476 Ancestor: 0
2516 Ancestor: 0
2477
2517
2478 Test current bookmark templating
2518 Test current bookmark templating
2479
2519
2480 $ hg book foo
2520 $ hg book foo
2481 $ hg book bar
2521 $ hg book bar
2482 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
2522 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
2483 2 bar* foo
2523 2 bar* foo
2484 1
2524 1
2485 0
2525 0
2486 $ hg log --template "{rev} {currentbookmark}\n"
2526 $ hg log --template "{rev} {currentbookmark}\n"
2487 2 bar
2527 2 bar
2488 1
2528 1
2489 0
2529 0
2490 $ hg bookmarks --inactive bar
2530 $ hg bookmarks --inactive bar
2491 $ hg log --template "{rev} {currentbookmark}\n"
2531 $ hg log --template "{rev} {currentbookmark}\n"
2492 2
2532 2
2493 1
2533 1
2494 0
2534 0
2495 $ hg book -r1 baz
2535 $ hg book -r1 baz
2496 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
2536 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
2497 2 bar foo
2537 2 bar foo
2498 1 baz
2538 1 baz
2499 0
2539 0
2500 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
2540 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
2501 2 t
2541 2 t
2502 1 f
2542 1 f
2503 0 f
2543 0 f
2504
2544
2505 Test stringify on sub expressions
2545 Test stringify on sub expressions
2506
2546
2507 $ cd ..
2547 $ cd ..
2508 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
2548 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
2509 fourth, second, third
2549 fourth, second, third
2510 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
2550 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
2511 abc
2551 abc
2512
2552
2513 Test splitlines
2553 Test splitlines
2514
2554
2515 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
2555 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
2516 @ foo future
2556 @ foo future
2517 |
2557 |
2518 o foo third
2558 o foo third
2519 |
2559 |
2520 o foo second
2560 o foo second
2521
2561
2522 o foo merge
2562 o foo merge
2523 |\
2563 |\
2524 | o foo new head
2564 | o foo new head
2525 | |
2565 | |
2526 o | foo new branch
2566 o | foo new branch
2527 |/
2567 |/
2528 o foo no user, no domain
2568 o foo no user, no domain
2529 |
2569 |
2530 o foo no person
2570 o foo no person
2531 |
2571 |
2532 o foo other 1
2572 o foo other 1
2533 | foo other 2
2573 | foo other 2
2534 | foo
2574 | foo
2535 | foo other 3
2575 | foo other 3
2536 o foo line 1
2576 o foo line 1
2537 foo line 2
2577 foo line 2
2538
2578
2539 Test startswith
2579 Test startswith
2540 $ hg log -Gv -R a --template "{startswith(desc)}"
2580 $ hg log -Gv -R a --template "{startswith(desc)}"
2541 hg: parse error: startswith expects two arguments
2581 hg: parse error: startswith expects two arguments
2542 [255]
2582 [255]
2543
2583
2544 $ hg log -Gv -R a --template "{startswith('line', desc)}"
2584 $ hg log -Gv -R a --template "{startswith('line', desc)}"
2545 @
2585 @
2546 |
2586 |
2547 o
2587 o
2548 |
2588 |
2549 o
2589 o
2550
2590
2551 o
2591 o
2552 |\
2592 |\
2553 | o
2593 | o
2554 | |
2594 | |
2555 o |
2595 o |
2556 |/
2596 |/
2557 o
2597 o
2558 |
2598 |
2559 o
2599 o
2560 |
2600 |
2561 o
2601 o
2562 |
2602 |
2563 o line 1
2603 o line 1
2564 line 2
2604 line 2
2565
2605
2566 Test bad template with better error message
2606 Test bad template with better error message
2567
2607
2568 $ hg log -Gv -R a --template '{desc|user()}'
2608 $ hg log -Gv -R a --template '{desc|user()}'
2569 hg: parse error: expected a symbol, got 'func'
2609 hg: parse error: expected a symbol, got 'func'
2570 [255]
2610 [255]
2571
2611
2572 Test word function (including index out of bounds graceful failure)
2612 Test word function (including index out of bounds graceful failure)
2573
2613
2574 $ hg log -Gv -R a --template "{word('1', desc)}"
2614 $ hg log -Gv -R a --template "{word('1', desc)}"
2575 @
2615 @
2576 |
2616 |
2577 o
2617 o
2578 |
2618 |
2579 o
2619 o
2580
2620
2581 o
2621 o
2582 |\
2622 |\
2583 | o head
2623 | o head
2584 | |
2624 | |
2585 o | branch
2625 o | branch
2586 |/
2626 |/
2587 o user,
2627 o user,
2588 |
2628 |
2589 o person
2629 o person
2590 |
2630 |
2591 o 1
2631 o 1
2592 |
2632 |
2593 o 1
2633 o 1
2594
2634
2595
2635
2596 Test word third parameter used as splitter
2636 Test word third parameter used as splitter
2597
2637
2598 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
2638 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
2599 @ future
2639 @ future
2600 |
2640 |
2601 o third
2641 o third
2602 |
2642 |
2603 o sec
2643 o sec
2604
2644
2605 o merge
2645 o merge
2606 |\
2646 |\
2607 | o new head
2647 | o new head
2608 | |
2648 | |
2609 o | new branch
2649 o | new branch
2610 |/
2650 |/
2611 o n
2651 o n
2612 |
2652 |
2613 o n
2653 o n
2614 |
2654 |
2615 o
2655 o
2616 |
2656 |
2617 o line 1
2657 o line 1
2618 line 2
2658 line 2
2619
2659
2620 Test word error messages for not enough and too many arguments
2660 Test word error messages for not enough and too many arguments
2621
2661
2622 $ hg log -Gv -R a --template "{word('0')}"
2662 $ hg log -Gv -R a --template "{word('0')}"
2623 hg: parse error: word expects two or three arguments, got 1
2663 hg: parse error: word expects two or three arguments, got 1
2624 [255]
2664 [255]
2625
2665
2626 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
2666 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
2627 hg: parse error: word expects two or three arguments, got 7
2667 hg: parse error: word expects two or three arguments, got 7
2628 [255]
2668 [255]
2629
2669
2630 Test word for invalid numbers
2670 Test word for invalid numbers
2631
2671
2632 $ hg log -Gv -R a --template "{word(2, desc)}"
2672 $ hg log -Gv -R a --template "{word(2, desc)}"
2633 hg: parse error: Use strings like '3' for numbers passed to word function
2673 hg: parse error: Use strings like '3' for numbers passed to word function
2634 [255]
2674 [255]
General Comments 0
You need to be logged in to leave comments. Login now