comparison tests/test-log.t @ 35687:67893a516272

log: follow file history across copies even with -rREV (BC) (issue4959) Still it falls back to changelog path if glob patterns or missing paths are specified. This will be changed later. .. bc:: ``log --follow -rREV FILE..`` now follows file history across copies and renames.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 03 Jan 2018 15:58:59 +0900
parents 1c929b4942a3
children 41ef02ba329b
comparison
equal deleted inserted replaced
35686:b25fa5da4ca2 35687:67893a516272
463 $ hg log -f g --template '{rev}\n' 463 $ hg log -f g --template '{rev}\n'
464 3 464 3
465 2 465 2
466 0 466 0
467 467
468 follow files from the specified revisions (issue4959)
469
470 $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n'
471 @ 4 dir/b e, dir/b->e
472 |
473 o 3 a b d g, a->b f->g
474 |
475 o 2 b dir/b f g, b->dir/b
476 |
477 o 1 b g, a->b f->g
478 |
479 o 0 a f,
480
481
482 $ hg log -T '{rev}\n' -fr 4 e
483 4
484 2
485 1
486 0
487 $ hg log -T '{rev}\n' -fr 2 g
488 2
489 1
490 0
491 $ hg log -T '{rev}\n' -fr '2+3' g
492 3
493 2
494 1
495 0
496
497 follow files from the specified revisions with glob patterns (issue5053)
498 (BROKEN: should follow copies from e@4)
499
500 $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]'
501 4
502 2 (false !)
503 1 (false !)
504 0 (false !)
505
506 follow files from the specified revisions with missing patterns
507 (BROKEN: should follow copies from e@4)
508
509 $ hg log -T '{rev}\n' -fr4 e x
510 4
511 2 (false !)
512 1 (false !)
513 0 (false !)
514
515 follow files from the specified revisions across copies with -p/--patch
516
517 $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g
518 == rev: 4, dir/b->e ==
519 diff -r 2ca5ba701980 -r 7e4639b4691b e
520 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
521 +++ b/e Thu Jan 01 00:00:05 1970 +0000
522 @@ -0,0 +1,1 @@
523 +a
524
525 == rev: 3, a->b f->g ==
526 diff -r f8954cd4dc1f -r 2ca5ba701980 g
527 --- a/g Thu Jan 01 00:00:03 1970 +0000
528 +++ b/g Thu Jan 01 00:00:04 1970 +0000
529 @@ -1,2 +1,2 @@
530 f
531 -g
532 +f
533
534 == rev: 2, b->dir/b ==
535 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
536 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
537 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
538 @@ -0,0 +1,1 @@
539 +a
540 diff -r d89b0a12d229 -r f8954cd4dc1f f
541 --- a/f Thu Jan 01 00:00:02 1970 +0000
542 +++ b/f Thu Jan 01 00:00:03 1970 +0000
543 @@ -1,1 +1,2 @@
544 f
545 +f
546
547 == rev: 1, a->b f->g ==
548 diff -r 9161b9aeaf16 -r d89b0a12d229 b
549 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
550 +++ b/b Thu Jan 01 00:00:02 1970 +0000
551 @@ -0,0 +1,1 @@
552 +a
553
554 == rev: 0, ==
555 diff -r 000000000000 -r 9161b9aeaf16 a
556 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
557 +++ b/a Thu Jan 01 00:00:01 1970 +0000
558 @@ -0,0 +1,1 @@
559 +a
560 diff -r 000000000000 -r 9161b9aeaf16 f
561 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
562 +++ b/f Thu Jan 01 00:00:01 1970 +0000
563 @@ -0,0 +1,1 @@
564 +f
565
468 566
469 log copies with --copies 567 log copies with --copies
470 568
471 $ hg log -vC --template '{rev} {file_copies}\n' 569 $ hg log -vC --template '{rev} {file_copies}\n'
472 4 e (dir/b) 570 4 e (dir/b)
1723 changeset: 4:88176d361b69 1821 changeset: 4:88176d361b69
1724 user: test 1822 user: test
1725 date: Thu Jan 01 00:00:00 1970 +0000 1823 date: Thu Jan 01 00:00:00 1970 +0000
1726 summary: add foo, related 1824 summary: add foo, related
1727 1825
1728 changeset: 2:c4c64aedf0f7
1729 user: test
1730 date: Thu Jan 01 00:00:00 1970 +0000
1731 summary: add unrelated old foo
1732
1733 $ cd .. 1826 $ cd ..
1734 1827
1735 Issue2383: hg log showing _less_ differences than hg diff 1828 Issue2383: hg log showing _less_ differences than hg diff
1736 1829
1737 $ hg init issue2383 1830 $ hg init issue2383