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