##// END OF EJS Templates
tests: add test for bad template %include and __base__...
Martin von Zweigbergk -
r45767:4489e9a2 default
parent child Browse files
Show More
@@ -1,1942 +1,1962 b''
1 Test template map files and styles
1 Test template map files and styles
2 ==================================
2 ==================================
3
3
4 $ hg init a
4 $ hg init a
5 $ cd a
5 $ cd a
6 $ echo a > a
6 $ echo a > a
7 $ hg add a
7 $ hg add a
8 $ echo line 1 > b
8 $ echo line 1 > b
9 $ echo line 2 >> b
9 $ echo line 2 >> b
10 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
10 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
11
11
12 $ hg add b
12 $ hg add b
13 $ echo other 1 > c
13 $ echo other 1 > c
14 $ echo other 2 >> c
14 $ echo other 2 >> c
15 $ echo >> c
15 $ echo >> c
16 $ echo other 3 >> c
16 $ echo other 3 >> c
17 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
17 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
18
18
19 $ hg add c
19 $ hg add c
20 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
20 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
21 $ echo c >> c
21 $ echo c >> c
22 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
22 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
23
23
24 $ echo foo > .hg/branch
24 $ echo foo > .hg/branch
25 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
25 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
26
26
27 $ hg co -q 3
27 $ hg co -q 3
28 $ echo other 4 >> d
28 $ echo other 4 >> d
29 $ hg add d
29 $ hg add d
30 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
30 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
31
31
32 $ hg merge -q foo
32 $ hg merge -q foo
33 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
33 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
34
34
35 Second branch starting at nullrev:
35 Second branch starting at nullrev:
36
36
37 $ hg update null
37 $ hg update null
38 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
38 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
39 $ echo second > second
39 $ echo second > second
40 $ hg add second
40 $ hg add second
41 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
41 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
42 created new head
42 created new head
43
43
44 $ echo third > third
44 $ echo third > third
45 $ hg add third
45 $ hg add third
46 $ hg mv second fourth
46 $ hg mv second fourth
47 $ hg commit -m third -d "2020-01-01 10:01"
47 $ hg commit -m third -d "2020-01-01 10:01"
48
48
49 Make sure user/global hgrc does not affect tests
49 Make sure user/global hgrc does not affect tests
50
50
51 $ echo '[ui]' > .hg/hgrc
51 $ echo '[ui]' > .hg/hgrc
52 $ echo 'logtemplate =' >> .hg/hgrc
52 $ echo 'logtemplate =' >> .hg/hgrc
53 $ echo 'style =' >> .hg/hgrc
53 $ echo 'style =' >> .hg/hgrc
54
54
55 Add some simple styles to settings
55 Add some simple styles to settings
56
56
57 $ cat <<'EOF' >> .hg/hgrc
57 $ cat <<'EOF' >> .hg/hgrc
58 > [templates]
58 > [templates]
59 > simple = "{rev}\n"
59 > simple = "{rev}\n"
60 > simple2 = {rev}\n
60 > simple2 = {rev}\n
61 > rev = "should not precede {rev} keyword\n"
61 > rev = "should not precede {rev} keyword\n"
62 > EOF
62 > EOF
63
63
64 $ hg log -l1 -Tsimple
64 $ hg log -l1 -Tsimple
65 8
65 8
66 $ hg log -l1 -Tsimple2
66 $ hg log -l1 -Tsimple2
67 8
67 8
68 $ hg log -l1 -Trev
68 $ hg log -l1 -Trev
69 should not precede 8 keyword
69 should not precede 8 keyword
70 $ hg log -l1 -T '{simple}'
70 $ hg log -l1 -T '{simple}'
71 8
71 8
72
72
73 Map file shouldn't see user templates:
73 Map file shouldn't see user templates:
74
74
75 $ cat <<EOF > tmpl
75 $ cat <<EOF > tmpl
76 > changeset = 'nothing expanded:{simple}\n'
76 > changeset = 'nothing expanded:{simple}\n'
77 > EOF
77 > EOF
78 $ hg log -l1 --style ./tmpl
78 $ hg log -l1 --style ./tmpl
79 nothing expanded:
79 nothing expanded:
80
80
81 Test templates and style maps in files:
81 Test templates and style maps in files:
82
82
83 $ echo "{rev}" > tmpl
83 $ echo "{rev}" > tmpl
84 $ hg log -l1 -T./tmpl
84 $ hg log -l1 -T./tmpl
85 8
85 8
86 $ hg log -l1 -Tblah/blah
86 $ hg log -l1 -Tblah/blah
87 blah/blah (no-eol)
87 blah/blah (no-eol)
88
88
89 $ printf 'changeset = "{rev}\\n"\n' > map-simple
89 $ printf 'changeset = "{rev}\\n"\n' > map-simple
90 $ hg log -l1 -T./map-simple
90 $ hg log -l1 -T./map-simple
91 8
91 8
92
92
93 a map file may have [templates] and [templatealias] sections:
93 a map file may have [templates] and [templatealias] sections:
94
94
95 $ cat <<'EOF' > map-simple
95 $ cat <<'EOF' > map-simple
96 > [templates]
96 > [templates]
97 > changeset = "{a}\n"
97 > changeset = "{a}\n"
98 > [templatealias]
98 > [templatealias]
99 > a = rev
99 > a = rev
100 > EOF
100 > EOF
101 $ hg log -l1 -T./map-simple
101 $ hg log -l1 -T./map-simple
102 8
102 8
103
103
104 so it can be included in hgrc
104 so it can be included in hgrc
105
105
106 $ cat <<EOF > myhgrc
106 $ cat <<EOF > myhgrc
107 > %include $HGRCPATH
107 > %include $HGRCPATH
108 > %include map-simple
108 > %include map-simple
109 > [templates]
109 > [templates]
110 > foo = "{changeset}"
110 > foo = "{changeset}"
111 > EOF
111 > EOF
112 $ HGRCPATH=./myhgrc hg log -l1 -Tfoo
112 $ HGRCPATH=./myhgrc hg log -l1 -Tfoo
113 8
113 8
114 $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n'
114 $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n'
115 8
115 8
116
116
117 Test template map inheritance
117 Test template map inheritance
118
118
119 $ echo "__base__ = map-cmdline.default" > map-simple
119 $ echo "__base__ = map-cmdline.default" > map-simple
120 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
120 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
121 $ hg log -l1 -T./map-simple
121 $ hg log -l1 -T./map-simple
122 changeset: ***8***
122 changeset: ***8***
123 tag: tip
123 tag: tip
124 user: test
124 user: test
125 date: Wed Jan 01 10:01:00 2020 +0000
125 date: Wed Jan 01 10:01:00 2020 +0000
126 summary: third
126 summary: third
127
127
128 Test map inheritance with non-existent base
129
130 $ echo "__base__ = non-existent" > map-base-nonexistent
131 $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
132 $ hg log -l1 -T./map-base-nonexistent
133 abort: style '$TESTTMP/a/non-existent' not found
134 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
135 [255]
136
128 Test including a built-in template map
137 Test including a built-in template map
129
138
130 $ cat <<'EOF' > map-include-builtin
139 $ cat <<'EOF' > map-include-builtin
131 > %include map-cmdline.default
140 > %include map-cmdline.default
132 > [templates]
141 > [templates]
133 > changeset = "{changeset_quiet}\n"
142 > changeset = "{changeset_quiet}\n"
134 > EOF
143 > EOF
135 $ hg log -l1 -T./map-include-builtin
144 $ hg log -l1 -T./map-include-builtin
136 8:95c24699272e
145 8:95c24699272e
137
146
138
147
148 Test including a nonexistent template map
149 BROKEN: This should probably be an error just like the bad __base__ above
150
151 $ cat <<'EOF' > map-include-nonexistent
152 > %include nonexistent
153 > [templates]
154 > changeset = "test\n"
155 > EOF
156 $ hg log -l1 -T./map-include-nonexistent
157 test
158
139 Test docheader, docfooter and separator in template map
159 Test docheader, docfooter and separator in template map
140
160
141 $ cat <<'EOF' > map-myjson
161 $ cat <<'EOF' > map-myjson
142 > docheader = '\{\n'
162 > docheader = '\{\n'
143 > docfooter = '\n}\n'
163 > docfooter = '\n}\n'
144 > separator = ',\n'
164 > separator = ',\n'
145 > changeset = ' {dict(rev, node|short)|json}'
165 > changeset = ' {dict(rev, node|short)|json}'
146 > EOF
166 > EOF
147 $ hg log -l2 -T./map-myjson
167 $ hg log -l2 -T./map-myjson
148 {
168 {
149 {"node": "95c24699272e", "rev": 8},
169 {"node": "95c24699272e", "rev": 8},
150 {"node": "29114dbae42b", "rev": 7}
170 {"node": "29114dbae42b", "rev": 7}
151 }
171 }
152
172
153 Test docheader, docfooter and separator in [templates] section
173 Test docheader, docfooter and separator in [templates] section
154
174
155 $ cat <<'EOF' >> .hg/hgrc
175 $ cat <<'EOF' >> .hg/hgrc
156 > [templates]
176 > [templates]
157 > myjson = ' {dict(rev, node|short)|json}'
177 > myjson = ' {dict(rev, node|short)|json}'
158 > myjson:docheader = '\{\n'
178 > myjson:docheader = '\{\n'
159 > myjson:docfooter = '\n}\n'
179 > myjson:docfooter = '\n}\n'
160 > myjson:separator = ',\n'
180 > myjson:separator = ',\n'
161 > :docheader = 'should not be selected as a docheader for literal templates\n'
181 > :docheader = 'should not be selected as a docheader for literal templates\n'
162 > EOF
182 > EOF
163 $ hg log -l2 -Tmyjson
183 $ hg log -l2 -Tmyjson
164 {
184 {
165 {"node": "95c24699272e", "rev": 8},
185 {"node": "95c24699272e", "rev": 8},
166 {"node": "29114dbae42b", "rev": 7}
186 {"node": "29114dbae42b", "rev": 7}
167 }
187 }
168 $ hg log -l1 -T'{rev}\n'
188 $ hg log -l1 -T'{rev}\n'
169 8
189 8
170
190
171 Template should precede style option
191 Template should precede style option
172
192
173 $ hg log -l1 --style default -T '{rev}\n'
193 $ hg log -l1 --style default -T '{rev}\n'
174 8
194 8
175
195
176 Add a commit with empty description, to ensure that the templates
196 Add a commit with empty description, to ensure that the templates
177 below will omit the description line.
197 below will omit the description line.
178
198
179 $ echo c >> c
199 $ echo c >> c
180 $ hg add c
200 $ hg add c
181 $ hg commit -qm ' '
201 $ hg commit -qm ' '
182
202
183 Default style is like normal output. Phases style should be the same
203 Default style is like normal output. Phases style should be the same
184 as default style, except for extra phase lines.
204 as default style, except for extra phase lines.
185
205
186 $ hg log > log.out
206 $ hg log > log.out
187 $ hg log --style default > style.out
207 $ hg log --style default > style.out
188 $ cmp log.out style.out || diff -u log.out style.out
208 $ cmp log.out style.out || diff -u log.out style.out
189 $ hg log -T phases > phases.out
209 $ hg log -T phases > phases.out
190 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
210 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
191 +phase: draft
211 +phase: draft
192 +phase: draft
212 +phase: draft
193 +phase: draft
213 +phase: draft
194 +phase: draft
214 +phase: draft
195 +phase: draft
215 +phase: draft
196 +phase: draft
216 +phase: draft
197 +phase: draft
217 +phase: draft
198 +phase: draft
218 +phase: draft
199 +phase: draft
219 +phase: draft
200 +phase: draft
220 +phase: draft
201
221
202 $ hg log -v > log.out
222 $ hg log -v > log.out
203 $ hg log -v --style default > style.out
223 $ hg log -v --style default > style.out
204 $ cmp log.out style.out || diff -u log.out style.out
224 $ cmp log.out style.out || diff -u log.out style.out
205 $ hg log -v -T phases > phases.out
225 $ hg log -v -T phases > phases.out
206 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
226 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
207 +phase: draft
227 +phase: draft
208 +phase: draft
228 +phase: draft
209 +phase: draft
229 +phase: draft
210 +phase: draft
230 +phase: draft
211 +phase: draft
231 +phase: draft
212 +phase: draft
232 +phase: draft
213 +phase: draft
233 +phase: draft
214 +phase: draft
234 +phase: draft
215 +phase: draft
235 +phase: draft
216 +phase: draft
236 +phase: draft
217
237
218 $ hg log -q > log.out
238 $ hg log -q > log.out
219 $ hg log -q --style default > style.out
239 $ hg log -q --style default > style.out
220 $ cmp log.out style.out || diff -u log.out style.out
240 $ cmp log.out style.out || diff -u log.out style.out
221 $ hg log -q -T phases > phases.out
241 $ hg log -q -T phases > phases.out
222 $ cmp log.out phases.out || diff -u log.out phases.out
242 $ cmp log.out phases.out || diff -u log.out phases.out
223
243
224 $ hg log --debug > log.out
244 $ hg log --debug > log.out
225 $ hg log --debug --style default > style.out
245 $ hg log --debug --style default > style.out
226 $ cmp log.out style.out || diff -u log.out style.out
246 $ cmp log.out style.out || diff -u log.out style.out
227 $ hg log --debug -T phases > phases.out
247 $ hg log --debug -T phases > phases.out
228 $ cmp log.out phases.out || diff -u log.out phases.out
248 $ cmp log.out phases.out || diff -u log.out phases.out
229
249
230 Default style of working-directory revision should also be the same (but
250 Default style of working-directory revision should also be the same (but
231 date may change while running tests):
251 date may change while running tests):
232
252
233 $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
253 $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
234 $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
254 $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
235 $ cmp log.out style.out || diff -u log.out style.out
255 $ cmp log.out style.out || diff -u log.out style.out
236
256
237 $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
257 $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
238 $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
258 $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
239 $ cmp log.out style.out || diff -u log.out style.out
259 $ cmp log.out style.out || diff -u log.out style.out
240
260
241 $ hg log -r 'wdir()' -q > log.out
261 $ hg log -r 'wdir()' -q > log.out
242 $ hg log -r 'wdir()' -q --style default > style.out
262 $ hg log -r 'wdir()' -q --style default > style.out
243 $ cmp log.out style.out || diff -u log.out style.out
263 $ cmp log.out style.out || diff -u log.out style.out
244
264
245 $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
265 $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
246 $ hg log -r 'wdir()' --debug --style default \
266 $ hg log -r 'wdir()' --debug --style default \
247 > | sed 's|^date:.*|date:|' > style.out
267 > | sed 's|^date:.*|date:|' > style.out
248 $ cmp log.out style.out || diff -u log.out style.out
268 $ cmp log.out style.out || diff -u log.out style.out
249
269
250 Default style should also preserve color information (issue2866):
270 Default style should also preserve color information (issue2866):
251
271
252 $ cp $HGRCPATH $HGRCPATH-bak
272 $ cp $HGRCPATH $HGRCPATH-bak
253 $ cat <<EOF >> $HGRCPATH
273 $ cat <<EOF >> $HGRCPATH
254 > [extensions]
274 > [extensions]
255 > color=
275 > color=
256 > EOF
276 > EOF
257
277
258 $ hg --color=debug log > log.out
278 $ hg --color=debug log > log.out
259 $ hg --color=debug log --style default > style.out
279 $ hg --color=debug log --style default > style.out
260 $ cmp log.out style.out || diff -u log.out style.out
280 $ cmp log.out style.out || diff -u log.out style.out
261 $ hg --color=debug log -T phases > phases.out
281 $ hg --color=debug log -T phases > phases.out
262 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
282 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
263 +[log.phase|phase: draft]
283 +[log.phase|phase: draft]
264 +[log.phase|phase: draft]
284 +[log.phase|phase: draft]
265 +[log.phase|phase: draft]
285 +[log.phase|phase: draft]
266 +[log.phase|phase: draft]
286 +[log.phase|phase: draft]
267 +[log.phase|phase: draft]
287 +[log.phase|phase: draft]
268 +[log.phase|phase: draft]
288 +[log.phase|phase: draft]
269 +[log.phase|phase: draft]
289 +[log.phase|phase: draft]
270 +[log.phase|phase: draft]
290 +[log.phase|phase: draft]
271 +[log.phase|phase: draft]
291 +[log.phase|phase: draft]
272 +[log.phase|phase: draft]
292 +[log.phase|phase: draft]
273
293
274 $ hg --color=debug -v log > log.out
294 $ hg --color=debug -v log > log.out
275 $ hg --color=debug -v log --style default > style.out
295 $ hg --color=debug -v log --style default > style.out
276 $ cmp log.out style.out || diff -u log.out style.out
296 $ cmp log.out style.out || diff -u log.out style.out
277 $ hg --color=debug -v log -T phases > phases.out
297 $ hg --color=debug -v log -T phases > phases.out
278 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
298 $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
279 +[log.phase|phase: draft]
299 +[log.phase|phase: draft]
280 +[log.phase|phase: draft]
300 +[log.phase|phase: draft]
281 +[log.phase|phase: draft]
301 +[log.phase|phase: draft]
282 +[log.phase|phase: draft]
302 +[log.phase|phase: draft]
283 +[log.phase|phase: draft]
303 +[log.phase|phase: draft]
284 +[log.phase|phase: draft]
304 +[log.phase|phase: draft]
285 +[log.phase|phase: draft]
305 +[log.phase|phase: draft]
286 +[log.phase|phase: draft]
306 +[log.phase|phase: draft]
287 +[log.phase|phase: draft]
307 +[log.phase|phase: draft]
288 +[log.phase|phase: draft]
308 +[log.phase|phase: draft]
289
309
290 $ hg --color=debug -q log > log.out
310 $ hg --color=debug -q log > log.out
291 $ hg --color=debug -q log --style default > style.out
311 $ hg --color=debug -q log --style default > style.out
292 $ cmp log.out style.out || diff -u log.out style.out
312 $ cmp log.out style.out || diff -u log.out style.out
293 $ hg --color=debug -q log -T phases > phases.out
313 $ hg --color=debug -q log -T phases > phases.out
294 $ cmp log.out phases.out || diff -u log.out phases.out
314 $ cmp log.out phases.out || diff -u log.out phases.out
295
315
296 $ hg --color=debug --debug log > log.out
316 $ hg --color=debug --debug log > log.out
297 $ hg --color=debug --debug log --style default > style.out
317 $ hg --color=debug --debug log --style default > style.out
298 $ cmp log.out style.out || diff -u log.out style.out
318 $ cmp log.out style.out || diff -u log.out style.out
299 $ hg --color=debug --debug log -T phases > phases.out
319 $ hg --color=debug --debug log -T phases > phases.out
300 $ cmp log.out phases.out || diff -u log.out phases.out
320 $ cmp log.out phases.out || diff -u log.out phases.out
301
321
302 $ mv $HGRCPATH-bak $HGRCPATH
322 $ mv $HGRCPATH-bak $HGRCPATH
303
323
304 Remove commit with empty commit message, so as to not pollute further
324 Remove commit with empty commit message, so as to not pollute further
305 tests.
325 tests.
306
326
307 $ hg --config extensions.strip= strip -q .
327 $ hg --config extensions.strip= strip -q .
308
328
309 Revision with no copies (used to print a traceback):
329 Revision with no copies (used to print a traceback):
310
330
311 $ hg tip -v --template '\n'
331 $ hg tip -v --template '\n'
312
332
313
333
314 Compact style works:
334 Compact style works:
315
335
316 $ hg log -Tcompact
336 $ hg log -Tcompact
317 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
337 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
318 third
338 third
319
339
320 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
340 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
321 second
341 second
322
342
323 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
343 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
324 merge
344 merge
325
345
326 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
346 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
327 new head
347 new head
328
348
329 4 bbe44766e73d 1970-01-17 04:53 +0000 person
349 4 bbe44766e73d 1970-01-17 04:53 +0000 person
330 new branch
350 new branch
331
351
332 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
352 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
333 no user, no domain
353 no user, no domain
334
354
335 2 97054abb4ab8 1970-01-14 21:20 +0000 other
355 2 97054abb4ab8 1970-01-14 21:20 +0000 other
336 no person
356 no person
337
357
338 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
358 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
339 other 1
359 other 1
340
360
341 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
361 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
342 line 1
362 line 1
343
363
344
364
345 $ hg log -v --style compact
365 $ hg log -v --style compact
346 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
366 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
347 third
367 third
348
368
349 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
369 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
350 second
370 second
351
371
352 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
372 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
353 merge
373 merge
354
374
355 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
375 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
356 new head
376 new head
357
377
358 4 bbe44766e73d 1970-01-17 04:53 +0000 person
378 4 bbe44766e73d 1970-01-17 04:53 +0000 person
359 new branch
379 new branch
360
380
361 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
381 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
362 no user, no domain
382 no user, no domain
363
383
364 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
384 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
365 no person
385 no person
366
386
367 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
387 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
368 other 1
388 other 1
369 other 2
389 other 2
370
390
371 other 3
391 other 3
372
392
373 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
393 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
374 line 1
394 line 1
375 line 2
395 line 2
376
396
377
397
378 $ hg log --debug --style compact
398 $ hg log --debug --style compact
379 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
399 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
380 third
400 third
381
401
382 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
402 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
383 second
403 second
384
404
385 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
405 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
386 merge
406 merge
387
407
388 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
408 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
389 new head
409 new head
390
410
391 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
411 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
392 new branch
412 new branch
393
413
394 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
414 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
395 no user, no domain
415 no user, no domain
396
416
397 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
417 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
398 no person
418 no person
399
419
400 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
420 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
401 other 1
421 other 1
402 other 2
422 other 2
403
423
404 other 3
424 other 3
405
425
406 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
426 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
407 line 1
427 line 1
408 line 2
428 line 2
409
429
410
430
411 Test xml styles:
431 Test xml styles:
412
432
413 $ hg log --style xml -r 'not all()'
433 $ hg log --style xml -r 'not all()'
414 <?xml version="1.0"?>
434 <?xml version="1.0"?>
415 <log>
435 <log>
416 </log>
436 </log>
417
437
418 $ hg log --style xml
438 $ hg log --style xml
419 <?xml version="1.0"?>
439 <?xml version="1.0"?>
420 <log>
440 <log>
421 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
441 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
422 <tag>tip</tag>
442 <tag>tip</tag>
423 <author email="test">test</author>
443 <author email="test">test</author>
424 <date>2020-01-01T10:01:00+00:00</date>
444 <date>2020-01-01T10:01:00+00:00</date>
425 <msg xml:space="preserve">third</msg>
445 <msg xml:space="preserve">third</msg>
426 </logentry>
446 </logentry>
427 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
447 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
428 <parent revision="-1" node="0000000000000000000000000000000000000000" />
448 <parent revision="-1" node="0000000000000000000000000000000000000000" />
429 <author email="user@hostname">User Name</author>
449 <author email="user@hostname">User Name</author>
430 <date>1970-01-12T13:46:40+00:00</date>
450 <date>1970-01-12T13:46:40+00:00</date>
431 <msg xml:space="preserve">second</msg>
451 <msg xml:space="preserve">second</msg>
432 </logentry>
452 </logentry>
433 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
453 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
434 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
454 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
435 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
455 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
436 <author email="person">person</author>
456 <author email="person">person</author>
437 <date>1970-01-18T08:40:01+00:00</date>
457 <date>1970-01-18T08:40:01+00:00</date>
438 <msg xml:space="preserve">merge</msg>
458 <msg xml:space="preserve">merge</msg>
439 </logentry>
459 </logentry>
440 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
460 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
441 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
461 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
442 <author email="person">person</author>
462 <author email="person">person</author>
443 <date>1970-01-18T08:40:00+00:00</date>
463 <date>1970-01-18T08:40:00+00:00</date>
444 <msg xml:space="preserve">new head</msg>
464 <msg xml:space="preserve">new head</msg>
445 </logentry>
465 </logentry>
446 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
466 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
447 <branch>foo</branch>
467 <branch>foo</branch>
448 <author email="person">person</author>
468 <author email="person">person</author>
449 <date>1970-01-17T04:53:20+00:00</date>
469 <date>1970-01-17T04:53:20+00:00</date>
450 <msg xml:space="preserve">new branch</msg>
470 <msg xml:space="preserve">new branch</msg>
451 </logentry>
471 </logentry>
452 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
472 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
453 <author email="person">person</author>
473 <author email="person">person</author>
454 <date>1970-01-16T01:06:40+00:00</date>
474 <date>1970-01-16T01:06:40+00:00</date>
455 <msg xml:space="preserve">no user, no domain</msg>
475 <msg xml:space="preserve">no user, no domain</msg>
456 </logentry>
476 </logentry>
457 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
477 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
458 <author email="other@place">other</author>
478 <author email="other@place">other</author>
459 <date>1970-01-14T21:20:00+00:00</date>
479 <date>1970-01-14T21:20:00+00:00</date>
460 <msg xml:space="preserve">no person</msg>
480 <msg xml:space="preserve">no person</msg>
461 </logentry>
481 </logentry>
462 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
482 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
463 <author email="other@place">A. N. Other</author>
483 <author email="other@place">A. N. Other</author>
464 <date>1970-01-13T17:33:20+00:00</date>
484 <date>1970-01-13T17:33:20+00:00</date>
465 <msg xml:space="preserve">other 1
485 <msg xml:space="preserve">other 1
466 other 2
486 other 2
467
487
468 other 3</msg>
488 other 3</msg>
469 </logentry>
489 </logentry>
470 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
490 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
471 <author email="user@hostname">User Name</author>
491 <author email="user@hostname">User Name</author>
472 <date>1970-01-12T13:46:40+00:00</date>
492 <date>1970-01-12T13:46:40+00:00</date>
473 <msg xml:space="preserve">line 1
493 <msg xml:space="preserve">line 1
474 line 2</msg>
494 line 2</msg>
475 </logentry>
495 </logentry>
476 </log>
496 </log>
477
497
478 $ hg log -v --style xml
498 $ hg log -v --style xml
479 <?xml version="1.0"?>
499 <?xml version="1.0"?>
480 <log>
500 <log>
481 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
501 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
482 <tag>tip</tag>
502 <tag>tip</tag>
483 <author email="test">test</author>
503 <author email="test">test</author>
484 <date>2020-01-01T10:01:00+00:00</date>
504 <date>2020-01-01T10:01:00+00:00</date>
485 <msg xml:space="preserve">third</msg>
505 <msg xml:space="preserve">third</msg>
486 <paths>
506 <paths>
487 <path action="A">fourth</path>
507 <path action="A">fourth</path>
488 <path action="A">third</path>
508 <path action="A">third</path>
489 <path action="R">second</path>
509 <path action="R">second</path>
490 </paths>
510 </paths>
491 <copies>
511 <copies>
492 <copy source="second">fourth</copy>
512 <copy source="second">fourth</copy>
493 </copies>
513 </copies>
494 </logentry>
514 </logentry>
495 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
515 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
496 <parent revision="-1" node="0000000000000000000000000000000000000000" />
516 <parent revision="-1" node="0000000000000000000000000000000000000000" />
497 <author email="user@hostname">User Name</author>
517 <author email="user@hostname">User Name</author>
498 <date>1970-01-12T13:46:40+00:00</date>
518 <date>1970-01-12T13:46:40+00:00</date>
499 <msg xml:space="preserve">second</msg>
519 <msg xml:space="preserve">second</msg>
500 <paths>
520 <paths>
501 <path action="A">second</path>
521 <path action="A">second</path>
502 </paths>
522 </paths>
503 </logentry>
523 </logentry>
504 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
524 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
505 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
525 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
506 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
526 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
507 <author email="person">person</author>
527 <author email="person">person</author>
508 <date>1970-01-18T08:40:01+00:00</date>
528 <date>1970-01-18T08:40:01+00:00</date>
509 <msg xml:space="preserve">merge</msg>
529 <msg xml:space="preserve">merge</msg>
510 <paths>
530 <paths>
511 </paths>
531 </paths>
512 </logentry>
532 </logentry>
513 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
533 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
514 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
534 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
515 <author email="person">person</author>
535 <author email="person">person</author>
516 <date>1970-01-18T08:40:00+00:00</date>
536 <date>1970-01-18T08:40:00+00:00</date>
517 <msg xml:space="preserve">new head</msg>
537 <msg xml:space="preserve">new head</msg>
518 <paths>
538 <paths>
519 <path action="A">d</path>
539 <path action="A">d</path>
520 </paths>
540 </paths>
521 </logentry>
541 </logentry>
522 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
542 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
523 <branch>foo</branch>
543 <branch>foo</branch>
524 <author email="person">person</author>
544 <author email="person">person</author>
525 <date>1970-01-17T04:53:20+00:00</date>
545 <date>1970-01-17T04:53:20+00:00</date>
526 <msg xml:space="preserve">new branch</msg>
546 <msg xml:space="preserve">new branch</msg>
527 <paths>
547 <paths>
528 </paths>
548 </paths>
529 </logentry>
549 </logentry>
530 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
550 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
531 <author email="person">person</author>
551 <author email="person">person</author>
532 <date>1970-01-16T01:06:40+00:00</date>
552 <date>1970-01-16T01:06:40+00:00</date>
533 <msg xml:space="preserve">no user, no domain</msg>
553 <msg xml:space="preserve">no user, no domain</msg>
534 <paths>
554 <paths>
535 <path action="M">c</path>
555 <path action="M">c</path>
536 </paths>
556 </paths>
537 </logentry>
557 </logentry>
538 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
558 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
539 <author email="other@place">other</author>
559 <author email="other@place">other</author>
540 <date>1970-01-14T21:20:00+00:00</date>
560 <date>1970-01-14T21:20:00+00:00</date>
541 <msg xml:space="preserve">no person</msg>
561 <msg xml:space="preserve">no person</msg>
542 <paths>
562 <paths>
543 <path action="A">c</path>
563 <path action="A">c</path>
544 </paths>
564 </paths>
545 </logentry>
565 </logentry>
546 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
566 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
547 <author email="other@place">A. N. Other</author>
567 <author email="other@place">A. N. Other</author>
548 <date>1970-01-13T17:33:20+00:00</date>
568 <date>1970-01-13T17:33:20+00:00</date>
549 <msg xml:space="preserve">other 1
569 <msg xml:space="preserve">other 1
550 other 2
570 other 2
551
571
552 other 3</msg>
572 other 3</msg>
553 <paths>
573 <paths>
554 <path action="A">b</path>
574 <path action="A">b</path>
555 </paths>
575 </paths>
556 </logentry>
576 </logentry>
557 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
577 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
558 <author email="user@hostname">User Name</author>
578 <author email="user@hostname">User Name</author>
559 <date>1970-01-12T13:46:40+00:00</date>
579 <date>1970-01-12T13:46:40+00:00</date>
560 <msg xml:space="preserve">line 1
580 <msg xml:space="preserve">line 1
561 line 2</msg>
581 line 2</msg>
562 <paths>
582 <paths>
563 <path action="A">a</path>
583 <path action="A">a</path>
564 </paths>
584 </paths>
565 </logentry>
585 </logentry>
566 </log>
586 </log>
567
587
568 $ hg log --debug --style xml
588 $ hg log --debug --style xml
569 <?xml version="1.0"?>
589 <?xml version="1.0"?>
570 <log>
590 <log>
571 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
591 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
572 <tag>tip</tag>
592 <tag>tip</tag>
573 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
593 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
574 <parent revision="-1" node="0000000000000000000000000000000000000000" />
594 <parent revision="-1" node="0000000000000000000000000000000000000000" />
575 <author email="test">test</author>
595 <author email="test">test</author>
576 <date>2020-01-01T10:01:00+00:00</date>
596 <date>2020-01-01T10:01:00+00:00</date>
577 <msg xml:space="preserve">third</msg>
597 <msg xml:space="preserve">third</msg>
578 <paths>
598 <paths>
579 <path action="A">fourth</path>
599 <path action="A">fourth</path>
580 <path action="A">third</path>
600 <path action="A">third</path>
581 <path action="R">second</path>
601 <path action="R">second</path>
582 </paths>
602 </paths>
583 <copies>
603 <copies>
584 <copy source="second">fourth</copy>
604 <copy source="second">fourth</copy>
585 </copies>
605 </copies>
586 <extra key="branch">default</extra>
606 <extra key="branch">default</extra>
587 </logentry>
607 </logentry>
588 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
608 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
589 <parent revision="-1" node="0000000000000000000000000000000000000000" />
609 <parent revision="-1" node="0000000000000000000000000000000000000000" />
590 <parent revision="-1" node="0000000000000000000000000000000000000000" />
610 <parent revision="-1" node="0000000000000000000000000000000000000000" />
591 <author email="user@hostname">User Name</author>
611 <author email="user@hostname">User Name</author>
592 <date>1970-01-12T13:46:40+00:00</date>
612 <date>1970-01-12T13:46:40+00:00</date>
593 <msg xml:space="preserve">second</msg>
613 <msg xml:space="preserve">second</msg>
594 <paths>
614 <paths>
595 <path action="A">second</path>
615 <path action="A">second</path>
596 </paths>
616 </paths>
597 <extra key="branch">default</extra>
617 <extra key="branch">default</extra>
598 </logentry>
618 </logentry>
599 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
619 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
600 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
620 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
601 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
621 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
602 <author email="person">person</author>
622 <author email="person">person</author>
603 <date>1970-01-18T08:40:01+00:00</date>
623 <date>1970-01-18T08:40:01+00:00</date>
604 <msg xml:space="preserve">merge</msg>
624 <msg xml:space="preserve">merge</msg>
605 <paths>
625 <paths>
606 </paths>
626 </paths>
607 <extra key="branch">default</extra>
627 <extra key="branch">default</extra>
608 </logentry>
628 </logentry>
609 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
629 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
610 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
630 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
611 <parent revision="-1" node="0000000000000000000000000000000000000000" />
631 <parent revision="-1" node="0000000000000000000000000000000000000000" />
612 <author email="person">person</author>
632 <author email="person">person</author>
613 <date>1970-01-18T08:40:00+00:00</date>
633 <date>1970-01-18T08:40:00+00:00</date>
614 <msg xml:space="preserve">new head</msg>
634 <msg xml:space="preserve">new head</msg>
615 <paths>
635 <paths>
616 <path action="A">d</path>
636 <path action="A">d</path>
617 </paths>
637 </paths>
618 <extra key="branch">default</extra>
638 <extra key="branch">default</extra>
619 </logentry>
639 </logentry>
620 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
640 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
621 <branch>foo</branch>
641 <branch>foo</branch>
622 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
642 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
623 <parent revision="-1" node="0000000000000000000000000000000000000000" />
643 <parent revision="-1" node="0000000000000000000000000000000000000000" />
624 <author email="person">person</author>
644 <author email="person">person</author>
625 <date>1970-01-17T04:53:20+00:00</date>
645 <date>1970-01-17T04:53:20+00:00</date>
626 <msg xml:space="preserve">new branch</msg>
646 <msg xml:space="preserve">new branch</msg>
627 <paths>
647 <paths>
628 </paths>
648 </paths>
629 <extra key="branch">foo</extra>
649 <extra key="branch">foo</extra>
630 </logentry>
650 </logentry>
631 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
651 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
632 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
652 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
633 <parent revision="-1" node="0000000000000000000000000000000000000000" />
653 <parent revision="-1" node="0000000000000000000000000000000000000000" />
634 <author email="person">person</author>
654 <author email="person">person</author>
635 <date>1970-01-16T01:06:40+00:00</date>
655 <date>1970-01-16T01:06:40+00:00</date>
636 <msg xml:space="preserve">no user, no domain</msg>
656 <msg xml:space="preserve">no user, no domain</msg>
637 <paths>
657 <paths>
638 <path action="M">c</path>
658 <path action="M">c</path>
639 </paths>
659 </paths>
640 <extra key="branch">default</extra>
660 <extra key="branch">default</extra>
641 </logentry>
661 </logentry>
642 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
662 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
643 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
663 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
644 <parent revision="-1" node="0000000000000000000000000000000000000000" />
664 <parent revision="-1" node="0000000000000000000000000000000000000000" />
645 <author email="other@place">other</author>
665 <author email="other@place">other</author>
646 <date>1970-01-14T21:20:00+00:00</date>
666 <date>1970-01-14T21:20:00+00:00</date>
647 <msg xml:space="preserve">no person</msg>
667 <msg xml:space="preserve">no person</msg>
648 <paths>
668 <paths>
649 <path action="A">c</path>
669 <path action="A">c</path>
650 </paths>
670 </paths>
651 <extra key="branch">default</extra>
671 <extra key="branch">default</extra>
652 </logentry>
672 </logentry>
653 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
673 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
654 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
674 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
655 <parent revision="-1" node="0000000000000000000000000000000000000000" />
675 <parent revision="-1" node="0000000000000000000000000000000000000000" />
656 <author email="other@place">A. N. Other</author>
676 <author email="other@place">A. N. Other</author>
657 <date>1970-01-13T17:33:20+00:00</date>
677 <date>1970-01-13T17:33:20+00:00</date>
658 <msg xml:space="preserve">other 1
678 <msg xml:space="preserve">other 1
659 other 2
679 other 2
660
680
661 other 3</msg>
681 other 3</msg>
662 <paths>
682 <paths>
663 <path action="A">b</path>
683 <path action="A">b</path>
664 </paths>
684 </paths>
665 <extra key="branch">default</extra>
685 <extra key="branch">default</extra>
666 </logentry>
686 </logentry>
667 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
687 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
668 <parent revision="-1" node="0000000000000000000000000000000000000000" />
688 <parent revision="-1" node="0000000000000000000000000000000000000000" />
669 <parent revision="-1" node="0000000000000000000000000000000000000000" />
689 <parent revision="-1" node="0000000000000000000000000000000000000000" />
670 <author email="user@hostname">User Name</author>
690 <author email="user@hostname">User Name</author>
671 <date>1970-01-12T13:46:40+00:00</date>
691 <date>1970-01-12T13:46:40+00:00</date>
672 <msg xml:space="preserve">line 1
692 <msg xml:space="preserve">line 1
673 line 2</msg>
693 line 2</msg>
674 <paths>
694 <paths>
675 <path action="A">a</path>
695 <path action="A">a</path>
676 </paths>
696 </paths>
677 <extra key="branch">default</extra>
697 <extra key="branch">default</extra>
678 </logentry>
698 </logentry>
679 </log>
699 </log>
680
700
681
701
682 test CBOR style:
702 test CBOR style:
683
703
684 $ cat <<'EOF' > "$TESTTMP/decodecborarray.py"
704 $ cat <<'EOF' > "$TESTTMP/decodecborarray.py"
685 > from __future__ import absolute_import
705 > from __future__ import absolute_import
686 > from mercurial import (
706 > from mercurial import (
687 > dispatch,
707 > dispatch,
688 > )
708 > )
689 > from mercurial.utils import (
709 > from mercurial.utils import (
690 > cborutil,
710 > cborutil,
691 > procutil,
711 > procutil,
692 > stringutil,
712 > stringutil,
693 > )
713 > )
694 > dispatch.initstdio()
714 > dispatch.initstdio()
695 > data = procutil.stdin.read()
715 > data = procutil.stdin.read()
696 > # our CBOR decoder doesn't support parsing indefinite-length arrays,
716 > # our CBOR decoder doesn't support parsing indefinite-length arrays,
697 > # but the log output is indefinite stream by nature.
717 > # but the log output is indefinite stream by nature.
698 > assert data[:1] == cborutil.BEGIN_INDEFINITE_ARRAY
718 > assert data[:1] == cborutil.BEGIN_INDEFINITE_ARRAY
699 > assert data[-1:] == cborutil.BREAK
719 > assert data[-1:] == cborutil.BREAK
700 > items = cborutil.decodeall(data[1:-1])
720 > items = cborutil.decodeall(data[1:-1])
701 > procutil.stdout.write(stringutil.pprint(items, indent=1) + b'\n')
721 > procutil.stdout.write(stringutil.pprint(items, indent=1) + b'\n')
702 > EOF
722 > EOF
703
723
704 $ hg log -k nosuch -Tcbor | "$PYTHON" "$TESTTMP/decodecborarray.py"
724 $ hg log -k nosuch -Tcbor | "$PYTHON" "$TESTTMP/decodecborarray.py"
705 []
725 []
706
726
707 $ hg log -qr0:1 -Tcbor | "$PYTHON" "$TESTTMP/decodecborarray.py"
727 $ hg log -qr0:1 -Tcbor | "$PYTHON" "$TESTTMP/decodecborarray.py"
708 [
728 [
709 {
729 {
710 'node': '1e4e1b8f71e05681d422154f5421e385fec3454f',
730 'node': '1e4e1b8f71e05681d422154f5421e385fec3454f',
711 'rev': 0
731 'rev': 0
712 },
732 },
713 {
733 {
714 'node': 'b608e9d1a3f0273ccf70fb85fd6866b3482bf965',
734 'node': 'b608e9d1a3f0273ccf70fb85fd6866b3482bf965',
715 'rev': 1
735 'rev': 1
716 }
736 }
717 ]
737 ]
718
738
719 $ hg log -vpr . -Tcbor --stat | "$PYTHON" "$TESTTMP/decodecborarray.py"
739 $ hg log -vpr . -Tcbor --stat | "$PYTHON" "$TESTTMP/decodecborarray.py"
720 [
740 [
721 {
741 {
722 'bookmarks': [],
742 'bookmarks': [],
723 'branch': 'default',
743 'branch': 'default',
724 'date': [
744 'date': [
725 1577872860,
745 1577872860,
726 0
746 0
727 ],
747 ],
728 'desc': 'third',
748 'desc': 'third',
729 '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',
749 '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',
730 'diffstat': ' fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n',
750 'diffstat': ' fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n',
731 'files': [
751 'files': [
732 'fourth',
752 'fourth',
733 'second',
753 'second',
734 'third'
754 'third'
735 ],
755 ],
736 'node': '95c24699272ef57d062b8bccc32c878bf841784a',
756 'node': '95c24699272ef57d062b8bccc32c878bf841784a',
737 'parents': [
757 'parents': [
738 '29114dbae42b9f078cf2714dbe3a86bba8ec7453'
758 '29114dbae42b9f078cf2714dbe3a86bba8ec7453'
739 ],
759 ],
740 'phase': 'draft',
760 'phase': 'draft',
741 'rev': 8,
761 'rev': 8,
742 'tags': [
762 'tags': [
743 'tip'
763 'tip'
744 ],
764 ],
745 'user': 'test'
765 'user': 'test'
746 }
766 }
747 ]
767 ]
748
768
749 $ hg log -r . -T'cbor(rev, node|short)' | "$PYTHON" "$TESTTMP/decodecborarray.py"
769 $ hg log -r . -T'cbor(rev, node|short)' | "$PYTHON" "$TESTTMP/decodecborarray.py"
750 [
770 [
751 {
771 {
752 'node': '95c24699272e',
772 'node': '95c24699272e',
753 'rev': 8
773 'rev': 8
754 }
774 }
755 ]
775 ]
756
776
757 $ hg log -r . -T'cbor()' | "$PYTHON" "$TESTTMP/decodecborarray.py"
777 $ hg log -r . -T'cbor()' | "$PYTHON" "$TESTTMP/decodecborarray.py"
758 [
778 [
759 {}
779 {}
760 ]
780 ]
761
781
762 Test JSON style:
782 Test JSON style:
763
783
764 $ hg log -k nosuch -Tjson
784 $ hg log -k nosuch -Tjson
765 [
785 [
766 ]
786 ]
767
787
768 $ hg log -qr . -Tjson
788 $ hg log -qr . -Tjson
769 [
789 [
770 {
790 {
771 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
791 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
772 "rev": 8
792 "rev": 8
773 }
793 }
774 ]
794 ]
775
795
776 $ hg log -vpr . -Tjson --stat
796 $ hg log -vpr . -Tjson --stat
777 [
797 [
778 {
798 {
779 "bookmarks": [],
799 "bookmarks": [],
780 "branch": "default",
800 "branch": "default",
781 "date": [1577872860, 0],
801 "date": [1577872860, 0],
782 "desc": "third",
802 "desc": "third",
783 "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",
803 "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n",
784 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
804 "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
785 "files": ["fourth", "second", "third"],
805 "files": ["fourth", "second", "third"],
786 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
806 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
787 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
807 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
788 "phase": "draft",
808 "phase": "draft",
789 "rev": 8,
809 "rev": 8,
790 "tags": ["tip"],
810 "tags": ["tip"],
791 "user": "test"
811 "user": "test"
792 }
812 }
793 ]
813 ]
794
814
795 honor --git but not format-breaking diffopts
815 honor --git but not format-breaking diffopts
796 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
816 $ hg --config diff.noprefix=True log --git -vpr . -Tjson
797 [
817 [
798 {
818 {
799 "bookmarks": [],
819 "bookmarks": [],
800 "branch": "default",
820 "branch": "default",
801 "date": [1577872860, 0],
821 "date": [1577872860, 0],
802 "desc": "third",
822 "desc": "third",
803 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n",
823 "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n",
804 "files": ["fourth", "second", "third"],
824 "files": ["fourth", "second", "third"],
805 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
825 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
806 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
826 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
807 "phase": "draft",
827 "phase": "draft",
808 "rev": 8,
828 "rev": 8,
809 "tags": ["tip"],
829 "tags": ["tip"],
810 "user": "test"
830 "user": "test"
811 }
831 }
812 ]
832 ]
813
833
814 $ hg log -T json
834 $ hg log -T json
815 [
835 [
816 {
836 {
817 "bookmarks": [],
837 "bookmarks": [],
818 "branch": "default",
838 "branch": "default",
819 "date": [1577872860, 0],
839 "date": [1577872860, 0],
820 "desc": "third",
840 "desc": "third",
821 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
841 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
822 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
842 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
823 "phase": "draft",
843 "phase": "draft",
824 "rev": 8,
844 "rev": 8,
825 "tags": ["tip"],
845 "tags": ["tip"],
826 "user": "test"
846 "user": "test"
827 },
847 },
828 {
848 {
829 "bookmarks": [],
849 "bookmarks": [],
830 "branch": "default",
850 "branch": "default",
831 "date": [1000000, 0],
851 "date": [1000000, 0],
832 "desc": "second",
852 "desc": "second",
833 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
853 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
834 "parents": ["0000000000000000000000000000000000000000"],
854 "parents": ["0000000000000000000000000000000000000000"],
835 "phase": "draft",
855 "phase": "draft",
836 "rev": 7,
856 "rev": 7,
837 "tags": [],
857 "tags": [],
838 "user": "User Name <user@hostname>"
858 "user": "User Name <user@hostname>"
839 },
859 },
840 {
860 {
841 "bookmarks": [],
861 "bookmarks": [],
842 "branch": "default",
862 "branch": "default",
843 "date": [1500001, 0],
863 "date": [1500001, 0],
844 "desc": "merge",
864 "desc": "merge",
845 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
865 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
846 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
866 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
847 "phase": "draft",
867 "phase": "draft",
848 "rev": 6,
868 "rev": 6,
849 "tags": [],
869 "tags": [],
850 "user": "person"
870 "user": "person"
851 },
871 },
852 {
872 {
853 "bookmarks": [],
873 "bookmarks": [],
854 "branch": "default",
874 "branch": "default",
855 "date": [1500000, 0],
875 "date": [1500000, 0],
856 "desc": "new head",
876 "desc": "new head",
857 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
877 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
858 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
878 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
859 "phase": "draft",
879 "phase": "draft",
860 "rev": 5,
880 "rev": 5,
861 "tags": [],
881 "tags": [],
862 "user": "person"
882 "user": "person"
863 },
883 },
864 {
884 {
865 "bookmarks": [],
885 "bookmarks": [],
866 "branch": "foo",
886 "branch": "foo",
867 "date": [1400000, 0],
887 "date": [1400000, 0],
868 "desc": "new branch",
888 "desc": "new branch",
869 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
889 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
870 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
890 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
871 "phase": "draft",
891 "phase": "draft",
872 "rev": 4,
892 "rev": 4,
873 "tags": [],
893 "tags": [],
874 "user": "person"
894 "user": "person"
875 },
895 },
876 {
896 {
877 "bookmarks": [],
897 "bookmarks": [],
878 "branch": "default",
898 "branch": "default",
879 "date": [1300000, 0],
899 "date": [1300000, 0],
880 "desc": "no user, no domain",
900 "desc": "no user, no domain",
881 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
901 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
882 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
902 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
883 "phase": "draft",
903 "phase": "draft",
884 "rev": 3,
904 "rev": 3,
885 "tags": [],
905 "tags": [],
886 "user": "person"
906 "user": "person"
887 },
907 },
888 {
908 {
889 "bookmarks": [],
909 "bookmarks": [],
890 "branch": "default",
910 "branch": "default",
891 "date": [1200000, 0],
911 "date": [1200000, 0],
892 "desc": "no person",
912 "desc": "no person",
893 "node": "97054abb4ab824450e9164180baf491ae0078465",
913 "node": "97054abb4ab824450e9164180baf491ae0078465",
894 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
914 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
895 "phase": "draft",
915 "phase": "draft",
896 "rev": 2,
916 "rev": 2,
897 "tags": [],
917 "tags": [],
898 "user": "other@place"
918 "user": "other@place"
899 },
919 },
900 {
920 {
901 "bookmarks": [],
921 "bookmarks": [],
902 "branch": "default",
922 "branch": "default",
903 "date": [1100000, 0],
923 "date": [1100000, 0],
904 "desc": "other 1\nother 2\n\nother 3",
924 "desc": "other 1\nother 2\n\nother 3",
905 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
925 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
906 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
926 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
907 "phase": "draft",
927 "phase": "draft",
908 "rev": 1,
928 "rev": 1,
909 "tags": [],
929 "tags": [],
910 "user": "A. N. Other <other@place>"
930 "user": "A. N. Other <other@place>"
911 },
931 },
912 {
932 {
913 "bookmarks": [],
933 "bookmarks": [],
914 "branch": "default",
934 "branch": "default",
915 "date": [1000000, 0],
935 "date": [1000000, 0],
916 "desc": "line 1\nline 2",
936 "desc": "line 1\nline 2",
917 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
937 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
918 "parents": ["0000000000000000000000000000000000000000"],
938 "parents": ["0000000000000000000000000000000000000000"],
919 "phase": "draft",
939 "phase": "draft",
920 "rev": 0,
940 "rev": 0,
921 "tags": [],
941 "tags": [],
922 "user": "User Name <user@hostname>"
942 "user": "User Name <user@hostname>"
923 }
943 }
924 ]
944 ]
925
945
926 $ hg heads -v -Tjson
946 $ hg heads -v -Tjson
927 [
947 [
928 {
948 {
929 "bookmarks": [],
949 "bookmarks": [],
930 "branch": "default",
950 "branch": "default",
931 "date": [1577872860, 0],
951 "date": [1577872860, 0],
932 "desc": "third",
952 "desc": "third",
933 "files": ["fourth", "second", "third"],
953 "files": ["fourth", "second", "third"],
934 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
954 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
935 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
955 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
936 "phase": "draft",
956 "phase": "draft",
937 "rev": 8,
957 "rev": 8,
938 "tags": ["tip"],
958 "tags": ["tip"],
939 "user": "test"
959 "user": "test"
940 },
960 },
941 {
961 {
942 "bookmarks": [],
962 "bookmarks": [],
943 "branch": "default",
963 "branch": "default",
944 "date": [1500001, 0],
964 "date": [1500001, 0],
945 "desc": "merge",
965 "desc": "merge",
946 "files": [],
966 "files": [],
947 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
967 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
948 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
968 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
949 "phase": "draft",
969 "phase": "draft",
950 "rev": 6,
970 "rev": 6,
951 "tags": [],
971 "tags": [],
952 "user": "person"
972 "user": "person"
953 },
973 },
954 {
974 {
955 "bookmarks": [],
975 "bookmarks": [],
956 "branch": "foo",
976 "branch": "foo",
957 "date": [1400000, 0],
977 "date": [1400000, 0],
958 "desc": "new branch",
978 "desc": "new branch",
959 "files": [],
979 "files": [],
960 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
980 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
961 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
981 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
962 "phase": "draft",
982 "phase": "draft",
963 "rev": 4,
983 "rev": 4,
964 "tags": [],
984 "tags": [],
965 "user": "person"
985 "user": "person"
966 }
986 }
967 ]
987 ]
968
988
969 $ hg log --debug -Tjson
989 $ hg log --debug -Tjson
970 [
990 [
971 {
991 {
972 "added": ["fourth", "third"],
992 "added": ["fourth", "third"],
973 "bookmarks": [],
993 "bookmarks": [],
974 "branch": "default",
994 "branch": "default",
975 "date": [1577872860, 0],
995 "date": [1577872860, 0],
976 "desc": "third",
996 "desc": "third",
977 "extra": {"branch": "default"},
997 "extra": {"branch": "default"},
978 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
998 "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
979 "modified": [],
999 "modified": [],
980 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
1000 "node": "95c24699272ef57d062b8bccc32c878bf841784a",
981 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
1001 "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
982 "phase": "draft",
1002 "phase": "draft",
983 "removed": ["second"],
1003 "removed": ["second"],
984 "rev": 8,
1004 "rev": 8,
985 "tags": ["tip"],
1005 "tags": ["tip"],
986 "user": "test"
1006 "user": "test"
987 },
1007 },
988 {
1008 {
989 "added": ["second"],
1009 "added": ["second"],
990 "bookmarks": [],
1010 "bookmarks": [],
991 "branch": "default",
1011 "branch": "default",
992 "date": [1000000, 0],
1012 "date": [1000000, 0],
993 "desc": "second",
1013 "desc": "second",
994 "extra": {"branch": "default"},
1014 "extra": {"branch": "default"},
995 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
1015 "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
996 "modified": [],
1016 "modified": [],
997 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
1017 "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
998 "parents": ["0000000000000000000000000000000000000000"],
1018 "parents": ["0000000000000000000000000000000000000000"],
999 "phase": "draft",
1019 "phase": "draft",
1000 "removed": [],
1020 "removed": [],
1001 "rev": 7,
1021 "rev": 7,
1002 "tags": [],
1022 "tags": [],
1003 "user": "User Name <user@hostname>"
1023 "user": "User Name <user@hostname>"
1004 },
1024 },
1005 {
1025 {
1006 "added": [],
1026 "added": [],
1007 "bookmarks": [],
1027 "bookmarks": [],
1008 "branch": "default",
1028 "branch": "default",
1009 "date": [1500001, 0],
1029 "date": [1500001, 0],
1010 "desc": "merge",
1030 "desc": "merge",
1011 "extra": {"branch": "default"},
1031 "extra": {"branch": "default"},
1012 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1032 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1013 "modified": [],
1033 "modified": [],
1014 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
1034 "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
1015 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
1035 "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
1016 "phase": "draft",
1036 "phase": "draft",
1017 "removed": [],
1037 "removed": [],
1018 "rev": 6,
1038 "rev": 6,
1019 "tags": [],
1039 "tags": [],
1020 "user": "person"
1040 "user": "person"
1021 },
1041 },
1022 {
1042 {
1023 "added": ["d"],
1043 "added": ["d"],
1024 "bookmarks": [],
1044 "bookmarks": [],
1025 "branch": "default",
1045 "branch": "default",
1026 "date": [1500000, 0],
1046 "date": [1500000, 0],
1027 "desc": "new head",
1047 "desc": "new head",
1028 "extra": {"branch": "default"},
1048 "extra": {"branch": "default"},
1029 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1049 "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
1030 "modified": [],
1050 "modified": [],
1031 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
1051 "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
1032 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1052 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1033 "phase": "draft",
1053 "phase": "draft",
1034 "removed": [],
1054 "removed": [],
1035 "rev": 5,
1055 "rev": 5,
1036 "tags": [],
1056 "tags": [],
1037 "user": "person"
1057 "user": "person"
1038 },
1058 },
1039 {
1059 {
1040 "added": [],
1060 "added": [],
1041 "bookmarks": [],
1061 "bookmarks": [],
1042 "branch": "foo",
1062 "branch": "foo",
1043 "date": [1400000, 0],
1063 "date": [1400000, 0],
1044 "desc": "new branch",
1064 "desc": "new branch",
1045 "extra": {"branch": "foo"},
1065 "extra": {"branch": "foo"},
1046 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1066 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1047 "modified": [],
1067 "modified": [],
1048 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
1068 "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
1049 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1069 "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
1050 "phase": "draft",
1070 "phase": "draft",
1051 "removed": [],
1071 "removed": [],
1052 "rev": 4,
1072 "rev": 4,
1053 "tags": [],
1073 "tags": [],
1054 "user": "person"
1074 "user": "person"
1055 },
1075 },
1056 {
1076 {
1057 "added": [],
1077 "added": [],
1058 "bookmarks": [],
1078 "bookmarks": [],
1059 "branch": "default",
1079 "branch": "default",
1060 "date": [1300000, 0],
1080 "date": [1300000, 0],
1061 "desc": "no user, no domain",
1081 "desc": "no user, no domain",
1062 "extra": {"branch": "default"},
1082 "extra": {"branch": "default"},
1063 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1083 "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
1064 "modified": ["c"],
1084 "modified": ["c"],
1065 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
1085 "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
1066 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
1086 "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
1067 "phase": "draft",
1087 "phase": "draft",
1068 "removed": [],
1088 "removed": [],
1069 "rev": 3,
1089 "rev": 3,
1070 "tags": [],
1090 "tags": [],
1071 "user": "person"
1091 "user": "person"
1072 },
1092 },
1073 {
1093 {
1074 "added": ["c"],
1094 "added": ["c"],
1075 "bookmarks": [],
1095 "bookmarks": [],
1076 "branch": "default",
1096 "branch": "default",
1077 "date": [1200000, 0],
1097 "date": [1200000, 0],
1078 "desc": "no person",
1098 "desc": "no person",
1079 "extra": {"branch": "default"},
1099 "extra": {"branch": "default"},
1080 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
1100 "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
1081 "modified": [],
1101 "modified": [],
1082 "node": "97054abb4ab824450e9164180baf491ae0078465",
1102 "node": "97054abb4ab824450e9164180baf491ae0078465",
1083 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
1103 "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
1084 "phase": "draft",
1104 "phase": "draft",
1085 "removed": [],
1105 "removed": [],
1086 "rev": 2,
1106 "rev": 2,
1087 "tags": [],
1107 "tags": [],
1088 "user": "other@place"
1108 "user": "other@place"
1089 },
1109 },
1090 {
1110 {
1091 "added": ["b"],
1111 "added": ["b"],
1092 "bookmarks": [],
1112 "bookmarks": [],
1093 "branch": "default",
1113 "branch": "default",
1094 "date": [1100000, 0],
1114 "date": [1100000, 0],
1095 "desc": "other 1\nother 2\n\nother 3",
1115 "desc": "other 1\nother 2\n\nother 3",
1096 "extra": {"branch": "default"},
1116 "extra": {"branch": "default"},
1097 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
1117 "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
1098 "modified": [],
1118 "modified": [],
1099 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
1119 "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
1100 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
1120 "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
1101 "phase": "draft",
1121 "phase": "draft",
1102 "removed": [],
1122 "removed": [],
1103 "rev": 1,
1123 "rev": 1,
1104 "tags": [],
1124 "tags": [],
1105 "user": "A. N. Other <other@place>"
1125 "user": "A. N. Other <other@place>"
1106 },
1126 },
1107 {
1127 {
1108 "added": ["a"],
1128 "added": ["a"],
1109 "bookmarks": [],
1129 "bookmarks": [],
1110 "branch": "default",
1130 "branch": "default",
1111 "date": [1000000, 0],
1131 "date": [1000000, 0],
1112 "desc": "line 1\nline 2",
1132 "desc": "line 1\nline 2",
1113 "extra": {"branch": "default"},
1133 "extra": {"branch": "default"},
1114 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
1134 "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
1115 "modified": [],
1135 "modified": [],
1116 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
1136 "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
1117 "parents": ["0000000000000000000000000000000000000000"],
1137 "parents": ["0000000000000000000000000000000000000000"],
1118 "phase": "draft",
1138 "phase": "draft",
1119 "removed": [],
1139 "removed": [],
1120 "rev": 0,
1140 "rev": 0,
1121 "tags": [],
1141 "tags": [],
1122 "user": "User Name <user@hostname>"
1142 "user": "User Name <user@hostname>"
1123 }
1143 }
1124 ]
1144 ]
1125
1145
1126 $ hg log -l2 -T'json(rev, parents)'
1146 $ hg log -l2 -T'json(rev, parents)'
1127 [
1147 [
1128 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8},
1148 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8},
1129 {"parents": ["0000000000000000000000000000000000000000"], "rev": 7}
1149 {"parents": ["0000000000000000000000000000000000000000"], "rev": 7}
1130 ]
1150 ]
1131
1151
1132 $ hg log -qr. -T'json(rev, parents)'
1152 $ hg log -qr. -T'json(rev, parents)'
1133 [
1153 [
1134 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8}
1154 {"parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], "rev": 8}
1135 ]
1155 ]
1136
1156
1137 $ hg log -r. -T'json(diff)'
1157 $ hg log -r. -T'json(diff)'
1138 [
1158 [
1139 {"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"}
1159 {"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"}
1140 ]
1160 ]
1141
1161
1142 $ hg log -r. -T'json(diffstat)'
1162 $ hg log -r. -T'json(diffstat)'
1143 [
1163 [
1144 {"diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n"}
1164 {"diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n"}
1145 ]
1165 ]
1146
1166
1147 $ hg log -r. -T'json(manifest)'
1167 $ hg log -r. -T'json(manifest)'
1148 [
1168 [
1149 {"manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64"}
1169 {"manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64"}
1150 ]
1170 ]
1151
1171
1152 $ hg log -r. -T'json(extra)'
1172 $ hg log -r. -T'json(extra)'
1153 [
1173 [
1154 {"extra": {"branch": "default"}}
1174 {"extra": {"branch": "default"}}
1155 ]
1175 ]
1156
1176
1157 $ hg log -r3 -T'json(modified)'
1177 $ hg log -r3 -T'json(modified)'
1158 [
1178 [
1159 {"modified": ["c"]}
1179 {"modified": ["c"]}
1160 ]
1180 ]
1161
1181
1162 $ hg log -r. -T'json(added)'
1182 $ hg log -r. -T'json(added)'
1163 [
1183 [
1164 {"added": ["fourth", "third"]}
1184 {"added": ["fourth", "third"]}
1165 ]
1185 ]
1166
1186
1167 $ hg log -r. -T'json(removed)'
1187 $ hg log -r. -T'json(removed)'
1168 [
1188 [
1169 {"removed": ["second"]}
1189 {"removed": ["second"]}
1170 ]
1190 ]
1171
1191
1172 $ hg log -r. -T'json(files)'
1192 $ hg log -r. -T'json(files)'
1173 [
1193 [
1174 {"files": ["fourth", "second", "third"]}
1194 {"files": ["fourth", "second", "third"]}
1175 ]
1195 ]
1176
1196
1177 --copies is the exception. copies dict is built only when --copies switch
1197 --copies is the exception. copies dict is built only when --copies switch
1178 is on:
1198 is on:
1179
1199
1180 $ hg log -r'.^:' -T'json(copies)' --copies
1200 $ hg log -r'.^:' -T'json(copies)' --copies
1181 [
1201 [
1182 {"copies": {}},
1202 {"copies": {}},
1183 {"copies": {"fourth": "second"}}
1203 {"copies": {"fourth": "second"}}
1184 ]
1204 ]
1185
1205
1186 $ hg log -r. -T'json()'
1206 $ hg log -r. -T'json()'
1187 [
1207 [
1188 {}
1208 {}
1189 ]
1209 ]
1190
1210
1191 Other unsupported formatter styles:
1211 Other unsupported formatter styles:
1192
1212
1193 $ hg log -qr . -Tpickle
1213 $ hg log -qr . -Tpickle
1194 abort: "pickle" not in template map
1214 abort: "pickle" not in template map
1195 [255]
1215 [255]
1196 $ hg log -qr . -Tdebug
1216 $ hg log -qr . -Tdebug
1197 abort: "debug" not in template map
1217 abort: "debug" not in template map
1198 [255]
1218 [255]
1199
1219
1200 Unparsable function-style references:
1220 Unparsable function-style references:
1201
1221
1202 $ hg log -qr . -T'json(-)'
1222 $ hg log -qr . -T'json(-)'
1203 hg: parse error at 6: not a prefix: )
1223 hg: parse error at 6: not a prefix: )
1204 (json(-)
1224 (json(-)
1205 ^ here)
1225 ^ here)
1206 [255]
1226 [255]
1207
1227
1208 For backward compatibility, the following examples are not parsed as
1228 For backward compatibility, the following examples are not parsed as
1209 function-style references:
1229 function-style references:
1210
1230
1211 $ hg log -qr . -T'cbor(rev'
1231 $ hg log -qr . -T'cbor(rev'
1212 cbor(rev (no-eol)
1232 cbor(rev (no-eol)
1213 $ hg log -qr . -T'json (rev)'
1233 $ hg log -qr . -T'json (rev)'
1214 json (rev) (no-eol)
1234 json (rev) (no-eol)
1215 $ hg log -qr . -T'json(x="{rev}")'
1235 $ hg log -qr . -T'json(x="{rev}")'
1216 json(x="8") (no-eol)
1236 json(x="8") (no-eol)
1217
1237
1218 Error if style not readable:
1238 Error if style not readable:
1219
1239
1220 #if unix-permissions no-root
1240 #if unix-permissions no-root
1221 $ touch q
1241 $ touch q
1222 $ chmod 0 q
1242 $ chmod 0 q
1223 $ hg log --style ./q
1243 $ hg log --style ./q
1224 abort: Permission denied: './q'
1244 abort: Permission denied: './q'
1225 [255]
1245 [255]
1226 #endif
1246 #endif
1227
1247
1228 Error if no style:
1248 Error if no style:
1229
1249
1230 $ hg log --style notexist
1250 $ hg log --style notexist
1231 abort: style 'notexist' not found
1251 abort: style 'notexist' not found
1232 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
1252 (available styles: bisect, changelog, compact, default, phases, show, status, xml)
1233 [255]
1253 [255]
1234
1254
1235 $ hg log -T list
1255 $ hg log -T list
1236 available styles: bisect, changelog, compact, default, phases, show, status, xml
1256 available styles: bisect, changelog, compact, default, phases, show, status, xml
1237 abort: specify a template
1257 abort: specify a template
1238 [255]
1258 [255]
1239
1259
1240 Error if style missing key:
1260 Error if style missing key:
1241
1261
1242 $ echo 'q = q' > t
1262 $ echo 'q = q' > t
1243 $ hg log --style ./t
1263 $ hg log --style ./t
1244 abort: "changeset" not in template map
1264 abort: "changeset" not in template map
1245 [255]
1265 [255]
1246
1266
1247 Error if style missing value:
1267 Error if style missing value:
1248
1268
1249 $ echo 'changeset =' > t
1269 $ echo 'changeset =' > t
1250 $ hg log --style t
1270 $ hg log --style t
1251 hg: parse error at t:1: missing value
1271 hg: parse error at t:1: missing value
1252 [255]
1272 [255]
1253
1273
1254 Error if include fails:
1274 Error if include fails:
1255
1275
1256 $ echo 'changeset = q' >> t
1276 $ echo 'changeset = q' >> t
1257 #if unix-permissions no-root
1277 #if unix-permissions no-root
1258 $ hg log --style ./t
1278 $ hg log --style ./t
1259 abort: template file ./q: Permission denied
1279 abort: template file ./q: Permission denied
1260 [255]
1280 [255]
1261 $ rm -f q
1281 $ rm -f q
1262 #endif
1282 #endif
1263
1283
1264 Include works:
1284 Include works:
1265
1285
1266 $ echo '{rev}' > q
1286 $ echo '{rev}' > q
1267 $ hg log --style ./t
1287 $ hg log --style ./t
1268 8
1288 8
1269 7
1289 7
1270 6
1290 6
1271 5
1291 5
1272 4
1292 4
1273 3
1293 3
1274 2
1294 2
1275 1
1295 1
1276 0
1296 0
1277
1297
1278 $ hg phase -r 5 --public
1298 $ hg phase -r 5 --public
1279 $ hg phase -r 7 --secret --force
1299 $ hg phase -r 7 --secret --force
1280
1300
1281 Missing non-standard names give no error (backward compatibility):
1301 Missing non-standard names give no error (backward compatibility):
1282
1302
1283 $ echo "changeset = '{c}'" > t
1303 $ echo "changeset = '{c}'" > t
1284 $ hg log --style ./t
1304 $ hg log --style ./t
1285
1305
1286 Defining non-standard name works:
1306 Defining non-standard name works:
1287
1307
1288 $ cat <<EOF > t
1308 $ cat <<EOF > t
1289 > changeset = '{c}'
1309 > changeset = '{c}'
1290 > c = q
1310 > c = q
1291 > EOF
1311 > EOF
1292 $ hg log --style ./t
1312 $ hg log --style ./t
1293 8
1313 8
1294 7
1314 7
1295 6
1315 6
1296 5
1316 5
1297 4
1317 4
1298 3
1318 3
1299 2
1319 2
1300 1
1320 1
1301 0
1321 0
1302
1322
1303 ui.style works:
1323 ui.style works:
1304
1324
1305 $ echo '[ui]' > .hg/hgrc
1325 $ echo '[ui]' > .hg/hgrc
1306 $ echo 'style = t' >> .hg/hgrc
1326 $ echo 'style = t' >> .hg/hgrc
1307 $ hg log
1327 $ hg log
1308 8
1328 8
1309 7
1329 7
1310 6
1330 6
1311 5
1331 5
1312 4
1332 4
1313 3
1333 3
1314 2
1334 2
1315 1
1335 1
1316 0
1336 0
1317
1337
1318 Issue338:
1338 Issue338:
1319
1339
1320 $ hg log --style=changelog > changelog
1340 $ hg log --style=changelog > changelog
1321
1341
1322 $ cat changelog
1342 $ cat changelog
1323 2020-01-01 test <test>
1343 2020-01-01 test <test>
1324
1344
1325 * fourth, second, third:
1345 * fourth, second, third:
1326 third
1346 third
1327 [95c24699272e] [tip]
1347 [95c24699272e] [tip]
1328
1348
1329 1970-01-12 User Name <user@hostname>
1349 1970-01-12 User Name <user@hostname>
1330
1350
1331 * second:
1351 * second:
1332 second
1352 second
1333 [29114dbae42b]
1353 [29114dbae42b]
1334
1354
1335 1970-01-18 person <person>
1355 1970-01-18 person <person>
1336
1356
1337 * merge
1357 * merge
1338 [d41e714fe50d]
1358 [d41e714fe50d]
1339
1359
1340 * d:
1360 * d:
1341 new head
1361 new head
1342 [13207e5a10d9]
1362 [13207e5a10d9]
1343
1363
1344 1970-01-17 person <person>
1364 1970-01-17 person <person>
1345
1365
1346 * new branch
1366 * new branch
1347 [bbe44766e73d] <foo>
1367 [bbe44766e73d] <foo>
1348
1368
1349 1970-01-16 person <person>
1369 1970-01-16 person <person>
1350
1370
1351 * c:
1371 * c:
1352 no user, no domain
1372 no user, no domain
1353 [10e46f2dcbf4]
1373 [10e46f2dcbf4]
1354
1374
1355 1970-01-14 other <other@place>
1375 1970-01-14 other <other@place>
1356
1376
1357 * c:
1377 * c:
1358 no person
1378 no person
1359 [97054abb4ab8]
1379 [97054abb4ab8]
1360
1380
1361 1970-01-13 A. N. Other <other@place>
1381 1970-01-13 A. N. Other <other@place>
1362
1382
1363 * b:
1383 * b:
1364 other 1 other 2
1384 other 1 other 2
1365
1385
1366 other 3
1386 other 3
1367 [b608e9d1a3f0]
1387 [b608e9d1a3f0]
1368
1388
1369 1970-01-12 User Name <user@hostname>
1389 1970-01-12 User Name <user@hostname>
1370
1390
1371 * a:
1391 * a:
1372 line 1 line 2
1392 line 1 line 2
1373 [1e4e1b8f71e0]
1393 [1e4e1b8f71e0]
1374
1394
1375
1395
1376 Issue2130: xml output for 'hg heads' is malformed
1396 Issue2130: xml output for 'hg heads' is malformed
1377
1397
1378 $ hg heads --style changelog
1398 $ hg heads --style changelog
1379 2020-01-01 test <test>
1399 2020-01-01 test <test>
1380
1400
1381 * fourth, second, third:
1401 * fourth, second, third:
1382 third
1402 third
1383 [95c24699272e] [tip]
1403 [95c24699272e] [tip]
1384
1404
1385 1970-01-18 person <person>
1405 1970-01-18 person <person>
1386
1406
1387 * merge
1407 * merge
1388 [d41e714fe50d]
1408 [d41e714fe50d]
1389
1409
1390 1970-01-17 person <person>
1410 1970-01-17 person <person>
1391
1411
1392 * new branch
1412 * new branch
1393 [bbe44766e73d] <foo>
1413 [bbe44766e73d] <foo>
1394
1414
1395
1415
1396 Add a dummy commit to make up for the instability of the above:
1416 Add a dummy commit to make up for the instability of the above:
1397
1417
1398 $ echo a > a
1418 $ echo a > a
1399 $ hg add a
1419 $ hg add a
1400 $ hg ci -m future
1420 $ hg ci -m future
1401
1421
1402 Add a commit that does all possible modifications at once
1422 Add a commit that does all possible modifications at once
1403
1423
1404 $ echo modify >> third
1424 $ echo modify >> third
1405 $ touch b
1425 $ touch b
1406 $ hg add b
1426 $ hg add b
1407 $ hg mv fourth fifth
1427 $ hg mv fourth fifth
1408 $ hg rm a
1428 $ hg rm a
1409 $ hg ci -m "Modify, add, remove, rename"
1429 $ hg ci -m "Modify, add, remove, rename"
1410
1430
1411 Check the status template
1431 Check the status template
1412
1432
1413 $ cat <<EOF >> $HGRCPATH
1433 $ cat <<EOF >> $HGRCPATH
1414 > [extensions]
1434 > [extensions]
1415 > color=
1435 > color=
1416 > EOF
1436 > EOF
1417
1437
1418 $ hg log -T status -r 10
1438 $ hg log -T status -r 10
1419 changeset: 10:0f9759ec227a
1439 changeset: 10:0f9759ec227a
1420 tag: tip
1440 tag: tip
1421 user: test
1441 user: test
1422 date: Thu Jan 01 00:00:00 1970 +0000
1442 date: Thu Jan 01 00:00:00 1970 +0000
1423 summary: Modify, add, remove, rename
1443 summary: Modify, add, remove, rename
1424 files:
1444 files:
1425 M third
1445 M third
1426 A b
1446 A b
1427 A fifth
1447 A fifth
1428 R a
1448 R a
1429 R fourth
1449 R fourth
1430
1450
1431 $ hg log -T status -C -r 10
1451 $ hg log -T status -C -r 10
1432 changeset: 10:0f9759ec227a
1452 changeset: 10:0f9759ec227a
1433 tag: tip
1453 tag: tip
1434 user: test
1454 user: test
1435 date: Thu Jan 01 00:00:00 1970 +0000
1455 date: Thu Jan 01 00:00:00 1970 +0000
1436 summary: Modify, add, remove, rename
1456 summary: Modify, add, remove, rename
1437 files:
1457 files:
1438 M third
1458 M third
1439 A b
1459 A b
1440 A fifth
1460 A fifth
1441 fourth
1461 fourth
1442 R a
1462 R a
1443 R fourth
1463 R fourth
1444
1464
1445 $ hg log -T status -C -r 10 -v
1465 $ hg log -T status -C -r 10 -v
1446 changeset: 10:0f9759ec227a
1466 changeset: 10:0f9759ec227a
1447 tag: tip
1467 tag: tip
1448 user: test
1468 user: test
1449 date: Thu Jan 01 00:00:00 1970 +0000
1469 date: Thu Jan 01 00:00:00 1970 +0000
1450 description:
1470 description:
1451 Modify, add, remove, rename
1471 Modify, add, remove, rename
1452
1472
1453 files:
1473 files:
1454 M third
1474 M third
1455 A b
1475 A b
1456 A fifth
1476 A fifth
1457 fourth
1477 fourth
1458 R a
1478 R a
1459 R fourth
1479 R fourth
1460
1480
1461 $ hg log -T status -C -r 10 --debug
1481 $ hg log -T status -C -r 10 --debug
1462 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
1482 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
1463 tag: tip
1483 tag: tip
1464 phase: secret
1484 phase: secret
1465 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
1485 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
1466 parent: -1:0000000000000000000000000000000000000000
1486 parent: -1:0000000000000000000000000000000000000000
1467 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
1487 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
1468 user: test
1488 user: test
1469 date: Thu Jan 01 00:00:00 1970 +0000
1489 date: Thu Jan 01 00:00:00 1970 +0000
1470 extra: branch=default
1490 extra: branch=default
1471 description:
1491 description:
1472 Modify, add, remove, rename
1492 Modify, add, remove, rename
1473
1493
1474 files:
1494 files:
1475 M third
1495 M third
1476 A b
1496 A b
1477 A fifth
1497 A fifth
1478 fourth
1498 fourth
1479 R a
1499 R a
1480 R fourth
1500 R fourth
1481
1501
1482 $ hg log -T status -C -r 10 --quiet
1502 $ hg log -T status -C -r 10 --quiet
1483 10:0f9759ec227a
1503 10:0f9759ec227a
1484 $ hg --color=debug log -T status -r 10
1504 $ hg --color=debug log -T status -r 10
1485 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
1505 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
1486 [log.tag|tag: tip]
1506 [log.tag|tag: tip]
1487 [log.user|user: test]
1507 [log.user|user: test]
1488 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1508 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1489 [log.summary|summary: Modify, add, remove, rename]
1509 [log.summary|summary: Modify, add, remove, rename]
1490 [ui.note log.files|files:]
1510 [ui.note log.files|files:]
1491 [status.modified|M third]
1511 [status.modified|M third]
1492 [status.added|A b]
1512 [status.added|A b]
1493 [status.added|A fifth]
1513 [status.added|A fifth]
1494 [status.removed|R a]
1514 [status.removed|R a]
1495 [status.removed|R fourth]
1515 [status.removed|R fourth]
1496
1516
1497 $ hg --color=debug log -T status -C -r 10
1517 $ hg --color=debug log -T status -C -r 10
1498 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
1518 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
1499 [log.tag|tag: tip]
1519 [log.tag|tag: tip]
1500 [log.user|user: test]
1520 [log.user|user: test]
1501 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1521 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1502 [log.summary|summary: Modify, add, remove, rename]
1522 [log.summary|summary: Modify, add, remove, rename]
1503 [ui.note log.files|files:]
1523 [ui.note log.files|files:]
1504 [status.modified|M third]
1524 [status.modified|M third]
1505 [status.added|A b]
1525 [status.added|A b]
1506 [status.added|A fifth]
1526 [status.added|A fifth]
1507 [status.copied| fourth]
1527 [status.copied| fourth]
1508 [status.removed|R a]
1528 [status.removed|R a]
1509 [status.removed|R fourth]
1529 [status.removed|R fourth]
1510
1530
1511 $ hg --color=debug log -T status -C -r 10 -v
1531 $ hg --color=debug log -T status -C -r 10 -v
1512 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
1532 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
1513 [log.tag|tag: tip]
1533 [log.tag|tag: tip]
1514 [log.user|user: test]
1534 [log.user|user: test]
1515 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1535 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1516 [ui.note log.description|description:]
1536 [ui.note log.description|description:]
1517 [ui.note log.description|Modify, add, remove, rename]
1537 [ui.note log.description|Modify, add, remove, rename]
1518
1538
1519 [ui.note log.files|files:]
1539 [ui.note log.files|files:]
1520 [status.modified|M third]
1540 [status.modified|M third]
1521 [status.added|A b]
1541 [status.added|A b]
1522 [status.added|A fifth]
1542 [status.added|A fifth]
1523 [status.copied| fourth]
1543 [status.copied| fourth]
1524 [status.removed|R a]
1544 [status.removed|R a]
1525 [status.removed|R fourth]
1545 [status.removed|R fourth]
1526
1546
1527 $ hg --color=debug log -T status -C -r 10 --debug
1547 $ hg --color=debug log -T status -C -r 10 --debug
1528 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
1548 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
1529 [log.tag|tag: tip]
1549 [log.tag|tag: tip]
1530 [log.phase|phase: secret]
1550 [log.phase|phase: secret]
1531 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
1551 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
1532 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1552 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1533 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
1553 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
1534 [log.user|user: test]
1554 [log.user|user: test]
1535 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1555 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1536 [ui.debug log.extra|extra: branch=default]
1556 [ui.debug log.extra|extra: branch=default]
1537 [ui.note log.description|description:]
1557 [ui.note log.description|description:]
1538 [ui.note log.description|Modify, add, remove, rename]
1558 [ui.note log.description|Modify, add, remove, rename]
1539
1559
1540 [ui.note log.files|files:]
1560 [ui.note log.files|files:]
1541 [status.modified|M third]
1561 [status.modified|M third]
1542 [status.added|A b]
1562 [status.added|A b]
1543 [status.added|A fifth]
1563 [status.added|A fifth]
1544 [status.copied| fourth]
1564 [status.copied| fourth]
1545 [status.removed|R a]
1565 [status.removed|R a]
1546 [status.removed|R fourth]
1566 [status.removed|R fourth]
1547
1567
1548 $ hg --color=debug log -T status -C -r 10 --quiet
1568 $ hg --color=debug log -T status -C -r 10 --quiet
1549 [log.node|10:0f9759ec227a]
1569 [log.node|10:0f9759ec227a]
1550
1570
1551 Check the bisect template
1571 Check the bisect template
1552
1572
1553 $ hg bisect -g 1
1573 $ hg bisect -g 1
1554 $ hg bisect -b 3 --noupdate
1574 $ hg bisect -b 3 --noupdate
1555 Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
1575 Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
1556 $ hg log -T bisect -r 0:4
1576 $ hg log -T bisect -r 0:4
1557 changeset: 0:1e4e1b8f71e0
1577 changeset: 0:1e4e1b8f71e0
1558 bisect: good (implicit)
1578 bisect: good (implicit)
1559 user: User Name <user@hostname>
1579 user: User Name <user@hostname>
1560 date: Mon Jan 12 13:46:40 1970 +0000
1580 date: Mon Jan 12 13:46:40 1970 +0000
1561 summary: line 1
1581 summary: line 1
1562
1582
1563 changeset: 1:b608e9d1a3f0
1583 changeset: 1:b608e9d1a3f0
1564 bisect: good
1584 bisect: good
1565 user: A. N. Other <other@place>
1585 user: A. N. Other <other@place>
1566 date: Tue Jan 13 17:33:20 1970 +0000
1586 date: Tue Jan 13 17:33:20 1970 +0000
1567 summary: other 1
1587 summary: other 1
1568
1588
1569 changeset: 2:97054abb4ab8
1589 changeset: 2:97054abb4ab8
1570 bisect: untested
1590 bisect: untested
1571 user: other@place
1591 user: other@place
1572 date: Wed Jan 14 21:20:00 1970 +0000
1592 date: Wed Jan 14 21:20:00 1970 +0000
1573 summary: no person
1593 summary: no person
1574
1594
1575 changeset: 3:10e46f2dcbf4
1595 changeset: 3:10e46f2dcbf4
1576 bisect: bad
1596 bisect: bad
1577 user: person
1597 user: person
1578 date: Fri Jan 16 01:06:40 1970 +0000
1598 date: Fri Jan 16 01:06:40 1970 +0000
1579 summary: no user, no domain
1599 summary: no user, no domain
1580
1600
1581 changeset: 4:bbe44766e73d
1601 changeset: 4:bbe44766e73d
1582 bisect: bad (implicit)
1602 bisect: bad (implicit)
1583 branch: foo
1603 branch: foo
1584 user: person
1604 user: person
1585 date: Sat Jan 17 04:53:20 1970 +0000
1605 date: Sat Jan 17 04:53:20 1970 +0000
1586 summary: new branch
1606 summary: new branch
1587
1607
1588 $ hg log --debug -T bisect -r 0:4
1608 $ hg log --debug -T bisect -r 0:4
1589 changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
1609 changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
1590 bisect: good (implicit)
1610 bisect: good (implicit)
1591 phase: public
1611 phase: public
1592 parent: -1:0000000000000000000000000000000000000000
1612 parent: -1:0000000000000000000000000000000000000000
1593 parent: -1:0000000000000000000000000000000000000000
1613 parent: -1:0000000000000000000000000000000000000000
1594 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1614 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
1595 user: User Name <user@hostname>
1615 user: User Name <user@hostname>
1596 date: Mon Jan 12 13:46:40 1970 +0000
1616 date: Mon Jan 12 13:46:40 1970 +0000
1597 files+: a
1617 files+: a
1598 extra: branch=default
1618 extra: branch=default
1599 description:
1619 description:
1600 line 1
1620 line 1
1601 line 2
1621 line 2
1602
1622
1603
1623
1604 changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1624 changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1605 bisect: good
1625 bisect: good
1606 phase: public
1626 phase: public
1607 parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
1627 parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f
1608 parent: -1:0000000000000000000000000000000000000000
1628 parent: -1:0000000000000000000000000000000000000000
1609 manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1629 manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
1610 user: A. N. Other <other@place>
1630 user: A. N. Other <other@place>
1611 date: Tue Jan 13 17:33:20 1970 +0000
1631 date: Tue Jan 13 17:33:20 1970 +0000
1612 files+: b
1632 files+: b
1613 extra: branch=default
1633 extra: branch=default
1614 description:
1634 description:
1615 other 1
1635 other 1
1616 other 2
1636 other 2
1617
1637
1618 other 3
1638 other 3
1619
1639
1620
1640
1621 changeset: 2:97054abb4ab824450e9164180baf491ae0078465
1641 changeset: 2:97054abb4ab824450e9164180baf491ae0078465
1622 bisect: untested
1642 bisect: untested
1623 phase: public
1643 phase: public
1624 parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1644 parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1625 parent: -1:0000000000000000000000000000000000000000
1645 parent: -1:0000000000000000000000000000000000000000
1626 manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1646 manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
1627 user: other@place
1647 user: other@place
1628 date: Wed Jan 14 21:20:00 1970 +0000
1648 date: Wed Jan 14 21:20:00 1970 +0000
1629 files+: c
1649 files+: c
1630 extra: branch=default
1650 extra: branch=default
1631 description:
1651 description:
1632 no person
1652 no person
1633
1653
1634
1654
1635 changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
1655 changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
1636 bisect: bad
1656 bisect: bad
1637 phase: public
1657 phase: public
1638 parent: 2:97054abb4ab824450e9164180baf491ae0078465
1658 parent: 2:97054abb4ab824450e9164180baf491ae0078465
1639 parent: -1:0000000000000000000000000000000000000000
1659 parent: -1:0000000000000000000000000000000000000000
1640 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1660 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1641 user: person
1661 user: person
1642 date: Fri Jan 16 01:06:40 1970 +0000
1662 date: Fri Jan 16 01:06:40 1970 +0000
1643 files: c
1663 files: c
1644 extra: branch=default
1664 extra: branch=default
1645 description:
1665 description:
1646 no user, no domain
1666 no user, no domain
1647
1667
1648
1668
1649 changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1669 changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1650 bisect: bad (implicit)
1670 bisect: bad (implicit)
1651 branch: foo
1671 branch: foo
1652 phase: draft
1672 phase: draft
1653 parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
1673 parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47
1654 parent: -1:0000000000000000000000000000000000000000
1674 parent: -1:0000000000000000000000000000000000000000
1655 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1675 manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
1656 user: person
1676 user: person
1657 date: Sat Jan 17 04:53:20 1970 +0000
1677 date: Sat Jan 17 04:53:20 1970 +0000
1658 extra: branch=foo
1678 extra: branch=foo
1659 description:
1679 description:
1660 new branch
1680 new branch
1661
1681
1662
1682
1663 $ hg log -v -T bisect -r 0:4
1683 $ hg log -v -T bisect -r 0:4
1664 changeset: 0:1e4e1b8f71e0
1684 changeset: 0:1e4e1b8f71e0
1665 bisect: good (implicit)
1685 bisect: good (implicit)
1666 user: User Name <user@hostname>
1686 user: User Name <user@hostname>
1667 date: Mon Jan 12 13:46:40 1970 +0000
1687 date: Mon Jan 12 13:46:40 1970 +0000
1668 files: a
1688 files: a
1669 description:
1689 description:
1670 line 1
1690 line 1
1671 line 2
1691 line 2
1672
1692
1673
1693
1674 changeset: 1:b608e9d1a3f0
1694 changeset: 1:b608e9d1a3f0
1675 bisect: good
1695 bisect: good
1676 user: A. N. Other <other@place>
1696 user: A. N. Other <other@place>
1677 date: Tue Jan 13 17:33:20 1970 +0000
1697 date: Tue Jan 13 17:33:20 1970 +0000
1678 files: b
1698 files: b
1679 description:
1699 description:
1680 other 1
1700 other 1
1681 other 2
1701 other 2
1682
1702
1683 other 3
1703 other 3
1684
1704
1685
1705
1686 changeset: 2:97054abb4ab8
1706 changeset: 2:97054abb4ab8
1687 bisect: untested
1707 bisect: untested
1688 user: other@place
1708 user: other@place
1689 date: Wed Jan 14 21:20:00 1970 +0000
1709 date: Wed Jan 14 21:20:00 1970 +0000
1690 files: c
1710 files: c
1691 description:
1711 description:
1692 no person
1712 no person
1693
1713
1694
1714
1695 changeset: 3:10e46f2dcbf4
1715 changeset: 3:10e46f2dcbf4
1696 bisect: bad
1716 bisect: bad
1697 user: person
1717 user: person
1698 date: Fri Jan 16 01:06:40 1970 +0000
1718 date: Fri Jan 16 01:06:40 1970 +0000
1699 files: c
1719 files: c
1700 description:
1720 description:
1701 no user, no domain
1721 no user, no domain
1702
1722
1703
1723
1704 changeset: 4:bbe44766e73d
1724 changeset: 4:bbe44766e73d
1705 bisect: bad (implicit)
1725 bisect: bad (implicit)
1706 branch: foo
1726 branch: foo
1707 user: person
1727 user: person
1708 date: Sat Jan 17 04:53:20 1970 +0000
1728 date: Sat Jan 17 04:53:20 1970 +0000
1709 description:
1729 description:
1710 new branch
1730 new branch
1711
1731
1712
1732
1713 $ hg --color=debug log -T bisect -r 0:4
1733 $ hg --color=debug log -T bisect -r 0:4
1714 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
1734 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
1715 [log.bisect bisect.good|bisect: good (implicit)]
1735 [log.bisect bisect.good|bisect: good (implicit)]
1716 [log.user|user: User Name <user@hostname>]
1736 [log.user|user: User Name <user@hostname>]
1717 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
1737 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
1718 [log.summary|summary: line 1]
1738 [log.summary|summary: line 1]
1719
1739
1720 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
1740 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
1721 [log.bisect bisect.good|bisect: good]
1741 [log.bisect bisect.good|bisect: good]
1722 [log.user|user: A. N. Other <other@place>]
1742 [log.user|user: A. N. Other <other@place>]
1723 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
1743 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
1724 [log.summary|summary: other 1]
1744 [log.summary|summary: other 1]
1725
1745
1726 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
1746 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
1727 [log.bisect bisect.untested|bisect: untested]
1747 [log.bisect bisect.untested|bisect: untested]
1728 [log.user|user: other@place]
1748 [log.user|user: other@place]
1729 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
1749 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
1730 [log.summary|summary: no person]
1750 [log.summary|summary: no person]
1731
1751
1732 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
1752 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
1733 [log.bisect bisect.bad|bisect: bad]
1753 [log.bisect bisect.bad|bisect: bad]
1734 [log.user|user: person]
1754 [log.user|user: person]
1735 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
1755 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
1736 [log.summary|summary: no user, no domain]
1756 [log.summary|summary: no user, no domain]
1737
1757
1738 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
1758 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
1739 [log.bisect bisect.bad|bisect: bad (implicit)]
1759 [log.bisect bisect.bad|bisect: bad (implicit)]
1740 [log.branch|branch: foo]
1760 [log.branch|branch: foo]
1741 [log.user|user: person]
1761 [log.user|user: person]
1742 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
1762 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
1743 [log.summary|summary: new branch]
1763 [log.summary|summary: new branch]
1744
1764
1745 $ hg --color=debug log --debug -T bisect -r 0:4
1765 $ hg --color=debug log --debug -T bisect -r 0:4
1746 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
1766 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
1747 [log.bisect bisect.good|bisect: good (implicit)]
1767 [log.bisect bisect.good|bisect: good (implicit)]
1748 [log.phase|phase: public]
1768 [log.phase|phase: public]
1749 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1769 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1750 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1770 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1751 [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
1771 [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
1752 [log.user|user: User Name <user@hostname>]
1772 [log.user|user: User Name <user@hostname>]
1753 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
1773 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
1754 [ui.debug log.files|files+: a]
1774 [ui.debug log.files|files+: a]
1755 [ui.debug log.extra|extra: branch=default]
1775 [ui.debug log.extra|extra: branch=default]
1756 [ui.note log.description|description:]
1776 [ui.note log.description|description:]
1757 [ui.note log.description|line 1
1777 [ui.note log.description|line 1
1758 line 2]
1778 line 2]
1759
1779
1760
1780
1761 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
1781 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
1762 [log.bisect bisect.good|bisect: good]
1782 [log.bisect bisect.good|bisect: good]
1763 [log.phase|phase: public]
1783 [log.phase|phase: public]
1764 [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
1784 [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f]
1765 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1785 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1766 [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
1786 [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
1767 [log.user|user: A. N. Other <other@place>]
1787 [log.user|user: A. N. Other <other@place>]
1768 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
1788 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
1769 [ui.debug log.files|files+: b]
1789 [ui.debug log.files|files+: b]
1770 [ui.debug log.extra|extra: branch=default]
1790 [ui.debug log.extra|extra: branch=default]
1771 [ui.note log.description|description:]
1791 [ui.note log.description|description:]
1772 [ui.note log.description|other 1
1792 [ui.note log.description|other 1
1773 other 2
1793 other 2
1774
1794
1775 other 3]
1795 other 3]
1776
1796
1777
1797
1778 [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465]
1798 [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465]
1779 [log.bisect bisect.untested|bisect: untested]
1799 [log.bisect bisect.untested|bisect: untested]
1780 [log.phase|phase: public]
1800 [log.phase|phase: public]
1781 [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
1801 [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
1782 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1802 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1783 [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
1803 [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
1784 [log.user|user: other@place]
1804 [log.user|user: other@place]
1785 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
1805 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
1786 [ui.debug log.files|files+: c]
1806 [ui.debug log.files|files+: c]
1787 [ui.debug log.extra|extra: branch=default]
1807 [ui.debug log.extra|extra: branch=default]
1788 [ui.note log.description|description:]
1808 [ui.note log.description|description:]
1789 [ui.note log.description|no person]
1809 [ui.note log.description|no person]
1790
1810
1791
1811
1792 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
1812 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
1793 [log.bisect bisect.bad|bisect: bad]
1813 [log.bisect bisect.bad|bisect: bad]
1794 [log.phase|phase: public]
1814 [log.phase|phase: public]
1795 [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465]
1815 [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465]
1796 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1816 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1797 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
1817 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
1798 [log.user|user: person]
1818 [log.user|user: person]
1799 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
1819 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
1800 [ui.debug log.files|files: c]
1820 [ui.debug log.files|files: c]
1801 [ui.debug log.extra|extra: branch=default]
1821 [ui.debug log.extra|extra: branch=default]
1802 [ui.note log.description|description:]
1822 [ui.note log.description|description:]
1803 [ui.note log.description|no user, no domain]
1823 [ui.note log.description|no user, no domain]
1804
1824
1805
1825
1806 [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
1826 [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
1807 [log.bisect bisect.bad|bisect: bad (implicit)]
1827 [log.bisect bisect.bad|bisect: bad (implicit)]
1808 [log.branch|branch: foo]
1828 [log.branch|branch: foo]
1809 [log.phase|phase: draft]
1829 [log.phase|phase: draft]
1810 [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
1830 [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
1811 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1831 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
1812 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
1832 [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
1813 [log.user|user: person]
1833 [log.user|user: person]
1814 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
1834 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
1815 [ui.debug log.extra|extra: branch=foo]
1835 [ui.debug log.extra|extra: branch=foo]
1816 [ui.note log.description|description:]
1836 [ui.note log.description|description:]
1817 [ui.note log.description|new branch]
1837 [ui.note log.description|new branch]
1818
1838
1819
1839
1820 $ hg --color=debug log -v -T bisect -r 0:4
1840 $ hg --color=debug log -v -T bisect -r 0:4
1821 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
1841 [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0]
1822 [log.bisect bisect.good|bisect: good (implicit)]
1842 [log.bisect bisect.good|bisect: good (implicit)]
1823 [log.user|user: User Name <user@hostname>]
1843 [log.user|user: User Name <user@hostname>]
1824 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
1844 [log.date|date: Mon Jan 12 13:46:40 1970 +0000]
1825 [ui.note log.files|files: a]
1845 [ui.note log.files|files: a]
1826 [ui.note log.description|description:]
1846 [ui.note log.description|description:]
1827 [ui.note log.description|line 1
1847 [ui.note log.description|line 1
1828 line 2]
1848 line 2]
1829
1849
1830
1850
1831 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
1851 [log.changeset changeset.public|changeset: 1:b608e9d1a3f0]
1832 [log.bisect bisect.good|bisect: good]
1852 [log.bisect bisect.good|bisect: good]
1833 [log.user|user: A. N. Other <other@place>]
1853 [log.user|user: A. N. Other <other@place>]
1834 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
1854 [log.date|date: Tue Jan 13 17:33:20 1970 +0000]
1835 [ui.note log.files|files: b]
1855 [ui.note log.files|files: b]
1836 [ui.note log.description|description:]
1856 [ui.note log.description|description:]
1837 [ui.note log.description|other 1
1857 [ui.note log.description|other 1
1838 other 2
1858 other 2
1839
1859
1840 other 3]
1860 other 3]
1841
1861
1842
1862
1843 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
1863 [log.changeset changeset.public|changeset: 2:97054abb4ab8]
1844 [log.bisect bisect.untested|bisect: untested]
1864 [log.bisect bisect.untested|bisect: untested]
1845 [log.user|user: other@place]
1865 [log.user|user: other@place]
1846 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
1866 [log.date|date: Wed Jan 14 21:20:00 1970 +0000]
1847 [ui.note log.files|files: c]
1867 [ui.note log.files|files: c]
1848 [ui.note log.description|description:]
1868 [ui.note log.description|description:]
1849 [ui.note log.description|no person]
1869 [ui.note log.description|no person]
1850
1870
1851
1871
1852 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
1872 [log.changeset changeset.public|changeset: 3:10e46f2dcbf4]
1853 [log.bisect bisect.bad|bisect: bad]
1873 [log.bisect bisect.bad|bisect: bad]
1854 [log.user|user: person]
1874 [log.user|user: person]
1855 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
1875 [log.date|date: Fri Jan 16 01:06:40 1970 +0000]
1856 [ui.note log.files|files: c]
1876 [ui.note log.files|files: c]
1857 [ui.note log.description|description:]
1877 [ui.note log.description|description:]
1858 [ui.note log.description|no user, no domain]
1878 [ui.note log.description|no user, no domain]
1859
1879
1860
1880
1861 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
1881 [log.changeset changeset.draft|changeset: 4:bbe44766e73d]
1862 [log.bisect bisect.bad|bisect: bad (implicit)]
1882 [log.bisect bisect.bad|bisect: bad (implicit)]
1863 [log.branch|branch: foo]
1883 [log.branch|branch: foo]
1864 [log.user|user: person]
1884 [log.user|user: person]
1865 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
1885 [log.date|date: Sat Jan 17 04:53:20 1970 +0000]
1866 [ui.note log.description|description:]
1886 [ui.note log.description|description:]
1867 [ui.note log.description|new branch]
1887 [ui.note log.description|new branch]
1868
1888
1869
1889
1870 $ hg bisect --reset
1890 $ hg bisect --reset
1871
1891
1872 $ cd ..
1892 $ cd ..
1873
1893
1874 Set up latesttag repository:
1894 Set up latesttag repository:
1875
1895
1876 $ hg init latesttag
1896 $ hg init latesttag
1877 $ cd latesttag
1897 $ cd latesttag
1878
1898
1879 $ echo a > file
1899 $ echo a > file
1880 $ hg ci -Am a -d '0 0'
1900 $ hg ci -Am a -d '0 0'
1881 adding file
1901 adding file
1882
1902
1883 $ echo b >> file
1903 $ echo b >> file
1884 $ hg ci -m b -d '1 0'
1904 $ hg ci -m b -d '1 0'
1885
1905
1886 $ echo c >> head1
1906 $ echo c >> head1
1887 $ hg ci -Am h1c -d '2 0'
1907 $ hg ci -Am h1c -d '2 0'
1888 adding head1
1908 adding head1
1889
1909
1890 $ hg update -q 1
1910 $ hg update -q 1
1891 $ echo d >> head2
1911 $ echo d >> head2
1892 $ hg ci -Am h2d -d '3 0'
1912 $ hg ci -Am h2d -d '3 0'
1893 adding head2
1913 adding head2
1894 created new head
1914 created new head
1895
1915
1896 $ echo e >> head2
1916 $ echo e >> head2
1897 $ hg ci -m h2e -d '4 0'
1917 $ hg ci -m h2e -d '4 0'
1898
1918
1899 $ hg merge -q
1919 $ hg merge -q
1900 $ hg ci -m merge -d '5 -3600'
1920 $ hg ci -m merge -d '5 -3600'
1901
1921
1902 $ hg tag -r 1 -m t1 -d '6 0' t1
1922 $ hg tag -r 1 -m t1 -d '6 0' t1
1903 $ hg tag -r 2 -m t2 -d '7 0' t2
1923 $ hg tag -r 2 -m t2 -d '7 0' t2
1904 $ hg tag -r 3 -m t3 -d '8 0' t3
1924 $ hg tag -r 3 -m t3 -d '8 0' t3
1905 $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter
1925 $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter
1906 $ hg tag -r 5 -m t5 -d '9 0' t5
1926 $ hg tag -r 5 -m t5 -d '9 0' t5
1907 $ hg tag -r 3 -m at3 -d '10 0' at3
1927 $ hg tag -r 3 -m at3 -d '10 0' at3
1908
1928
1909 $ cd ..
1929 $ cd ..
1910
1930
1911 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1931 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1912 if it is a relative path
1932 if it is a relative path
1913
1933
1914 $ mkdir -p home/styles
1934 $ mkdir -p home/styles
1915
1935
1916 $ cat > home/styles/teststyle <<EOF
1936 $ cat > home/styles/teststyle <<EOF
1917 > changeset = 'test {rev}:{node|short}\n'
1937 > changeset = 'test {rev}:{node|short}\n'
1918 > EOF
1938 > EOF
1919
1939
1920 $ HOME=`pwd`/home; export HOME
1940 $ HOME=`pwd`/home; export HOME
1921
1941
1922 $ cat > latesttag/.hg/hgrc <<EOF
1942 $ cat > latesttag/.hg/hgrc <<EOF
1923 > [ui]
1943 > [ui]
1924 > style = ~/styles/teststyle
1944 > style = ~/styles/teststyle
1925 > EOF
1945 > EOF
1926
1946
1927 $ hg -R latesttag tip
1947 $ hg -R latesttag tip
1928 test 11:97e5943b523a
1948 test 11:97e5943b523a
1929
1949
1930 Test recursive showlist template (issue1989):
1950 Test recursive showlist template (issue1989):
1931
1951
1932 $ cat > style1989 <<EOF
1952 $ cat > style1989 <<EOF
1933 > changeset = '{file_mods}{manifest}{extras}'
1953 > changeset = '{file_mods}{manifest}{extras}'
1934 > file_mod = 'M|{author|person}\n'
1954 > file_mod = 'M|{author|person}\n'
1935 > manifest = '{rev},{author}\n'
1955 > manifest = '{rev},{author}\n'
1936 > extra = '{key}: {author}\n'
1956 > extra = '{key}: {author}\n'
1937 > EOF
1957 > EOF
1938
1958
1939 $ hg -R latesttag log -r tip --style=style1989
1959 $ hg -R latesttag log -r tip --style=style1989
1940 M|test
1960 M|test
1941 11,
1961 11,
1942 branch: test
1962 branch: test
General Comments 0
You need to be logged in to leave comments. Login now