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