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