##// END OF EJS Templates
test-parse-date: move remaining date parsing tests from test-log
Martin Geisler -
r16923:dfaf8698 default
parent child Browse files
Show More
@@ -1,1231 +1,1215
1 1 The g is crafted to have 2 filelog topological heads in a linear
2 2 changeset graph
3 3
4 4 $ hg init a
5 5 $ cd a
6 6 $ echo a > a
7 7 $ echo f > f
8 8 $ hg ci -Ama -d '1 0'
9 9 adding a
10 10 adding f
11 11
12 12 $ hg cp a b
13 13 $ hg cp f g
14 14 $ hg ci -mb -d '2 0'
15 15
16 16 $ mkdir dir
17 17 $ hg mv b dir
18 18 $ echo g >> g
19 19 $ echo f >> f
20 20 $ hg ci -mc -d '3 0'
21 21
22 22 $ hg mv a b
23 23 $ hg cp -f f g
24 24 $ echo a > d
25 25 $ hg add d
26 26 $ hg ci -md -d '4 0'
27 27
28 28 $ hg mv dir/b e
29 29 $ hg ci -me -d '5 0'
30 30
31 31 $ hg log a
32 32 changeset: 0:9161b9aeaf16
33 33 user: test
34 34 date: Thu Jan 01 00:00:01 1970 +0000
35 35 summary: a
36 36
37 37
38 38 -f, directory
39 39
40 40 $ hg log -f dir
41 41 abort: cannot follow file not in parent revision: "dir"
42 42 [255]
43 43
44 44 -f, but no args
45 45
46 46 $ hg log -f
47 47 changeset: 4:7e4639b4691b
48 48 tag: tip
49 49 user: test
50 50 date: Thu Jan 01 00:00:05 1970 +0000
51 51 summary: e
52 52
53 53 changeset: 3:2ca5ba701980
54 54 user: test
55 55 date: Thu Jan 01 00:00:04 1970 +0000
56 56 summary: d
57 57
58 58 changeset: 2:f8954cd4dc1f
59 59 user: test
60 60 date: Thu Jan 01 00:00:03 1970 +0000
61 61 summary: c
62 62
63 63 changeset: 1:d89b0a12d229
64 64 user: test
65 65 date: Thu Jan 01 00:00:02 1970 +0000
66 66 summary: b
67 67
68 68 changeset: 0:9161b9aeaf16
69 69 user: test
70 70 date: Thu Jan 01 00:00:01 1970 +0000
71 71 summary: a
72 72
73 73
74 74 one rename
75 75
76 76 $ hg up -q 2
77 77 $ hg log -vf a
78 78 changeset: 0:9161b9aeaf16
79 79 user: test
80 80 date: Thu Jan 01 00:00:01 1970 +0000
81 81 files: a f
82 82 description:
83 83 a
84 84
85 85
86 86
87 87 many renames
88 88
89 89 $ hg up -q tip
90 90 $ hg log -vf e
91 91 changeset: 4:7e4639b4691b
92 92 tag: tip
93 93 user: test
94 94 date: Thu Jan 01 00:00:05 1970 +0000
95 95 files: dir/b e
96 96 description:
97 97 e
98 98
99 99
100 100 changeset: 2:f8954cd4dc1f
101 101 user: test
102 102 date: Thu Jan 01 00:00:03 1970 +0000
103 103 files: b dir/b f g
104 104 description:
105 105 c
106 106
107 107
108 108 changeset: 1:d89b0a12d229
109 109 user: test
110 110 date: Thu Jan 01 00:00:02 1970 +0000
111 111 files: b g
112 112 description:
113 113 b
114 114
115 115
116 116 changeset: 0:9161b9aeaf16
117 117 user: test
118 118 date: Thu Jan 01 00:00:01 1970 +0000
119 119 files: a f
120 120 description:
121 121 a
122 122
123 123
124 124
125 125
126 126 log -pf dir/b
127 127
128 128 $ hg up -q 3
129 129 $ hg log -pf dir/b
130 130 changeset: 2:f8954cd4dc1f
131 131 user: test
132 132 date: Thu Jan 01 00:00:03 1970 +0000
133 133 summary: c
134 134
135 135 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
136 136 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
137 137 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
138 138 @@ -0,0 +1,1 @@
139 139 +a
140 140
141 141 changeset: 1:d89b0a12d229
142 142 user: test
143 143 date: Thu Jan 01 00:00:02 1970 +0000
144 144 summary: b
145 145
146 146 diff -r 9161b9aeaf16 -r d89b0a12d229 b
147 147 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
148 148 +++ b/b Thu Jan 01 00:00:02 1970 +0000
149 149 @@ -0,0 +1,1 @@
150 150 +a
151 151
152 152 changeset: 0:9161b9aeaf16
153 153 user: test
154 154 date: Thu Jan 01 00:00:01 1970 +0000
155 155 summary: a
156 156
157 157 diff -r 000000000000 -r 9161b9aeaf16 a
158 158 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
159 159 +++ b/a Thu Jan 01 00:00:01 1970 +0000
160 160 @@ -0,0 +1,1 @@
161 161 +a
162 162
163 163
164 164 log -vf dir/b
165 165
166 166 $ hg log -vf dir/b
167 167 changeset: 2:f8954cd4dc1f
168 168 user: test
169 169 date: Thu Jan 01 00:00:03 1970 +0000
170 170 files: b dir/b f g
171 171 description:
172 172 c
173 173
174 174
175 175 changeset: 1:d89b0a12d229
176 176 user: test
177 177 date: Thu Jan 01 00:00:02 1970 +0000
178 178 files: b g
179 179 description:
180 180 b
181 181
182 182
183 183 changeset: 0:9161b9aeaf16
184 184 user: test
185 185 date: Thu Jan 01 00:00:01 1970 +0000
186 186 files: a f
187 187 description:
188 188 a
189 189
190 190
191 191
192 192
193 193 -f and multiple filelog heads
194 194
195 195 $ hg up -q 2
196 196 $ hg log -f g --template '{rev}\n'
197 197 2
198 198 1
199 199 0
200 200 $ hg up -q tip
201 201 $ hg log -f g --template '{rev}\n'
202 202 3
203 203 2
204 204 0
205 205
206 206
207 207 log copies with --copies
208 208
209 209 $ hg log -vC --template '{rev} {file_copies}\n'
210 210 4 e (dir/b)
211 211 3 b (a)g (f)
212 212 2 dir/b (b)
213 213 1 b (a)g (f)
214 214 0
215 215
216 216 log copies switch without --copies, with old filecopy template
217 217
218 218 $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
219 219 4
220 220 3
221 221 2
222 222 1
223 223 0
224 224
225 225 log copies switch with --copies
226 226
227 227 $ hg log -vC --template '{rev} {file_copies_switch}\n'
228 228 4 e (dir/b)
229 229 3 b (a)g (f)
230 230 2 dir/b (b)
231 231 1 b (a)g (f)
232 232 0
233 233
234 234
235 235 log copies with hardcoded style and with --style=default
236 236
237 237 $ hg log -vC -r4
238 238 changeset: 4:7e4639b4691b
239 239 tag: tip
240 240 user: test
241 241 date: Thu Jan 01 00:00:05 1970 +0000
242 242 files: dir/b e
243 243 copies: e (dir/b)
244 244 description:
245 245 e
246 246
247 247
248 248 $ hg log -vC -r4 --style=default
249 249 changeset: 4:7e4639b4691b
250 250 tag: tip
251 251 user: test
252 252 date: Thu Jan 01 00:00:05 1970 +0000
253 253 files: dir/b e
254 254 copies: e (dir/b)
255 255 description:
256 256 e
257 257
258 258
259 259
260 260
261 261 log copies, non-linear manifest
262 262
263 263 $ hg up -C 3
264 264 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
265 265 $ hg mv dir/b e
266 266 $ echo foo > foo
267 267 $ hg ci -Ame2 -d '6 0'
268 268 adding foo
269 269 created new head
270 270 $ hg log -v --template '{rev} {file_copies}\n' -r 5
271 271 5 e (dir/b)
272 272
273 273
274 274 log copies, execute bit set
275 275
276 276 #if execbit
277 277 $ chmod +x e
278 278 $ hg ci -me3 -d '7 0'
279 279 $ hg log -v --template '{rev} {file_copies}\n' -r 6
280 280 6
281 281 #endif
282 282
283 283
284 284 log -p d
285 285
286 286 $ hg log -pv d
287 287 changeset: 3:2ca5ba701980
288 288 user: test
289 289 date: Thu Jan 01 00:00:04 1970 +0000
290 290 files: a b d g
291 291 description:
292 292 d
293 293
294 294
295 295 diff -r f8954cd4dc1f -r 2ca5ba701980 d
296 296 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
297 297 +++ b/d Thu Jan 01 00:00:04 1970 +0000
298 298 @@ -0,0 +1,1 @@
299 299 +a
300 300
301 301
302 302
303 303 log --removed file
304 304
305 305 $ hg log --removed -v a
306 306 changeset: 3:2ca5ba701980
307 307 user: test
308 308 date: Thu Jan 01 00:00:04 1970 +0000
309 309 files: a b d g
310 310 description:
311 311 d
312 312
313 313
314 314 changeset: 0:9161b9aeaf16
315 315 user: test
316 316 date: Thu Jan 01 00:00:01 1970 +0000
317 317 files: a f
318 318 description:
319 319 a
320 320
321 321
322 322
323 323 log --removed revrange file
324 324
325 325 $ hg log --removed -v -r0:2 a
326 326 changeset: 0:9161b9aeaf16
327 327 user: test
328 328 date: Thu Jan 01 00:00:01 1970 +0000
329 329 files: a f
330 330 description:
331 331 a
332 332
333 333
334 334 $ cd ..
335 335
336 336 log --follow tests
337 337
338 338 $ hg init follow
339 339 $ cd follow
340 340
341 341 $ echo base > base
342 342 $ hg ci -Ambase -d '1 0'
343 343 adding base
344 344
345 345 $ echo r1 >> base
346 346 $ hg ci -Amr1 -d '1 0'
347 347 $ echo r2 >> base
348 348 $ hg ci -Amr2 -d '1 0'
349 349
350 350 $ hg up -C 1
351 351 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
352 352 $ echo b1 > b1
353 353 $ hg ci -Amb1 -d '1 0'
354 354 adding b1
355 355 created new head
356 356
357 357
358 358 log -f
359 359
360 360 $ hg log -f
361 361 changeset: 3:e62f78d544b4
362 362 tag: tip
363 363 parent: 1:3d5bf5654eda
364 364 user: test
365 365 date: Thu Jan 01 00:00:01 1970 +0000
366 366 summary: b1
367 367
368 368 changeset: 1:3d5bf5654eda
369 369 user: test
370 370 date: Thu Jan 01 00:00:01 1970 +0000
371 371 summary: r1
372 372
373 373 changeset: 0:67e992f2c4f3
374 374 user: test
375 375 date: Thu Jan 01 00:00:01 1970 +0000
376 376 summary: base
377 377
378 378
379 379
380 380 log -f -r 1:tip
381 381
382 382 $ hg up -C 0
383 383 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
384 384 $ echo b2 > b2
385 385 $ hg ci -Amb2 -d '1 0'
386 386 adding b2
387 387 created new head
388 388 $ hg log -f -r 1:tip
389 389 changeset: 1:3d5bf5654eda
390 390 user: test
391 391 date: Thu Jan 01 00:00:01 1970 +0000
392 392 summary: r1
393 393
394 394 changeset: 2:60c670bf5b30
395 395 user: test
396 396 date: Thu Jan 01 00:00:01 1970 +0000
397 397 summary: r2
398 398
399 399 changeset: 3:e62f78d544b4
400 400 parent: 1:3d5bf5654eda
401 401 user: test
402 402 date: Thu Jan 01 00:00:01 1970 +0000
403 403 summary: b1
404 404
405 405
406 406
407 407 log -r . with two parents
408 408
409 409 $ hg up -C 3
410 410 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
411 411 $ hg merge tip
412 412 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
413 413 (branch merge, don't forget to commit)
414 414 $ hg log -r .
415 415 changeset: 3:e62f78d544b4
416 416 parent: 1:3d5bf5654eda
417 417 user: test
418 418 date: Thu Jan 01 00:00:01 1970 +0000
419 419 summary: b1
420 420
421 421
422 422
423 423 log -r . with one parent
424 424
425 425 $ hg ci -mm12 -d '1 0'
426 426 $ hg log -r .
427 427 changeset: 5:302e9dd6890d
428 428 tag: tip
429 429 parent: 3:e62f78d544b4
430 430 parent: 4:ddb82e70d1a1
431 431 user: test
432 432 date: Thu Jan 01 00:00:01 1970 +0000
433 433 summary: m12
434 434
435 435
436 436 $ echo postm >> b1
437 437 $ hg ci -Amb1.1 -d'1 0'
438 438
439 439
440 440 log --follow-first
441 441
442 442 $ hg log --follow-first
443 443 changeset: 6:2404bbcab562
444 444 tag: tip
445 445 user: test
446 446 date: Thu Jan 01 00:00:01 1970 +0000
447 447 summary: b1.1
448 448
449 449 changeset: 5:302e9dd6890d
450 450 parent: 3:e62f78d544b4
451 451 parent: 4:ddb82e70d1a1
452 452 user: test
453 453 date: Thu Jan 01 00:00:01 1970 +0000
454 454 summary: m12
455 455
456 456 changeset: 3:e62f78d544b4
457 457 parent: 1:3d5bf5654eda
458 458 user: test
459 459 date: Thu Jan 01 00:00:01 1970 +0000
460 460 summary: b1
461 461
462 462 changeset: 1:3d5bf5654eda
463 463 user: test
464 464 date: Thu Jan 01 00:00:01 1970 +0000
465 465 summary: r1
466 466
467 467 changeset: 0:67e992f2c4f3
468 468 user: test
469 469 date: Thu Jan 01 00:00:01 1970 +0000
470 470 summary: base
471 471
472 472
473 473
474 474 log -P 2
475 475
476 476 $ hg log -P 2
477 477 changeset: 6:2404bbcab562
478 478 tag: tip
479 479 user: test
480 480 date: Thu Jan 01 00:00:01 1970 +0000
481 481 summary: b1.1
482 482
483 483 changeset: 5:302e9dd6890d
484 484 parent: 3:e62f78d544b4
485 485 parent: 4:ddb82e70d1a1
486 486 user: test
487 487 date: Thu Jan 01 00:00:01 1970 +0000
488 488 summary: m12
489 489
490 490 changeset: 4:ddb82e70d1a1
491 491 parent: 0:67e992f2c4f3
492 492 user: test
493 493 date: Thu Jan 01 00:00:01 1970 +0000
494 494 summary: b2
495 495
496 496 changeset: 3:e62f78d544b4
497 497 parent: 1:3d5bf5654eda
498 498 user: test
499 499 date: Thu Jan 01 00:00:01 1970 +0000
500 500 summary: b1
501 501
502 502
503 503
504 504 log -r tip -p --git
505 505
506 506 $ hg log -r tip -p --git
507 507 changeset: 6:2404bbcab562
508 508 tag: tip
509 509 user: test
510 510 date: Thu Jan 01 00:00:01 1970 +0000
511 511 summary: b1.1
512 512
513 513 diff --git a/b1 b/b1
514 514 --- a/b1
515 515 +++ b/b1
516 516 @@ -1,1 +1,2 @@
517 517 b1
518 518 +postm
519 519
520 520
521 521
522 522 log -r ""
523 523
524 524 $ hg log -r ''
525 525 hg: parse error: empty query
526 526 [255]
527 527
528 528 log -r <some unknown node id>
529 529
530 530 $ hg log -r 1000000000000000000000000000000000000000
531 531 abort: unknown revision '1000000000000000000000000000000000000000'!
532 532 [255]
533 533
534 534 log -k r1
535 535
536 536 $ hg log -k r1
537 537 changeset: 1:3d5bf5654eda
538 538 user: test
539 539 date: Thu Jan 01 00:00:01 1970 +0000
540 540 summary: r1
541 541
542 log -d " " (whitespaces only)
543
544 $ hg log -d " "
545 abort: dates cannot consist entirely of whitespace
546 [255]
547
548 log -d -1
549
550 $ hg log -d -1
551
552 Negative ranges
553 $ hg log -d "--2"
554 abort: -2 must be nonnegative (see 'hg help dates')
555 [255]
556
557
558 542 log -p -l2 --color=always
559 543
560 544 $ hg --config extensions.color= --config color.mode=ansi \
561 545 > log -p -l2 --color=always
562 546 \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc)
563 547 tag: tip
564 548 user: test
565 549 date: Thu Jan 01 00:00:01 1970 +0000
566 550 summary: b1.1
567 551
568 552 \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
569 553 \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
570 554 \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
571 555 \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
572 556 b1
573 557 \x1b[0;32m+postm\x1b[0m (esc)
574 558
575 559 \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc)
576 560 parent: 3:e62f78d544b4
577 561 parent: 4:ddb82e70d1a1
578 562 user: test
579 563 date: Thu Jan 01 00:00:01 1970 +0000
580 564 summary: m12
581 565
582 566 \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
583 567 \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
584 568 \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
585 569 \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
586 570 \x1b[0;32m+b2\x1b[0m (esc)
587 571
588 572
589 573
590 574 log -r tip --stat
591 575
592 576 $ hg log -r tip --stat
593 577 changeset: 6:2404bbcab562
594 578 tag: tip
595 579 user: test
596 580 date: Thu Jan 01 00:00:01 1970 +0000
597 581 summary: b1.1
598 582
599 583 b1 | 1 +
600 584 1 files changed, 1 insertions(+), 0 deletions(-)
601 585
602 586
603 587 $ cd ..
604 588
605 589
606 590 User
607 591
608 592 $ hg init usertest
609 593 $ cd usertest
610 594
611 595 $ echo a > a
612 596 $ hg ci -A -m "a" -u "User One <user1@example.org>"
613 597 adding a
614 598 $ echo b > b
615 599 $ hg ci -A -m "b" -u "User Two <user2@example.org>"
616 600 adding b
617 601
618 602 $ hg log -u "User One <user1@example.org>"
619 603 changeset: 0:29a4c94f1924
620 604 user: User One <user1@example.org>
621 605 date: Thu Jan 01 00:00:00 1970 +0000
622 606 summary: a
623 607
624 608 $ hg log -u "user1" -u "user2"
625 609 changeset: 1:e834b5e69c0e
626 610 tag: tip
627 611 user: User Two <user2@example.org>
628 612 date: Thu Jan 01 00:00:00 1970 +0000
629 613 summary: b
630 614
631 615 changeset: 0:29a4c94f1924
632 616 user: User One <user1@example.org>
633 617 date: Thu Jan 01 00:00:00 1970 +0000
634 618 summary: a
635 619
636 620 $ hg log -u "user3"
637 621
638 622 $ cd ..
639 623
640 624 $ hg init branches
641 625 $ cd branches
642 626
643 627 $ echo a > a
644 628 $ hg ci -A -m "commit on default"
645 629 adding a
646 630 $ hg branch test
647 631 marked working directory as branch test
648 632 (branches are permanent and global, did you want a bookmark?)
649 633 $ echo b > b
650 634 $ hg ci -A -m "commit on test"
651 635 adding b
652 636
653 637 $ hg up default
654 638 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
655 639 $ echo c > c
656 640 $ hg ci -A -m "commit on default"
657 641 adding c
658 642 $ hg up test
659 643 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
660 644 $ echo c > c
661 645 $ hg ci -A -m "commit on test"
662 646 adding c
663 647
664 648
665 649 log -b default
666 650
667 651 $ hg log -b default
668 652 changeset: 2:c3a4f03cc9a7
669 653 parent: 0:24427303d56f
670 654 user: test
671 655 date: Thu Jan 01 00:00:00 1970 +0000
672 656 summary: commit on default
673 657
674 658 changeset: 0:24427303d56f
675 659 user: test
676 660 date: Thu Jan 01 00:00:00 1970 +0000
677 661 summary: commit on default
678 662
679 663
680 664
681 665 log -b test
682 666
683 667 $ hg log -b test
684 668 changeset: 3:f5d8de11c2e2
685 669 branch: test
686 670 tag: tip
687 671 parent: 1:d32277701ccb
688 672 user: test
689 673 date: Thu Jan 01 00:00:00 1970 +0000
690 674 summary: commit on test
691 675
692 676 changeset: 1:d32277701ccb
693 677 branch: test
694 678 user: test
695 679 date: Thu Jan 01 00:00:00 1970 +0000
696 680 summary: commit on test
697 681
698 682
699 683
700 684 log -b dummy
701 685
702 686 $ hg log -b dummy
703 687 abort: unknown revision 'dummy'!
704 688 [255]
705 689
706 690
707 691 log -b .
708 692
709 693 $ hg log -b .
710 694 changeset: 3:f5d8de11c2e2
711 695 branch: test
712 696 tag: tip
713 697 parent: 1:d32277701ccb
714 698 user: test
715 699 date: Thu Jan 01 00:00:00 1970 +0000
716 700 summary: commit on test
717 701
718 702 changeset: 1:d32277701ccb
719 703 branch: test
720 704 user: test
721 705 date: Thu Jan 01 00:00:00 1970 +0000
722 706 summary: commit on test
723 707
724 708
725 709
726 710 log -b default -b test
727 711
728 712 $ hg log -b default -b test
729 713 changeset: 3:f5d8de11c2e2
730 714 branch: test
731 715 tag: tip
732 716 parent: 1:d32277701ccb
733 717 user: test
734 718 date: Thu Jan 01 00:00:00 1970 +0000
735 719 summary: commit on test
736 720
737 721 changeset: 2:c3a4f03cc9a7
738 722 parent: 0:24427303d56f
739 723 user: test
740 724 date: Thu Jan 01 00:00:00 1970 +0000
741 725 summary: commit on default
742 726
743 727 changeset: 1:d32277701ccb
744 728 branch: test
745 729 user: test
746 730 date: Thu Jan 01 00:00:00 1970 +0000
747 731 summary: commit on test
748 732
749 733 changeset: 0:24427303d56f
750 734 user: test
751 735 date: Thu Jan 01 00:00:00 1970 +0000
752 736 summary: commit on default
753 737
754 738
755 739
756 740 log -b default -b .
757 741
758 742 $ hg log -b default -b .
759 743 changeset: 3:f5d8de11c2e2
760 744 branch: test
761 745 tag: tip
762 746 parent: 1:d32277701ccb
763 747 user: test
764 748 date: Thu Jan 01 00:00:00 1970 +0000
765 749 summary: commit on test
766 750
767 751 changeset: 2:c3a4f03cc9a7
768 752 parent: 0:24427303d56f
769 753 user: test
770 754 date: Thu Jan 01 00:00:00 1970 +0000
771 755 summary: commit on default
772 756
773 757 changeset: 1:d32277701ccb
774 758 branch: test
775 759 user: test
776 760 date: Thu Jan 01 00:00:00 1970 +0000
777 761 summary: commit on test
778 762
779 763 changeset: 0:24427303d56f
780 764 user: test
781 765 date: Thu Jan 01 00:00:00 1970 +0000
782 766 summary: commit on default
783 767
784 768
785 769
786 770 log -b . -b test
787 771
788 772 $ hg log -b . -b test
789 773 changeset: 3:f5d8de11c2e2
790 774 branch: test
791 775 tag: tip
792 776 parent: 1:d32277701ccb
793 777 user: test
794 778 date: Thu Jan 01 00:00:00 1970 +0000
795 779 summary: commit on test
796 780
797 781 changeset: 1:d32277701ccb
798 782 branch: test
799 783 user: test
800 784 date: Thu Jan 01 00:00:00 1970 +0000
801 785 summary: commit on test
802 786
803 787
804 788
805 789 log -b 2
806 790
807 791 $ hg log -b 2
808 792 changeset: 2:c3a4f03cc9a7
809 793 parent: 0:24427303d56f
810 794 user: test
811 795 date: Thu Jan 01 00:00:00 1970 +0000
812 796 summary: commit on default
813 797
814 798 changeset: 0:24427303d56f
815 799 user: test
816 800 date: Thu Jan 01 00:00:00 1970 +0000
817 801 summary: commit on default
818 802
819 803
820 804
821 805 log -p --cwd dir (in subdir)
822 806
823 807 $ mkdir dir
824 808 $ hg log -p --cwd dir
825 809 changeset: 3:f5d8de11c2e2
826 810 branch: test
827 811 tag: tip
828 812 parent: 1:d32277701ccb
829 813 user: test
830 814 date: Thu Jan 01 00:00:00 1970 +0000
831 815 summary: commit on test
832 816
833 817 diff -r d32277701ccb -r f5d8de11c2e2 c
834 818 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
835 819 +++ b/c Thu Jan 01 00:00:00 1970 +0000
836 820 @@ -0,0 +1,1 @@
837 821 +c
838 822
839 823 changeset: 2:c3a4f03cc9a7
840 824 parent: 0:24427303d56f
841 825 user: test
842 826 date: Thu Jan 01 00:00:00 1970 +0000
843 827 summary: commit on default
844 828
845 829 diff -r 24427303d56f -r c3a4f03cc9a7 c
846 830 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
847 831 +++ b/c Thu Jan 01 00:00:00 1970 +0000
848 832 @@ -0,0 +1,1 @@
849 833 +c
850 834
851 835 changeset: 1:d32277701ccb
852 836 branch: test
853 837 user: test
854 838 date: Thu Jan 01 00:00:00 1970 +0000
855 839 summary: commit on test
856 840
857 841 diff -r 24427303d56f -r d32277701ccb b
858 842 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
859 843 +++ b/b Thu Jan 01 00:00:00 1970 +0000
860 844 @@ -0,0 +1,1 @@
861 845 +b
862 846
863 847 changeset: 0:24427303d56f
864 848 user: test
865 849 date: Thu Jan 01 00:00:00 1970 +0000
866 850 summary: commit on default
867 851
868 852 diff -r 000000000000 -r 24427303d56f a
869 853 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
870 854 +++ b/a Thu Jan 01 00:00:00 1970 +0000
871 855 @@ -0,0 +1,1 @@
872 856 +a
873 857
874 858
875 859
876 860 log -p -R repo
877 861
878 862 $ cd dir
879 863 $ hg log -p -R .. ../a
880 864 changeset: 0:24427303d56f
881 865 user: test
882 866 date: Thu Jan 01 00:00:00 1970 +0000
883 867 summary: commit on default
884 868
885 869 diff -r 000000000000 -r 24427303d56f a
886 870 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
887 871 +++ b/a Thu Jan 01 00:00:00 1970 +0000
888 872 @@ -0,0 +1,1 @@
889 873 +a
890 874
891 875
892 876 $ cd ../..
893 877
894 878 $ hg init follow2
895 879 $ cd follow2
896 880
897 881 # Build the following history:
898 882 # tip - o - x - o - x - x
899 883 # \ /
900 884 # o - o - o - x
901 885 # \ /
902 886 # o
903 887 #
904 888 # Where "o" is a revision containing "foo" and
905 889 # "x" is a revision without "foo"
906 890
907 891 $ touch init
908 892 $ hg ci -A -m "init, unrelated"
909 893 adding init
910 894 $ echo 'foo' > init
911 895 $ hg ci -m "change, unrelated"
912 896 $ echo 'foo' > foo
913 897 $ hg ci -A -m "add unrelated old foo"
914 898 adding foo
915 899 $ hg rm foo
916 900 $ hg ci -m "delete foo, unrelated"
917 901 $ echo 'related' > foo
918 902 $ hg ci -A -m "add foo, related"
919 903 adding foo
920 904
921 905 $ hg up 0
922 906 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
923 907 $ touch branch
924 908 $ hg ci -A -m "first branch, unrelated"
925 909 adding branch
926 910 created new head
927 911 $ touch foo
928 912 $ hg ci -A -m "create foo, related"
929 913 adding foo
930 914 $ echo 'change' > foo
931 915 $ hg ci -m "change foo, related"
932 916
933 917 $ hg up 6
934 918 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
935 919 $ echo 'change foo in branch' > foo
936 920 $ hg ci -m "change foo in branch, related"
937 921 created new head
938 922 $ hg merge 7
939 923 merging foo
940 924 warning: conflicts during merge.
941 925 merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
942 926 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
943 927 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
944 928 [1]
945 929 $ echo 'merge 1' > foo
946 930 $ hg resolve -m foo
947 931 $ hg ci -m "First merge, related"
948 932
949 933 $ hg merge 4
950 934 merging foo
951 935 warning: conflicts during merge.
952 936 merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
953 937 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
954 938 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
955 939 [1]
956 940 $ echo 'merge 2' > foo
957 941 $ hg resolve -m foo
958 942 $ hg ci -m "Last merge, related"
959 943
960 944 $ hg --config "extensions.graphlog=" glog
961 945 @ changeset: 10:4dae8563d2c5
962 946 |\ tag: tip
963 947 | | parent: 9:7b35701b003e
964 948 | | parent: 4:88176d361b69
965 949 | | user: test
966 950 | | date: Thu Jan 01 00:00:00 1970 +0000
967 951 | | summary: Last merge, related
968 952 | |
969 953 | o changeset: 9:7b35701b003e
970 954 | |\ parent: 8:e5416ad8a855
971 955 | | | parent: 7:87fe3144dcfa
972 956 | | | user: test
973 957 | | | date: Thu Jan 01 00:00:00 1970 +0000
974 958 | | | summary: First merge, related
975 959 | | |
976 960 | | o changeset: 8:e5416ad8a855
977 961 | | | parent: 6:dc6c325fe5ee
978 962 | | | user: test
979 963 | | | date: Thu Jan 01 00:00:00 1970 +0000
980 964 | | | summary: change foo in branch, related
981 965 | | |
982 966 | o | changeset: 7:87fe3144dcfa
983 967 | |/ user: test
984 968 | | date: Thu Jan 01 00:00:00 1970 +0000
985 969 | | summary: change foo, related
986 970 | |
987 971 | o changeset: 6:dc6c325fe5ee
988 972 | | user: test
989 973 | | date: Thu Jan 01 00:00:00 1970 +0000
990 974 | | summary: create foo, related
991 975 | |
992 976 | o changeset: 5:73db34516eb9
993 977 | | parent: 0:e87515fd044a
994 978 | | user: test
995 979 | | date: Thu Jan 01 00:00:00 1970 +0000
996 980 | | summary: first branch, unrelated
997 981 | |
998 982 o | changeset: 4:88176d361b69
999 983 | | user: test
1000 984 | | date: Thu Jan 01 00:00:00 1970 +0000
1001 985 | | summary: add foo, related
1002 986 | |
1003 987 o | changeset: 3:dd78ae4afb56
1004 988 | | user: test
1005 989 | | date: Thu Jan 01 00:00:00 1970 +0000
1006 990 | | summary: delete foo, unrelated
1007 991 | |
1008 992 o | changeset: 2:c4c64aedf0f7
1009 993 | | user: test
1010 994 | | date: Thu Jan 01 00:00:00 1970 +0000
1011 995 | | summary: add unrelated old foo
1012 996 | |
1013 997 o | changeset: 1:e5faa7440653
1014 998 |/ user: test
1015 999 | date: Thu Jan 01 00:00:00 1970 +0000
1016 1000 | summary: change, unrelated
1017 1001 |
1018 1002 o changeset: 0:e87515fd044a
1019 1003 user: test
1020 1004 date: Thu Jan 01 00:00:00 1970 +0000
1021 1005 summary: init, unrelated
1022 1006
1023 1007
1024 1008 $ hg --traceback log -f foo
1025 1009 changeset: 10:4dae8563d2c5
1026 1010 tag: tip
1027 1011 parent: 9:7b35701b003e
1028 1012 parent: 4:88176d361b69
1029 1013 user: test
1030 1014 date: Thu Jan 01 00:00:00 1970 +0000
1031 1015 summary: Last merge, related
1032 1016
1033 1017 changeset: 9:7b35701b003e
1034 1018 parent: 8:e5416ad8a855
1035 1019 parent: 7:87fe3144dcfa
1036 1020 user: test
1037 1021 date: Thu Jan 01 00:00:00 1970 +0000
1038 1022 summary: First merge, related
1039 1023
1040 1024 changeset: 8:e5416ad8a855
1041 1025 parent: 6:dc6c325fe5ee
1042 1026 user: test
1043 1027 date: Thu Jan 01 00:00:00 1970 +0000
1044 1028 summary: change foo in branch, related
1045 1029
1046 1030 changeset: 7:87fe3144dcfa
1047 1031 user: test
1048 1032 date: Thu Jan 01 00:00:00 1970 +0000
1049 1033 summary: change foo, related
1050 1034
1051 1035 changeset: 6:dc6c325fe5ee
1052 1036 user: test
1053 1037 date: Thu Jan 01 00:00:00 1970 +0000
1054 1038 summary: create foo, related
1055 1039
1056 1040 changeset: 4:88176d361b69
1057 1041 user: test
1058 1042 date: Thu Jan 01 00:00:00 1970 +0000
1059 1043 summary: add foo, related
1060 1044
1061 1045
1062 1046 Also check when maxrev < lastrevfilelog
1063 1047
1064 1048 $ hg --traceback log -f -r4 foo
1065 1049 changeset: 4:88176d361b69
1066 1050 user: test
1067 1051 date: Thu Jan 01 00:00:00 1970 +0000
1068 1052 summary: add foo, related
1069 1053
1070 1054 $ cd ..
1071 1055
1072 1056 Issue2383: hg log showing _less_ differences than hg diff
1073 1057
1074 1058 $ hg init issue2383
1075 1059 $ cd issue2383
1076 1060
1077 1061 Create a test repo:
1078 1062
1079 1063 $ echo a > a
1080 1064 $ hg ci -Am0
1081 1065 adding a
1082 1066 $ echo b > b
1083 1067 $ hg ci -Am1
1084 1068 adding b
1085 1069 $ hg co 0
1086 1070 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1087 1071 $ echo b > a
1088 1072 $ hg ci -m2
1089 1073 created new head
1090 1074
1091 1075 Merge:
1092 1076
1093 1077 $ hg merge
1094 1078 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1095 1079 (branch merge, don't forget to commit)
1096 1080
1097 1081 Make sure there's a file listed in the merge to trigger the bug:
1098 1082
1099 1083 $ echo c > a
1100 1084 $ hg ci -m3
1101 1085
1102 1086 Two files shown here in diff:
1103 1087
1104 1088 $ hg diff --rev 2:3
1105 1089 diff -r b09be438c43a -r 8e07aafe1edc a
1106 1090 --- a/a Thu Jan 01 00:00:00 1970 +0000
1107 1091 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1108 1092 @@ -1,1 +1,1 @@
1109 1093 -b
1110 1094 +c
1111 1095 diff -r b09be438c43a -r 8e07aafe1edc b
1112 1096 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1113 1097 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1114 1098 @@ -0,0 +1,1 @@
1115 1099 +b
1116 1100
1117 1101 Diff here should be the same:
1118 1102
1119 1103 $ hg log -vpr 3
1120 1104 changeset: 3:8e07aafe1edc
1121 1105 tag: tip
1122 1106 parent: 2:b09be438c43a
1123 1107 parent: 1:925d80f479bb
1124 1108 user: test
1125 1109 date: Thu Jan 01 00:00:00 1970 +0000
1126 1110 files: a
1127 1111 description:
1128 1112 3
1129 1113
1130 1114
1131 1115 diff -r b09be438c43a -r 8e07aafe1edc a
1132 1116 --- a/a Thu Jan 01 00:00:00 1970 +0000
1133 1117 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1134 1118 @@ -1,1 +1,1 @@
1135 1119 -b
1136 1120 +c
1137 1121 diff -r b09be438c43a -r 8e07aafe1edc b
1138 1122 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1139 1123 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1140 1124 @@ -0,0 +1,1 @@
1141 1125 +b
1142 1126
1143 1127 $ cd ..
1144 1128
1145 1129 'hg log -r rev fn' when last(filelog(fn)) != rev
1146 1130
1147 1131 $ hg init simplelog
1148 1132 $ cd simplelog
1149 1133 $ echo f > a
1150 1134 $ hg ci -Am'a' -d '0 0'
1151 1135 adding a
1152 1136 $ echo f >> a
1153 1137 $ hg ci -Am'a bis' -d '1 0'
1154 1138
1155 1139 $ hg log -r0 a
1156 1140 changeset: 0:9f758d63dcde
1157 1141 user: test
1158 1142 date: Thu Jan 01 00:00:00 1970 +0000
1159 1143 summary: a
1160 1144
1161 1145 $ cat > $HGTMP/testhidden.py << EOF
1162 1146 > def reposetup(ui, repo):
1163 1147 > for line in repo.opener('hidden'):
1164 1148 > ctx = repo[line.strip()]
1165 1149 > repo.changelog.hiddenrevs.add(ctx.rev())
1166 1150 > EOF
1167 1151 $ echo '[extensions]' >> $HGRCPATH
1168 1152 $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH
1169 1153 $ touch .hg/hidden
1170 1154 $ hg log --template='{rev}:{node}\n'
1171 1155 1:a765632148dc55d38c35c4f247c618701886cb2f
1172 1156 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1173 1157 $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden
1174 1158 $ hg log --template='{rev}:{node}\n'
1175 1159 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1176 1160 $ hg log --template='{rev}:{node}\n' --hidden
1177 1161 1:a765632148dc55d38c35c4f247c618701886cb2f
1178 1162 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1179 1163
1180 1164 clear extensions configuration
1181 1165 $ echo '[extensions]' >> $HGRCPATH
1182 1166 $ echo "hidden=!" >> $HGRCPATH
1183 1167 $ cd ..
1184 1168
1185 1169 test -u/-k for problematic encoding
1186 1170 # unicode: cp932:
1187 1171 # u30A2 0x83 0x41(= 'A')
1188 1172 # u30C2 0x83 0x61(= 'a')
1189 1173
1190 1174 $ hg init problematicencoding
1191 1175 $ cd problematicencoding
1192 1176
1193 1177 $ python > setup.sh <<EOF
1194 1178 > print u'''
1195 1179 > echo a > text
1196 1180 > hg add text
1197 1181 > hg --encoding utf-8 commit -u '\u30A2' -m none
1198 1182 > echo b > text
1199 1183 > hg --encoding utf-8 commit -u '\u30C2' -m none
1200 1184 > echo c > text
1201 1185 > hg --encoding utf-8 commit -u none -m '\u30A2'
1202 1186 > echo d > text
1203 1187 > hg --encoding utf-8 commit -u none -m '\u30C2'
1204 1188 > '''.encode('utf-8')
1205 1189 > EOF
1206 1190 $ sh < setup.sh
1207 1191
1208 1192 test in problematic encoding
1209 1193 $ python > test.sh <<EOF
1210 1194 > print u'''
1211 1195 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
1212 1196 > echo ====
1213 1197 > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2'
1214 1198 > echo ====
1215 1199 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2'
1216 1200 > echo ====
1217 1201 > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2'
1218 1202 > '''.encode('cp932')
1219 1203 > EOF
1220 1204 $ sh < test.sh
1221 1205 0
1222 1206 ====
1223 1207 1
1224 1208 ====
1225 1209 2
1226 1210 0
1227 1211 ====
1228 1212 3
1229 1213 1
1230 1214
1231 1215 $ cd ..
@@ -1,220 +1,236
1 1 This runs with TZ="GMT"
2 2
3 3 $ hg init
4 4 $ echo "test-parse-date" > a
5 5 $ hg add a
6 6 $ hg ci -d "2006-02-01 13:00:30" -m "rev 0"
7 7 $ echo "hi!" >> a
8 8 $ hg ci -d "2006-02-01 13:00:30 -0500" -m "rev 1"
9 9 $ hg tag -d "2006-04-15 13:30" "Hi"
10 10 $ hg backout --merge -d "2006-04-15 13:30 +0200" -m "rev 3" 1
11 11 reverting a
12 12 created new head
13 13 changeset 3:107ce1ee2b43 backs out changeset 1:25a1420a55f8
14 14 merging with changeset 3:107ce1ee2b43
15 15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 16 (branch merge, don't forget to commit)
17 17 $ hg ci -d "1150000000 14400" -m "rev 4 (merge)"
18 18 $ echo "fail" >> a
19 19 $ hg ci -d "should fail" -m "fail"
20 20 abort: invalid date: 'should fail'
21 21 [255]
22 22 $ hg ci -d "100000000000000000 1400" -m "fail"
23 23 abort: date exceeds 32 bits: 100000000000000000
24 24 [255]
25 25 $ hg ci -d "100000 1400000" -m "fail"
26 26 abort: impossible time zone offset: 1400000
27 27 [255]
28 28
29 29 Check with local timezone other than GMT and with DST
30 30
31 31 $ TZ="PST+8PDT"
32 32 $ export TZ
33 33
34 34 PST=UTC-8 / PDT=UTC-7
35 35
36 36 $ hg debugrebuildstate
37 37 $ echo "a" > a
38 38 $ hg ci -d "2006-07-15 13:30" -m "summer@UTC-7"
39 39 $ hg debugrebuildstate
40 40 $ echo "b" > a
41 41 $ hg ci -d "2006-07-15 13:30 +0500" -m "summer@UTC+5"
42 42 $ hg debugrebuildstate
43 43 $ echo "c" > a
44 44 $ hg ci -d "2006-01-15 13:30" -m "winter@UTC-8"
45 45 $ hg debugrebuildstate
46 46 $ echo "d" > a
47 47 $ hg ci -d "2006-01-15 13:30 +0500" -m "winter@UTC+5"
48 48 $ hg log --template '{date|date}\n'
49 49 Sun Jan 15 13:30:00 2006 +0500
50 50 Sun Jan 15 13:30:00 2006 -0800
51 51 Sat Jul 15 13:30:00 2006 +0500
52 52 Sat Jul 15 13:30:00 2006 -0700
53 53 Sun Jun 11 00:26:40 2006 -0400
54 54 Sat Apr 15 13:30:00 2006 +0200
55 55 Sat Apr 15 13:30:00 2006 +0000
56 56 Wed Feb 01 13:00:30 2006 -0500
57 57 Wed Feb 01 13:00:30 2006 +0000
58 58
59 59 Test issue1014 (fractional timezones)
60 60
61 61 $ hg debugdate "1000000000 -16200" # 0430
62 62 internal: 1000000000 -16200
63 63 standard: Sun Sep 09 06:16:40 2001 +0430
64 64 $ hg debugdate "1000000000 -15300" # 0415
65 65 internal: 1000000000 -15300
66 66 standard: Sun Sep 09 06:01:40 2001 +0415
67 67 $ hg debugdate "1000000000 -14400" # 0400
68 68 internal: 1000000000 -14400
69 69 standard: Sun Sep 09 05:46:40 2001 +0400
70 70 $ hg debugdate "1000000000 0" # GMT
71 71 internal: 1000000000 0
72 72 standard: Sun Sep 09 01:46:40 2001 +0000
73 73 $ hg debugdate "1000000000 14400" # -0400
74 74 internal: 1000000000 14400
75 75 standard: Sat Sep 08 21:46:40 2001 -0400
76 76 $ hg debugdate "1000000000 15300" # -0415
77 77 internal: 1000000000 15300
78 78 standard: Sat Sep 08 21:31:40 2001 -0415
79 79 $ hg debugdate "1000000000 16200" # -0430
80 80 internal: 1000000000 16200
81 81 standard: Sat Sep 08 21:16:40 2001 -0430
82 82 $ hg debugdate "Sat Sep 08 21:16:40 2001 +0430"
83 83 internal: 999967600 -16200
84 84 standard: Sat Sep 08 21:16:40 2001 +0430
85 85 $ hg debugdate "Sat Sep 08 21:16:40 2001 -0430"
86 86 internal: 1000000000 16200
87 87 standard: Sat Sep 08 21:16:40 2001 -0430
88 88
89 89 Test 12-hours times
90 90
91 91 $ hg debugdate "2006-02-01 1:00:30PM +0000"
92 92 internal: 1138798830 0
93 93 standard: Wed Feb 01 13:00:30 2006 +0000
94 94 $ hg debugdate "1:00:30PM" > /dev/null
95 95
96 Normal range
97
98 $ hg log -d -1
99
100 Negative range
101
102 $ hg log -d "--2"
103 abort: -2 must be nonnegative (see 'hg help dates')
104 [255]
105
106 Whitespace only
107
108 $ hg log -d " "
109 abort: dates cannot consist entirely of whitespace
110 [255]
111
96 112 Test date formats with '>' or '<' accompanied by space characters
97 113
98 114 $ hg log -d '>' --template '{date|date}\n'
99 115 abort: invalid day spec, use '>DATE'
100 116 [255]
101 117 $ hg log -d '<' --template '{date|date}\n'
102 118 abort: invalid day spec, use '<DATE'
103 119 [255]
104 120
105 121 $ hg log -d ' >' --template '{date|date}\n'
106 122 abort: invalid day spec, use '>DATE'
107 123 [255]
108 124 $ hg log -d ' <' --template '{date|date}\n'
109 125 abort: invalid day spec, use '<DATE'
110 126 [255]
111 127
112 128 $ hg log -d '> ' --template '{date|date}\n'
113 129 abort: invalid day spec, use '>DATE'
114 130 [255]
115 131 $ hg log -d '< ' --template '{date|date}\n'
116 132 abort: invalid day spec, use '<DATE'
117 133 [255]
118 134
119 135 $ hg log -d ' > ' --template '{date|date}\n'
120 136 abort: invalid day spec, use '>DATE'
121 137 [255]
122 138 $ hg log -d ' < ' --template '{date|date}\n'
123 139 abort: invalid day spec, use '<DATE'
124 140 [255]
125 141
126 142 $ hg log -d '>02/01' --template '{date|date}\n'
127 143 $ hg log -d '<02/01' --template '{date|date}\n'
128 144 Sun Jan 15 13:30:00 2006 +0500
129 145 Sun Jan 15 13:30:00 2006 -0800
130 146 Sat Jul 15 13:30:00 2006 +0500
131 147 Sat Jul 15 13:30:00 2006 -0700
132 148 Sun Jun 11 00:26:40 2006 -0400
133 149 Sat Apr 15 13:30:00 2006 +0200
134 150 Sat Apr 15 13:30:00 2006 +0000
135 151 Wed Feb 01 13:00:30 2006 -0500
136 152 Wed Feb 01 13:00:30 2006 +0000
137 153
138 154 $ hg log -d ' >02/01' --template '{date|date}\n'
139 155 $ hg log -d ' <02/01' --template '{date|date}\n'
140 156 Sun Jan 15 13:30:00 2006 +0500
141 157 Sun Jan 15 13:30:00 2006 -0800
142 158 Sat Jul 15 13:30:00 2006 +0500
143 159 Sat Jul 15 13:30:00 2006 -0700
144 160 Sun Jun 11 00:26:40 2006 -0400
145 161 Sat Apr 15 13:30:00 2006 +0200
146 162 Sat Apr 15 13:30:00 2006 +0000
147 163 Wed Feb 01 13:00:30 2006 -0500
148 164 Wed Feb 01 13:00:30 2006 +0000
149 165
150 166 $ hg log -d '> 02/01' --template '{date|date}\n'
151 167 $ hg log -d '< 02/01' --template '{date|date}\n'
152 168 Sun Jan 15 13:30:00 2006 +0500
153 169 Sun Jan 15 13:30:00 2006 -0800
154 170 Sat Jul 15 13:30:00 2006 +0500
155 171 Sat Jul 15 13:30:00 2006 -0700
156 172 Sun Jun 11 00:26:40 2006 -0400
157 173 Sat Apr 15 13:30:00 2006 +0200
158 174 Sat Apr 15 13:30:00 2006 +0000
159 175 Wed Feb 01 13:00:30 2006 -0500
160 176 Wed Feb 01 13:00:30 2006 +0000
161 177
162 178 $ hg log -d ' > 02/01' --template '{date|date}\n'
163 179 $ hg log -d ' < 02/01' --template '{date|date}\n'
164 180 Sun Jan 15 13:30:00 2006 +0500
165 181 Sun Jan 15 13:30:00 2006 -0800
166 182 Sat Jul 15 13:30:00 2006 +0500
167 183 Sat Jul 15 13:30:00 2006 -0700
168 184 Sun Jun 11 00:26:40 2006 -0400
169 185 Sat Apr 15 13:30:00 2006 +0200
170 186 Sat Apr 15 13:30:00 2006 +0000
171 187 Wed Feb 01 13:00:30 2006 -0500
172 188 Wed Feb 01 13:00:30 2006 +0000
173 189
174 190 $ hg log -d '>02/01 ' --template '{date|date}\n'
175 191 $ hg log -d '<02/01 ' --template '{date|date}\n'
176 192 Sun Jan 15 13:30:00 2006 +0500
177 193 Sun Jan 15 13:30:00 2006 -0800
178 194 Sat Jul 15 13:30:00 2006 +0500
179 195 Sat Jul 15 13:30:00 2006 -0700
180 196 Sun Jun 11 00:26:40 2006 -0400
181 197 Sat Apr 15 13:30:00 2006 +0200
182 198 Sat Apr 15 13:30:00 2006 +0000
183 199 Wed Feb 01 13:00:30 2006 -0500
184 200 Wed Feb 01 13:00:30 2006 +0000
185 201
186 202 $ hg log -d ' >02/01 ' --template '{date|date}\n'
187 203 $ hg log -d ' <02/01 ' --template '{date|date}\n'
188 204 Sun Jan 15 13:30:00 2006 +0500
189 205 Sun Jan 15 13:30:00 2006 -0800
190 206 Sat Jul 15 13:30:00 2006 +0500
191 207 Sat Jul 15 13:30:00 2006 -0700
192 208 Sun Jun 11 00:26:40 2006 -0400
193 209 Sat Apr 15 13:30:00 2006 +0200
194 210 Sat Apr 15 13:30:00 2006 +0000
195 211 Wed Feb 01 13:00:30 2006 -0500
196 212 Wed Feb 01 13:00:30 2006 +0000
197 213
198 214 $ hg log -d '> 02/01 ' --template '{date|date}\n'
199 215 $ hg log -d '< 02/01 ' --template '{date|date}\n'
200 216 Sun Jan 15 13:30:00 2006 +0500
201 217 Sun Jan 15 13:30:00 2006 -0800
202 218 Sat Jul 15 13:30:00 2006 +0500
203 219 Sat Jul 15 13:30:00 2006 -0700
204 220 Sun Jun 11 00:26:40 2006 -0400
205 221 Sat Apr 15 13:30:00 2006 +0200
206 222 Sat Apr 15 13:30:00 2006 +0000
207 223 Wed Feb 01 13:00:30 2006 -0500
208 224 Wed Feb 01 13:00:30 2006 +0000
209 225
210 226 $ hg log -d ' > 02/01 ' --template '{date|date}\n'
211 227 $ hg log -d ' < 02/01 ' --template '{date|date}\n'
212 228 Sun Jan 15 13:30:00 2006 +0500
213 229 Sun Jan 15 13:30:00 2006 -0800
214 230 Sat Jul 15 13:30:00 2006 +0500
215 231 Sat Jul 15 13:30:00 2006 -0700
216 232 Sun Jun 11 00:26:40 2006 -0400
217 233 Sat Apr 15 13:30:00 2006 +0200
218 234 Sat Apr 15 13:30:00 2006 +0000
219 235 Wed Feb 01 13:00:30 2006 -0500
220 236 Wed Feb 01 13:00:30 2006 +0000
General Comments 0
You need to be logged in to leave comments. Login now