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