Show More
@@ -640,6 +640,49 b' revisions printed, just their order.' | |||
|
640 | 640 | |
|
641 | 641 | $ cd .. |
|
642 | 642 | |
|
643 | Moved line may not be collected by "grep --diff" since it first filters | |
|
644 | the contents to be diffed by the pattern. (i.e. | |
|
645 | "diff <(grep pat a) <(grep pat b)", not "diff a b | grep pat".) | |
|
646 | This is much faster than generating full diff per revision. | |
|
647 | ||
|
648 | $ hg init moved-line | |
|
649 | $ cd moved-line | |
|
650 | $ cat <<'EOF' > a | |
|
651 | > foo | |
|
652 | > bar | |
|
653 | > baz | |
|
654 | > EOF | |
|
655 | $ hg ci -Am initial | |
|
656 | adding a | |
|
657 | $ cat <<'EOF' > a | |
|
658 | > bar | |
|
659 | > baz | |
|
660 | > foo | |
|
661 | > EOF | |
|
662 | $ hg ci -m reorder | |
|
663 | ||
|
664 | $ hg diff -c 1 | |
|
665 | diff -r a593cc55e81b -r 69789a3b6e80 a | |
|
666 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
|
667 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
|
668 | @@ -1,3 +1,3 @@ | |
|
669 | -foo | |
|
670 | bar | |
|
671 | baz | |
|
672 | +foo | |
|
673 | ||
|
674 | can't find the move of "foo" at the revision 1: | |
|
675 | ||
|
676 | $ hg grep --diff foo -r1 | |
|
677 | [1] | |
|
678 | ||
|
679 | "bar" isn't moved at the revisoin 1: | |
|
680 | ||
|
681 | $ hg grep --diff bar -r1 | |
|
682 | [1] | |
|
683 | ||
|
684 | $ cd .. | |
|
685 | ||
|
643 | 686 | Test for showing working of allfiles flag |
|
644 | 687 | |
|
645 | 688 | $ hg init sng |
General Comments 0
You need to be logged in to leave comments.
Login now