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