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