##// END OF EJS Templates
test-command-template: enable for Windows
Adrian Buehlmann -
r16917:bebe376b default
parent child Browse files
Show More
@@ -1,1381 +1,1383 b''
1 $ "$TESTDIR/hghave" unix-permissions || exit 80
2
3 1 $ hg init a
4 2 $ cd a
5 3 $ echo a > a
6 4 $ hg add a
7 5 $ echo line 1 > b
8 6 $ echo line 2 >> b
9 7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
10 8
11 9 $ hg add b
12 10 $ echo other 1 > c
13 11 $ echo other 2 >> c
14 12 $ echo >> c
15 13 $ echo other 3 >> c
16 14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
17 15
18 16 $ hg add c
19 17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
20 18 $ echo c >> c
21 19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
22 20
23 21 $ echo foo > .hg/branch
24 22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
25 23
26 24 $ hg co -q 3
27 25 $ echo other 4 >> d
28 26 $ hg add d
29 27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
30 28
31 29 $ hg merge -q foo
32 30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
33 31
34 32 Second branch starting at nullrev:
35 33
36 34 $ hg update null
37 35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
38 36 $ echo second > second
39 37 $ hg add second
40 38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
41 39 created new head
42 40
43 41 $ echo third > third
44 42 $ hg add third
45 43 $ hg mv second fourth
46 44 $ hg commit -m third -d "2020-01-01 10:01"
47 45
48 46 Quoting for ui.logtemplate
49 47
50 48 $ hg tip --config "ui.logtemplate={rev}\n"
51 49 8
52 50 $ hg tip --config "ui.logtemplate='{rev}\n'"
53 51 8
54 52 $ hg tip --config 'ui.logtemplate="{rev}\n"'
55 53 8
56 54
57 55 Make sure user/global hgrc does not affect tests
58 56
59 57 $ echo '[ui]' > .hg/hgrc
60 58 $ echo 'logtemplate =' >> .hg/hgrc
61 59 $ echo 'style =' >> .hg/hgrc
62 60
63 61 Default style is like normal output:
64 62
65 63 $ hg log > log.out
66 64 $ hg log --style default > style.out
67 65 $ cmp log.out style.out || diff -u log.out style.out
68 66
69 67 $ hg log -v > log.out
70 68 $ hg log -v --style default > style.out
71 69 $ cmp log.out style.out || diff -u log.out style.out
72 70
73 71 $ hg log --debug > log.out
74 72 $ hg log --debug --style default > style.out
75 73 $ cmp log.out style.out || diff -u log.out style.out
76 74
77 75 Revision with no copies (used to print a traceback):
78 76
79 77 $ hg tip -v --template '\n'
80 78
81 79
82 80 Compact style works:
83 81
84 82 $ hg log --style compact
85 83 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
86 84 third
87 85
88 86 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
89 87 second
90 88
91 89 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
92 90 merge
93 91
94 92 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
95 93 new head
96 94
97 95 4 bbe44766e73d 1970-01-17 04:53 +0000 person
98 96 new branch
99 97
100 98 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
101 99 no user, no domain
102 100
103 101 2 97054abb4ab8 1970-01-14 21:20 +0000 other
104 102 no person
105 103
106 104 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
107 105 other 1
108 106
109 107 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
110 108 line 1
111 109
112 110
113 111 $ hg log -v --style compact
114 112 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
115 113 third
116 114
117 115 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
118 116 second
119 117
120 118 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
121 119 merge
122 120
123 121 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
124 122 new head
125 123
126 124 4 bbe44766e73d 1970-01-17 04:53 +0000 person
127 125 new branch
128 126
129 127 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
130 128 no user, no domain
131 129
132 130 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
133 131 no person
134 132
135 133 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
136 134 other 1
137 135 other 2
138 136
139 137 other 3
140 138
141 139 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
142 140 line 1
143 141 line 2
144 142
145 143
146 144 $ hg log --debug --style compact
147 145 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
148 146 third
149 147
150 148 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
151 149 second
152 150
153 151 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
154 152 merge
155 153
156 154 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
157 155 new head
158 156
159 157 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
160 158 new branch
161 159
162 160 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
163 161 no user, no domain
164 162
165 163 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
166 164 no person
167 165
168 166 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
169 167 other 1
170 168 other 2
171 169
172 170 other 3
173 171
174 172 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
175 173 line 1
176 174 line 2
177 175
178 176
179 177 Test xml styles:
180 178
181 179 $ hg log --style xml
182 180 <?xml version="1.0"?>
183 181 <log>
184 182 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
185 183 <tag>tip</tag>
186 184 <author email="test">test</author>
187 185 <date>2020-01-01T10:01:00+00:00</date>
188 186 <msg xml:space="preserve">third</msg>
189 187 </logentry>
190 188 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
191 189 <parent revision="-1" node="0000000000000000000000000000000000000000" />
192 190 <author email="user@hostname">User Name</author>
193 191 <date>1970-01-12T13:46:40+00:00</date>
194 192 <msg xml:space="preserve">second</msg>
195 193 </logentry>
196 194 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
197 195 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
198 196 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
199 197 <author email="person">person</author>
200 198 <date>1970-01-18T08:40:01+00:00</date>
201 199 <msg xml:space="preserve">merge</msg>
202 200 </logentry>
203 201 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
204 202 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
205 203 <author email="person">person</author>
206 204 <date>1970-01-18T08:40:00+00:00</date>
207 205 <msg xml:space="preserve">new head</msg>
208 206 </logentry>
209 207 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
210 208 <branch>foo</branch>
211 209 <author email="person">person</author>
212 210 <date>1970-01-17T04:53:20+00:00</date>
213 211 <msg xml:space="preserve">new branch</msg>
214 212 </logentry>
215 213 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
216 214 <author email="person">person</author>
217 215 <date>1970-01-16T01:06:40+00:00</date>
218 216 <msg xml:space="preserve">no user, no domain</msg>
219 217 </logentry>
220 218 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
221 219 <author email="other@place">other</author>
222 220 <date>1970-01-14T21:20:00+00:00</date>
223 221 <msg xml:space="preserve">no person</msg>
224 222 </logentry>
225 223 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
226 224 <author email="other@place">A. N. Other</author>
227 225 <date>1970-01-13T17:33:20+00:00</date>
228 226 <msg xml:space="preserve">other 1
229 227 other 2
230 228
231 229 other 3</msg>
232 230 </logentry>
233 231 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
234 232 <author email="user@hostname">User Name</author>
235 233 <date>1970-01-12T13:46:40+00:00</date>
236 234 <msg xml:space="preserve">line 1
237 235 line 2</msg>
238 236 </logentry>
239 237 </log>
240 238
241 239 $ hg log -v --style xml
242 240 <?xml version="1.0"?>
243 241 <log>
244 242 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
245 243 <tag>tip</tag>
246 244 <author email="test">test</author>
247 245 <date>2020-01-01T10:01:00+00:00</date>
248 246 <msg xml:space="preserve">third</msg>
249 247 <paths>
250 248 <path action="A">fourth</path>
251 249 <path action="A">third</path>
252 250 <path action="R">second</path>
253 251 </paths>
254 252 <copies>
255 253 <copy source="second">fourth</copy>
256 254 </copies>
257 255 </logentry>
258 256 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
259 257 <parent revision="-1" node="0000000000000000000000000000000000000000" />
260 258 <author email="user@hostname">User Name</author>
261 259 <date>1970-01-12T13:46:40+00:00</date>
262 260 <msg xml:space="preserve">second</msg>
263 261 <paths>
264 262 <path action="A">second</path>
265 263 </paths>
266 264 </logentry>
267 265 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
268 266 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
269 267 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
270 268 <author email="person">person</author>
271 269 <date>1970-01-18T08:40:01+00:00</date>
272 270 <msg xml:space="preserve">merge</msg>
273 271 <paths>
274 272 </paths>
275 273 </logentry>
276 274 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
277 275 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
278 276 <author email="person">person</author>
279 277 <date>1970-01-18T08:40:00+00:00</date>
280 278 <msg xml:space="preserve">new head</msg>
281 279 <paths>
282 280 <path action="A">d</path>
283 281 </paths>
284 282 </logentry>
285 283 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
286 284 <branch>foo</branch>
287 285 <author email="person">person</author>
288 286 <date>1970-01-17T04:53:20+00:00</date>
289 287 <msg xml:space="preserve">new branch</msg>
290 288 <paths>
291 289 </paths>
292 290 </logentry>
293 291 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
294 292 <author email="person">person</author>
295 293 <date>1970-01-16T01:06:40+00:00</date>
296 294 <msg xml:space="preserve">no user, no domain</msg>
297 295 <paths>
298 296 <path action="M">c</path>
299 297 </paths>
300 298 </logentry>
301 299 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
302 300 <author email="other@place">other</author>
303 301 <date>1970-01-14T21:20:00+00:00</date>
304 302 <msg xml:space="preserve">no person</msg>
305 303 <paths>
306 304 <path action="A">c</path>
307 305 </paths>
308 306 </logentry>
309 307 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
310 308 <author email="other@place">A. N. Other</author>
311 309 <date>1970-01-13T17:33:20+00:00</date>
312 310 <msg xml:space="preserve">other 1
313 311 other 2
314 312
315 313 other 3</msg>
316 314 <paths>
317 315 <path action="A">b</path>
318 316 </paths>
319 317 </logentry>
320 318 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
321 319 <author email="user@hostname">User Name</author>
322 320 <date>1970-01-12T13:46:40+00:00</date>
323 321 <msg xml:space="preserve">line 1
324 322 line 2</msg>
325 323 <paths>
326 324 <path action="A">a</path>
327 325 </paths>
328 326 </logentry>
329 327 </log>
330 328
331 329 $ hg log --debug --style xml
332 330 <?xml version="1.0"?>
333 331 <log>
334 332 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
335 333 <tag>tip</tag>
336 334 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
337 335 <parent revision="-1" node="0000000000000000000000000000000000000000" />
338 336 <author email="test">test</author>
339 337 <date>2020-01-01T10:01:00+00:00</date>
340 338 <msg xml:space="preserve">third</msg>
341 339 <paths>
342 340 <path action="A">fourth</path>
343 341 <path action="A">third</path>
344 342 <path action="R">second</path>
345 343 </paths>
346 344 <copies>
347 345 <copy source="second">fourth</copy>
348 346 </copies>
349 347 <extra key="branch">default</extra>
350 348 </logentry>
351 349 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
352 350 <parent revision="-1" node="0000000000000000000000000000000000000000" />
353 351 <parent revision="-1" node="0000000000000000000000000000000000000000" />
354 352 <author email="user@hostname">User Name</author>
355 353 <date>1970-01-12T13:46:40+00:00</date>
356 354 <msg xml:space="preserve">second</msg>
357 355 <paths>
358 356 <path action="A">second</path>
359 357 </paths>
360 358 <extra key="branch">default</extra>
361 359 </logentry>
362 360 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
363 361 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
364 362 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
365 363 <author email="person">person</author>
366 364 <date>1970-01-18T08:40:01+00:00</date>
367 365 <msg xml:space="preserve">merge</msg>
368 366 <paths>
369 367 </paths>
370 368 <extra key="branch">default</extra>
371 369 </logentry>
372 370 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
373 371 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
374 372 <parent revision="-1" node="0000000000000000000000000000000000000000" />
375 373 <author email="person">person</author>
376 374 <date>1970-01-18T08:40:00+00:00</date>
377 375 <msg xml:space="preserve">new head</msg>
378 376 <paths>
379 377 <path action="A">d</path>
380 378 </paths>
381 379 <extra key="branch">default</extra>
382 380 </logentry>
383 381 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
384 382 <branch>foo</branch>
385 383 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
386 384 <parent revision="-1" node="0000000000000000000000000000000000000000" />
387 385 <author email="person">person</author>
388 386 <date>1970-01-17T04:53:20+00:00</date>
389 387 <msg xml:space="preserve">new branch</msg>
390 388 <paths>
391 389 </paths>
392 390 <extra key="branch">foo</extra>
393 391 </logentry>
394 392 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
395 393 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
396 394 <parent revision="-1" node="0000000000000000000000000000000000000000" />
397 395 <author email="person">person</author>
398 396 <date>1970-01-16T01:06:40+00:00</date>
399 397 <msg xml:space="preserve">no user, no domain</msg>
400 398 <paths>
401 399 <path action="M">c</path>
402 400 </paths>
403 401 <extra key="branch">default</extra>
404 402 </logentry>
405 403 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
406 404 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
407 405 <parent revision="-1" node="0000000000000000000000000000000000000000" />
408 406 <author email="other@place">other</author>
409 407 <date>1970-01-14T21:20:00+00:00</date>
410 408 <msg xml:space="preserve">no person</msg>
411 409 <paths>
412 410 <path action="A">c</path>
413 411 </paths>
414 412 <extra key="branch">default</extra>
415 413 </logentry>
416 414 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
417 415 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
418 416 <parent revision="-1" node="0000000000000000000000000000000000000000" />
419 417 <author email="other@place">A. N. Other</author>
420 418 <date>1970-01-13T17:33:20+00:00</date>
421 419 <msg xml:space="preserve">other 1
422 420 other 2
423 421
424 422 other 3</msg>
425 423 <paths>
426 424 <path action="A">b</path>
427 425 </paths>
428 426 <extra key="branch">default</extra>
429 427 </logentry>
430 428 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
431 429 <parent revision="-1" node="0000000000000000000000000000000000000000" />
432 430 <parent revision="-1" node="0000000000000000000000000000000000000000" />
433 431 <author email="user@hostname">User Name</author>
434 432 <date>1970-01-12T13:46:40+00:00</date>
435 433 <msg xml:space="preserve">line 1
436 434 line 2</msg>
437 435 <paths>
438 436 <path action="A">a</path>
439 437 </paths>
440 438 <extra key="branch">default</extra>
441 439 </logentry>
442 440 </log>
443 441
444 442
445 443 Error if style not readable:
446 444
445 #if unix-permissions
447 446 $ touch q
448 447 $ chmod 0 q
449 448 $ hg log --style ./q
450 449 abort: Permission denied: ./q
451 450 [255]
451 #endif
452 452
453 453 Error if no style:
454 454
455 455 $ hg log --style notexist
456 456 abort: style not found: notexist
457 457 [255]
458 458
459 459 Error if style missing key:
460 460
461 461 $ echo 'q = q' > t
462 462 $ hg log --style ./t
463 463 abort: "changeset" not in template map
464 464 [255]
465 465
466 466 Error if include fails:
467 467
468 468 $ echo 'changeset = q' >> t
469 #if unix-permissions
469 470 $ hg log --style ./t
470 471 abort: template file ./q: Permission denied
471 472 [255]
473 $ rm q
474 #endif
472 475
473 476 Include works:
474 477
475 $ rm q
476 478 $ echo '{rev}' > q
477 479 $ hg log --style ./t
478 480 8
479 481 7
480 482 6
481 483 5
482 484 4
483 485 3
484 486 2
485 487 1
486 488 0
487 489
488 490 ui.style works:
489 491
490 492 $ echo '[ui]' > .hg/hgrc
491 493 $ echo 'style = t' >> .hg/hgrc
492 494 $ hg log
493 495 8
494 496 7
495 497 6
496 498 5
497 499 4
498 500 3
499 501 2
500 502 1
501 503 0
502 504
503 505
504 506 Issue338:
505 507
506 508 $ hg log --style=changelog > changelog
507 509
508 510 $ cat changelog
509 511 2020-01-01 test <test>
510 512
511 513 * fourth, second, third:
512 514 third
513 515 [95c24699272e] [tip]
514 516
515 517 1970-01-12 User Name <user@hostname>
516 518
517 519 * second:
518 520 second
519 521 [29114dbae42b]
520 522
521 523 1970-01-18 person <person>
522 524
523 525 * merge
524 526 [d41e714fe50d]
525 527
526 528 * d:
527 529 new head
528 530 [13207e5a10d9]
529 531
530 532 1970-01-17 person <person>
531 533
532 534 * new branch
533 535 [bbe44766e73d] <foo>
534 536
535 537 1970-01-16 person <person>
536 538
537 539 * c:
538 540 no user, no domain
539 541 [10e46f2dcbf4]
540 542
541 543 1970-01-14 other <other@place>
542 544
543 545 * c:
544 546 no person
545 547 [97054abb4ab8]
546 548
547 549 1970-01-13 A. N. Other <other@place>
548 550
549 551 * b:
550 552 other 1 other 2
551 553
552 554 other 3
553 555 [b608e9d1a3f0]
554 556
555 557 1970-01-12 User Name <user@hostname>
556 558
557 559 * a:
558 560 line 1 line 2
559 561 [1e4e1b8f71e0]
560 562
561 563
562 564 Issue2130: xml output for 'hg heads' is malformed
563 565
564 566 $ hg heads --style changelog
565 567 2020-01-01 test <test>
566 568
567 569 * fourth, second, third:
568 570 third
569 571 [95c24699272e] [tip]
570 572
571 573 1970-01-18 person <person>
572 574
573 575 * merge
574 576 [d41e714fe50d]
575 577
576 578 1970-01-17 person <person>
577 579
578 580 * new branch
579 581 [bbe44766e73d] <foo>
580 582
581 583
582 584 Keys work:
583 585
584 586 $ for key in author branch branches date desc file_adds file_dels file_mods \
585 587 > file_copies file_copies_switch files \
586 588 > manifest node parents rev tags diffstat extras; do
587 589 > for mode in '' --verbose --debug; do
588 590 > hg log $mode --template "$key$mode: {$key}\n"
589 591 > done
590 592 > done
591 593 author: test
592 594 author: User Name <user@hostname>
593 595 author: person
594 596 author: person
595 597 author: person
596 598 author: person
597 599 author: other@place
598 600 author: A. N. Other <other@place>
599 601 author: User Name <user@hostname>
600 602 author--verbose: test
601 603 author--verbose: User Name <user@hostname>
602 604 author--verbose: person
603 605 author--verbose: person
604 606 author--verbose: person
605 607 author--verbose: person
606 608 author--verbose: other@place
607 609 author--verbose: A. N. Other <other@place>
608 610 author--verbose: User Name <user@hostname>
609 611 author--debug: test
610 612 author--debug: User Name <user@hostname>
611 613 author--debug: person
612 614 author--debug: person
613 615 author--debug: person
614 616 author--debug: person
615 617 author--debug: other@place
616 618 author--debug: A. N. Other <other@place>
617 619 author--debug: User Name <user@hostname>
618 620 branch: default
619 621 branch: default
620 622 branch: default
621 623 branch: default
622 624 branch: foo
623 625 branch: default
624 626 branch: default
625 627 branch: default
626 628 branch: default
627 629 branch--verbose: default
628 630 branch--verbose: default
629 631 branch--verbose: default
630 632 branch--verbose: default
631 633 branch--verbose: foo
632 634 branch--verbose: default
633 635 branch--verbose: default
634 636 branch--verbose: default
635 637 branch--verbose: default
636 638 branch--debug: default
637 639 branch--debug: default
638 640 branch--debug: default
639 641 branch--debug: default
640 642 branch--debug: foo
641 643 branch--debug: default
642 644 branch--debug: default
643 645 branch--debug: default
644 646 branch--debug: default
645 647 branches:
646 648 branches:
647 649 branches:
648 650 branches:
649 651 branches: foo
650 652 branches:
651 653 branches:
652 654 branches:
653 655 branches:
654 656 branches--verbose:
655 657 branches--verbose:
656 658 branches--verbose:
657 659 branches--verbose:
658 660 branches--verbose: foo
659 661 branches--verbose:
660 662 branches--verbose:
661 663 branches--verbose:
662 664 branches--verbose:
663 665 branches--debug:
664 666 branches--debug:
665 667 branches--debug:
666 668 branches--debug:
667 669 branches--debug: foo
668 670 branches--debug:
669 671 branches--debug:
670 672 branches--debug:
671 673 branches--debug:
672 674 date: 1577872860.00
673 675 date: 1000000.00
674 676 date: 1500001.00
675 677 date: 1500000.00
676 678 date: 1400000.00
677 679 date: 1300000.00
678 680 date: 1200000.00
679 681 date: 1100000.00
680 682 date: 1000000.00
681 683 date--verbose: 1577872860.00
682 684 date--verbose: 1000000.00
683 685 date--verbose: 1500001.00
684 686 date--verbose: 1500000.00
685 687 date--verbose: 1400000.00
686 688 date--verbose: 1300000.00
687 689 date--verbose: 1200000.00
688 690 date--verbose: 1100000.00
689 691 date--verbose: 1000000.00
690 692 date--debug: 1577872860.00
691 693 date--debug: 1000000.00
692 694 date--debug: 1500001.00
693 695 date--debug: 1500000.00
694 696 date--debug: 1400000.00
695 697 date--debug: 1300000.00
696 698 date--debug: 1200000.00
697 699 date--debug: 1100000.00
698 700 date--debug: 1000000.00
699 701 desc: third
700 702 desc: second
701 703 desc: merge
702 704 desc: new head
703 705 desc: new branch
704 706 desc: no user, no domain
705 707 desc: no person
706 708 desc: other 1
707 709 other 2
708 710
709 711 other 3
710 712 desc: line 1
711 713 line 2
712 714 desc--verbose: third
713 715 desc--verbose: second
714 716 desc--verbose: merge
715 717 desc--verbose: new head
716 718 desc--verbose: new branch
717 719 desc--verbose: no user, no domain
718 720 desc--verbose: no person
719 721 desc--verbose: other 1
720 722 other 2
721 723
722 724 other 3
723 725 desc--verbose: line 1
724 726 line 2
725 727 desc--debug: third
726 728 desc--debug: second
727 729 desc--debug: merge
728 730 desc--debug: new head
729 731 desc--debug: new branch
730 732 desc--debug: no user, no domain
731 733 desc--debug: no person
732 734 desc--debug: other 1
733 735 other 2
734 736
735 737 other 3
736 738 desc--debug: line 1
737 739 line 2
738 740 file_adds: fourth third
739 741 file_adds: second
740 742 file_adds:
741 743 file_adds: d
742 744 file_adds:
743 745 file_adds:
744 746 file_adds: c
745 747 file_adds: b
746 748 file_adds: a
747 749 file_adds--verbose: fourth third
748 750 file_adds--verbose: second
749 751 file_adds--verbose:
750 752 file_adds--verbose: d
751 753 file_adds--verbose:
752 754 file_adds--verbose:
753 755 file_adds--verbose: c
754 756 file_adds--verbose: b
755 757 file_adds--verbose: a
756 758 file_adds--debug: fourth third
757 759 file_adds--debug: second
758 760 file_adds--debug:
759 761 file_adds--debug: d
760 762 file_adds--debug:
761 763 file_adds--debug:
762 764 file_adds--debug: c
763 765 file_adds--debug: b
764 766 file_adds--debug: a
765 767 file_dels: second
766 768 file_dels:
767 769 file_dels:
768 770 file_dels:
769 771 file_dels:
770 772 file_dels:
771 773 file_dels:
772 774 file_dels:
773 775 file_dels:
774 776 file_dels--verbose: second
775 777 file_dels--verbose:
776 778 file_dels--verbose:
777 779 file_dels--verbose:
778 780 file_dels--verbose:
779 781 file_dels--verbose:
780 782 file_dels--verbose:
781 783 file_dels--verbose:
782 784 file_dels--verbose:
783 785 file_dels--debug: second
784 786 file_dels--debug:
785 787 file_dels--debug:
786 788 file_dels--debug:
787 789 file_dels--debug:
788 790 file_dels--debug:
789 791 file_dels--debug:
790 792 file_dels--debug:
791 793 file_dels--debug:
792 794 file_mods:
793 795 file_mods:
794 796 file_mods:
795 797 file_mods:
796 798 file_mods:
797 799 file_mods: c
798 800 file_mods:
799 801 file_mods:
800 802 file_mods:
801 803 file_mods--verbose:
802 804 file_mods--verbose:
803 805 file_mods--verbose:
804 806 file_mods--verbose:
805 807 file_mods--verbose:
806 808 file_mods--verbose: c
807 809 file_mods--verbose:
808 810 file_mods--verbose:
809 811 file_mods--verbose:
810 812 file_mods--debug:
811 813 file_mods--debug:
812 814 file_mods--debug:
813 815 file_mods--debug:
814 816 file_mods--debug:
815 817 file_mods--debug: c
816 818 file_mods--debug:
817 819 file_mods--debug:
818 820 file_mods--debug:
819 821 file_copies: fourth (second)
820 822 file_copies:
821 823 file_copies:
822 824 file_copies:
823 825 file_copies:
824 826 file_copies:
825 827 file_copies:
826 828 file_copies:
827 829 file_copies:
828 830 file_copies--verbose: fourth (second)
829 831 file_copies--verbose:
830 832 file_copies--verbose:
831 833 file_copies--verbose:
832 834 file_copies--verbose:
833 835 file_copies--verbose:
834 836 file_copies--verbose:
835 837 file_copies--verbose:
836 838 file_copies--verbose:
837 839 file_copies--debug: fourth (second)
838 840 file_copies--debug:
839 841 file_copies--debug:
840 842 file_copies--debug:
841 843 file_copies--debug:
842 844 file_copies--debug:
843 845 file_copies--debug:
844 846 file_copies--debug:
845 847 file_copies--debug:
846 848 file_copies_switch:
847 849 file_copies_switch:
848 850 file_copies_switch:
849 851 file_copies_switch:
850 852 file_copies_switch:
851 853 file_copies_switch:
852 854 file_copies_switch:
853 855 file_copies_switch:
854 856 file_copies_switch:
855 857 file_copies_switch--verbose:
856 858 file_copies_switch--verbose:
857 859 file_copies_switch--verbose:
858 860 file_copies_switch--verbose:
859 861 file_copies_switch--verbose:
860 862 file_copies_switch--verbose:
861 863 file_copies_switch--verbose:
862 864 file_copies_switch--verbose:
863 865 file_copies_switch--verbose:
864 866 file_copies_switch--debug:
865 867 file_copies_switch--debug:
866 868 file_copies_switch--debug:
867 869 file_copies_switch--debug:
868 870 file_copies_switch--debug:
869 871 file_copies_switch--debug:
870 872 file_copies_switch--debug:
871 873 file_copies_switch--debug:
872 874 file_copies_switch--debug:
873 875 files: fourth second third
874 876 files: second
875 877 files:
876 878 files: d
877 879 files:
878 880 files: c
879 881 files: c
880 882 files: b
881 883 files: a
882 884 files--verbose: fourth second third
883 885 files--verbose: second
884 886 files--verbose:
885 887 files--verbose: d
886 888 files--verbose:
887 889 files--verbose: c
888 890 files--verbose: c
889 891 files--verbose: b
890 892 files--verbose: a
891 893 files--debug: fourth second third
892 894 files--debug: second
893 895 files--debug:
894 896 files--debug: d
895 897 files--debug:
896 898 files--debug: c
897 899 files--debug: c
898 900 files--debug: b
899 901 files--debug: a
900 902 manifest: 6:94961b75a2da
901 903 manifest: 5:f2dbc354b94e
902 904 manifest: 4:4dc3def4f9b4
903 905 manifest: 4:4dc3def4f9b4
904 906 manifest: 3:cb5a1327723b
905 907 manifest: 3:cb5a1327723b
906 908 manifest: 2:6e0e82995c35
907 909 manifest: 1:4e8d705b1e53
908 910 manifest: 0:a0c8bcbbb45c
909 911 manifest--verbose: 6:94961b75a2da
910 912 manifest--verbose: 5:f2dbc354b94e
911 913 manifest--verbose: 4:4dc3def4f9b4
912 914 manifest--verbose: 4:4dc3def4f9b4
913 915 manifest--verbose: 3:cb5a1327723b
914 916 manifest--verbose: 3:cb5a1327723b
915 917 manifest--verbose: 2:6e0e82995c35
916 918 manifest--verbose: 1:4e8d705b1e53
917 919 manifest--verbose: 0:a0c8bcbbb45c
918 920 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
919 921 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
920 922 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
921 923 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
922 924 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
923 925 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
924 926 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
925 927 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
926 928 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
927 929 node: 95c24699272ef57d062b8bccc32c878bf841784a
928 930 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
929 931 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
930 932 node: 13207e5a10d9fd28ec424934298e176197f2c67f
931 933 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
932 934 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
933 935 node: 97054abb4ab824450e9164180baf491ae0078465
934 936 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
935 937 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
936 938 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
937 939 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
938 940 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
939 941 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
940 942 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
941 943 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
942 944 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
943 945 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
944 946 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
945 947 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
946 948 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
947 949 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
948 950 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
949 951 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
950 952 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
951 953 node--debug: 97054abb4ab824450e9164180baf491ae0078465
952 954 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
953 955 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
954 956 parents:
955 957 parents: -1:000000000000
956 958 parents: 5:13207e5a10d9 4:bbe44766e73d
957 959 parents: 3:10e46f2dcbf4
958 960 parents:
959 961 parents:
960 962 parents:
961 963 parents:
962 964 parents:
963 965 parents--verbose:
964 966 parents--verbose: -1:000000000000
965 967 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
966 968 parents--verbose: 3:10e46f2dcbf4
967 969 parents--verbose:
968 970 parents--verbose:
969 971 parents--verbose:
970 972 parents--verbose:
971 973 parents--verbose:
972 974 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
973 975 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
974 976 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
975 977 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
976 978 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
977 979 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
978 980 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
979 981 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
980 982 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
981 983 rev: 8
982 984 rev: 7
983 985 rev: 6
984 986 rev: 5
985 987 rev: 4
986 988 rev: 3
987 989 rev: 2
988 990 rev: 1
989 991 rev: 0
990 992 rev--verbose: 8
991 993 rev--verbose: 7
992 994 rev--verbose: 6
993 995 rev--verbose: 5
994 996 rev--verbose: 4
995 997 rev--verbose: 3
996 998 rev--verbose: 2
997 999 rev--verbose: 1
998 1000 rev--verbose: 0
999 1001 rev--debug: 8
1000 1002 rev--debug: 7
1001 1003 rev--debug: 6
1002 1004 rev--debug: 5
1003 1005 rev--debug: 4
1004 1006 rev--debug: 3
1005 1007 rev--debug: 2
1006 1008 rev--debug: 1
1007 1009 rev--debug: 0
1008 1010 tags: tip
1009 1011 tags:
1010 1012 tags:
1011 1013 tags:
1012 1014 tags:
1013 1015 tags:
1014 1016 tags:
1015 1017 tags:
1016 1018 tags:
1017 1019 tags--verbose: tip
1018 1020 tags--verbose:
1019 1021 tags--verbose:
1020 1022 tags--verbose:
1021 1023 tags--verbose:
1022 1024 tags--verbose:
1023 1025 tags--verbose:
1024 1026 tags--verbose:
1025 1027 tags--verbose:
1026 1028 tags--debug: tip
1027 1029 tags--debug:
1028 1030 tags--debug:
1029 1031 tags--debug:
1030 1032 tags--debug:
1031 1033 tags--debug:
1032 1034 tags--debug:
1033 1035 tags--debug:
1034 1036 tags--debug:
1035 1037 diffstat: 3: +2/-1
1036 1038 diffstat: 1: +1/-0
1037 1039 diffstat: 0: +0/-0
1038 1040 diffstat: 1: +1/-0
1039 1041 diffstat: 0: +0/-0
1040 1042 diffstat: 1: +1/-0
1041 1043 diffstat: 1: +4/-0
1042 1044 diffstat: 1: +2/-0
1043 1045 diffstat: 1: +1/-0
1044 1046 diffstat--verbose: 3: +2/-1
1045 1047 diffstat--verbose: 1: +1/-0
1046 1048 diffstat--verbose: 0: +0/-0
1047 1049 diffstat--verbose: 1: +1/-0
1048 1050 diffstat--verbose: 0: +0/-0
1049 1051 diffstat--verbose: 1: +1/-0
1050 1052 diffstat--verbose: 1: +4/-0
1051 1053 diffstat--verbose: 1: +2/-0
1052 1054 diffstat--verbose: 1: +1/-0
1053 1055 diffstat--debug: 3: +2/-1
1054 1056 diffstat--debug: 1: +1/-0
1055 1057 diffstat--debug: 0: +0/-0
1056 1058 diffstat--debug: 1: +1/-0
1057 1059 diffstat--debug: 0: +0/-0
1058 1060 diffstat--debug: 1: +1/-0
1059 1061 diffstat--debug: 1: +4/-0
1060 1062 diffstat--debug: 1: +2/-0
1061 1063 diffstat--debug: 1: +1/-0
1062 1064 extras: branch=default
1063 1065 extras: branch=default
1064 1066 extras: branch=default
1065 1067 extras: branch=default
1066 1068 extras: branch=foo
1067 1069 extras: branch=default
1068 1070 extras: branch=default
1069 1071 extras: branch=default
1070 1072 extras: branch=default
1071 1073 extras--verbose: branch=default
1072 1074 extras--verbose: branch=default
1073 1075 extras--verbose: branch=default
1074 1076 extras--verbose: branch=default
1075 1077 extras--verbose: branch=foo
1076 1078 extras--verbose: branch=default
1077 1079 extras--verbose: branch=default
1078 1080 extras--verbose: branch=default
1079 1081 extras--verbose: branch=default
1080 1082 extras--debug: branch=default
1081 1083 extras--debug: branch=default
1082 1084 extras--debug: branch=default
1083 1085 extras--debug: branch=default
1084 1086 extras--debug: branch=foo
1085 1087 extras--debug: branch=default
1086 1088 extras--debug: branch=default
1087 1089 extras--debug: branch=default
1088 1090 extras--debug: branch=default
1089 1091
1090 1092
1091 1093 Filters work:
1092 1094
1093 1095 $ hg log --template '{author|domain}\n'
1094 1096
1095 1097 hostname
1096 1098
1097 1099
1098 1100
1099 1101
1100 1102 place
1101 1103 place
1102 1104 hostname
1103 1105
1104 1106 $ hg log --template '{author|person}\n'
1105 1107 test
1106 1108 User Name
1107 1109 person
1108 1110 person
1109 1111 person
1110 1112 person
1111 1113 other
1112 1114 A. N. Other
1113 1115 User Name
1114 1116
1115 1117 $ hg log --template '{author|user}\n'
1116 1118 test
1117 1119 user
1118 1120 person
1119 1121 person
1120 1122 person
1121 1123 person
1122 1124 other
1123 1125 other
1124 1126 user
1125 1127
1126 1128 $ hg log --template '{date|date}\n'
1127 1129 Wed Jan 01 10:01:00 2020 +0000
1128 1130 Mon Jan 12 13:46:40 1970 +0000
1129 1131 Sun Jan 18 08:40:01 1970 +0000
1130 1132 Sun Jan 18 08:40:00 1970 +0000
1131 1133 Sat Jan 17 04:53:20 1970 +0000
1132 1134 Fri Jan 16 01:06:40 1970 +0000
1133 1135 Wed Jan 14 21:20:00 1970 +0000
1134 1136 Tue Jan 13 17:33:20 1970 +0000
1135 1137 Mon Jan 12 13:46:40 1970 +0000
1136 1138
1137 1139 $ hg log --template '{date|isodate}\n'
1138 1140 2020-01-01 10:01 +0000
1139 1141 1970-01-12 13:46 +0000
1140 1142 1970-01-18 08:40 +0000
1141 1143 1970-01-18 08:40 +0000
1142 1144 1970-01-17 04:53 +0000
1143 1145 1970-01-16 01:06 +0000
1144 1146 1970-01-14 21:20 +0000
1145 1147 1970-01-13 17:33 +0000
1146 1148 1970-01-12 13:46 +0000
1147 1149
1148 1150 $ hg log --template '{date|isodatesec}\n'
1149 1151 2020-01-01 10:01:00 +0000
1150 1152 1970-01-12 13:46:40 +0000
1151 1153 1970-01-18 08:40:01 +0000
1152 1154 1970-01-18 08:40:00 +0000
1153 1155 1970-01-17 04:53:20 +0000
1154 1156 1970-01-16 01:06:40 +0000
1155 1157 1970-01-14 21:20:00 +0000
1156 1158 1970-01-13 17:33:20 +0000
1157 1159 1970-01-12 13:46:40 +0000
1158 1160
1159 1161 $ hg log --template '{date|rfc822date}\n'
1160 1162 Wed, 01 Jan 2020 10:01:00 +0000
1161 1163 Mon, 12 Jan 1970 13:46:40 +0000
1162 1164 Sun, 18 Jan 1970 08:40:01 +0000
1163 1165 Sun, 18 Jan 1970 08:40:00 +0000
1164 1166 Sat, 17 Jan 1970 04:53:20 +0000
1165 1167 Fri, 16 Jan 1970 01:06:40 +0000
1166 1168 Wed, 14 Jan 1970 21:20:00 +0000
1167 1169 Tue, 13 Jan 1970 17:33:20 +0000
1168 1170 Mon, 12 Jan 1970 13:46:40 +0000
1169 1171
1170 1172 $ hg log --template '{desc|firstline}\n'
1171 1173 third
1172 1174 second
1173 1175 merge
1174 1176 new head
1175 1177 new branch
1176 1178 no user, no domain
1177 1179 no person
1178 1180 other 1
1179 1181 line 1
1180 1182
1181 1183 $ hg log --template '{node|short}\n'
1182 1184 95c24699272e
1183 1185 29114dbae42b
1184 1186 d41e714fe50d
1185 1187 13207e5a10d9
1186 1188 bbe44766e73d
1187 1189 10e46f2dcbf4
1188 1190 97054abb4ab8
1189 1191 b608e9d1a3f0
1190 1192 1e4e1b8f71e0
1191 1193
1192 1194 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1193 1195 <changeset author="test"/>
1194 1196 <changeset author="User Name &lt;user@hostname&gt;"/>
1195 1197 <changeset author="person"/>
1196 1198 <changeset author="person"/>
1197 1199 <changeset author="person"/>
1198 1200 <changeset author="person"/>
1199 1201 <changeset author="other@place"/>
1200 1202 <changeset author="A. N. Other &lt;other@place&gt;"/>
1201 1203 <changeset author="User Name &lt;user@hostname&gt;"/>
1202 1204
1203 1205 $ hg log --template '{rev}: {children}\n'
1204 1206 8:
1205 1207 7: 8:95c24699272e
1206 1208 6:
1207 1209 5: 6:d41e714fe50d
1208 1210 4: 6:d41e714fe50d
1209 1211 3: 4:bbe44766e73d 5:13207e5a10d9
1210 1212 2: 3:10e46f2dcbf4
1211 1213 1: 2:97054abb4ab8
1212 1214 0: 1:b608e9d1a3f0
1213 1215
1214 1216 Formatnode filter works:
1215 1217
1216 1218 $ hg -q log -r 0 --template '{node|formatnode}\n'
1217 1219 1e4e1b8f71e0
1218 1220
1219 1221 $ hg log -r 0 --template '{node|formatnode}\n'
1220 1222 1e4e1b8f71e0
1221 1223
1222 1224 $ hg -v log -r 0 --template '{node|formatnode}\n'
1223 1225 1e4e1b8f71e0
1224 1226
1225 1227 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1226 1228 1e4e1b8f71e05681d422154f5421e385fec3454f
1227 1229
1228 1230 Age filter:
1229 1231
1230 1232 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1231 1233
1232 1234 >>> from datetime import datetime
1233 1235 >>> fp = open('a', 'w')
1234 1236 >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00')
1235 1237 >>> fp.close()
1236 1238 $ hg add a
1237 1239 $ hg commit -m future -d "`cat a`"
1238 1240
1239 1241 $ hg log -l1 --template '{date|age}\n'
1240 1242 7 years from now
1241 1243
1242 1244 Error on syntax:
1243 1245
1244 1246 $ echo 'x = "f' >> t
1245 1247 $ hg log
1246 1248 abort: t:3: unmatched quotes
1247 1249 [255]
1248 1250
1249 1251 $ cd ..
1250 1252
1251 1253
1252 1254 latesttag:
1253 1255
1254 1256 $ hg init latesttag
1255 1257 $ cd latesttag
1256 1258
1257 1259 $ echo a > file
1258 1260 $ hg ci -Am a -d '0 0'
1259 1261 adding file
1260 1262
1261 1263 $ echo b >> file
1262 1264 $ hg ci -m b -d '1 0'
1263 1265
1264 1266 $ echo c >> head1
1265 1267 $ hg ci -Am h1c -d '2 0'
1266 1268 adding head1
1267 1269
1268 1270 $ hg update -q 1
1269 1271 $ echo d >> head2
1270 1272 $ hg ci -Am h2d -d '3 0'
1271 1273 adding head2
1272 1274 created new head
1273 1275
1274 1276 $ echo e >> head2
1275 1277 $ hg ci -m h2e -d '4 0'
1276 1278
1277 1279 $ hg merge -q
1278 1280 $ hg ci -m merge -d '5 0'
1279 1281
1280 1282 No tag set:
1281 1283
1282 1284 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1283 1285 5: null+5
1284 1286 4: null+4
1285 1287 3: null+3
1286 1288 2: null+3
1287 1289 1: null+2
1288 1290 0: null+1
1289 1291
1290 1292 One common tag: longuest path wins:
1291 1293
1292 1294 $ hg tag -r 1 -m t1 -d '6 0' t1
1293 1295 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1294 1296 6: t1+4
1295 1297 5: t1+3
1296 1298 4: t1+2
1297 1299 3: t1+1
1298 1300 2: t1+1
1299 1301 1: t1+0
1300 1302 0: null+1
1301 1303
1302 1304 One ancestor tag: more recent wins:
1303 1305
1304 1306 $ hg tag -r 2 -m t2 -d '7 0' t2
1305 1307 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1306 1308 7: t2+3
1307 1309 6: t2+2
1308 1310 5: t2+1
1309 1311 4: t1+2
1310 1312 3: t1+1
1311 1313 2: t2+0
1312 1314 1: t1+0
1313 1315 0: null+1
1314 1316
1315 1317 Two branch tags: more recent wins:
1316 1318
1317 1319 $ hg tag -r 3 -m t3 -d '8 0' t3
1318 1320 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1319 1321 8: t3+5
1320 1322 7: t3+4
1321 1323 6: t3+3
1322 1324 5: t3+2
1323 1325 4: t3+1
1324 1326 3: t3+0
1325 1327 2: t2+0
1326 1328 1: t1+0
1327 1329 0: null+1
1328 1330
1329 1331 Merged tag overrides:
1330 1332
1331 1333 $ hg tag -r 5 -m t5 -d '9 0' t5
1332 1334 $ hg tag -r 3 -m at3 -d '10 0' at3
1333 1335 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1334 1336 10: t5+5
1335 1337 9: t5+4
1336 1338 8: t5+3
1337 1339 7: t5+2
1338 1340 6: t5+1
1339 1341 5: t5+0
1340 1342 4: at3:t3+1
1341 1343 3: at3:t3+0
1342 1344 2: t2+0
1343 1345 1: t1+0
1344 1346 0: null+1
1345 1347
1346 1348 $ cd ..
1347 1349
1348 1350
1349 1351 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1350 1352 if it is a relative path
1351 1353
1352 1354 $ mkdir -p home/styles
1353 1355
1354 1356 $ cat > home/styles/teststyle <<EOF
1355 1357 > changeset = 'test {rev}:{node|short}\n'
1356 1358 > EOF
1357 1359
1358 1360 $ HOME=`pwd`/home; export HOME
1359 1361
1360 1362 $ cat > latesttag/.hg/hgrc <<EOF
1361 1363 > [ui]
1362 1364 > style = ~/styles/teststyle
1363 1365 > EOF
1364 1366
1365 1367 $ hg -R latesttag tip
1366 1368 test 10:dee8f28249af
1367 1369
1368 1370 Test recursive showlist template (issue1989):
1369 1371
1370 1372 $ cat > style1989 <<EOF
1371 1373 > changeset = '{file_mods}{manifest}{extras}'
1372 1374 > file_mod = 'M|{author|person}\n'
1373 1375 > manifest = '{rev},{author}\n'
1374 1376 > extra = '{key}: {author}\n'
1375 1377 > EOF
1376 1378
1377 1379 $ hg -R latesttag log -r tip --style=style1989
1378 1380 M|test
1379 1381 10,test
1380 1382 branch: test
1381 1383
General Comments 0
You need to be logged in to leave comments. Login now