Mercurial > hg
comparison tests/test-subrepo-git.t @ 23938:de519517f597 stable
subrepo: correctly add newline for git subrepo diffs
Previously, git subrepo diffs did not have a newline at the end.
This caused multiple subrepo diffs to be joined on the same line.
Additionally, the command prompt after the diff still contained
a part of the diff.
author | Mathias De Maré <mathias.demare@gmail.com> |
---|---|
date | Wed, 21 Jan 2015 21:47:27 +0100 |
parents | fd5b9417d315 |
children | 8f02682ff3b0 |
comparison
equal
deleted
inserted
replaced
23937:fd5b9417d315 | 23938:de519517f597 |
---|---|
110 --- a/s/g | 110 --- a/s/g |
111 +++ b/s/g | 111 +++ b/s/g |
112 @@ -1,2 +1,3 @@ | 112 @@ -1,2 +1,3 @@ |
113 g | 113 g |
114 gg | 114 gg |
115 +ggg (no-eol) | 115 +ggg |
116 $ hg commit --subrepos -m ggg | 116 $ hg commit --subrepos -m ggg |
117 committing subrepository s | 117 committing subrepository s |
118 $ hg debugsub | 118 $ hg debugsub |
119 path s | 119 path s |
120 source ../gitroot | 120 source ../gitroot |
693 +++ b/s/foobar | 693 +++ b/s/foobar |
694 @@ -0,0 +1,4 @@ | 694 @@ -0,0 +1,4 @@ |
695 +woopwoop | 695 +woopwoop |
696 + | 696 + |
697 +foo | 697 +foo |
698 +bar (no-eol) | 698 +bar |
699 | 699 |
700 $ hg commit --subrepos -m "Added foobar" | 700 $ hg commit --subrepos -m "Added foobar" |
701 committing subrepository s | 701 committing subrepository s |
702 created new head | 702 created new head |
703 | 703 |
715 +++ b/s/foobar | 715 +++ b/s/foobar |
716 @@ -0,0 +1,4 @@ | 716 @@ -0,0 +1,4 @@ |
717 +woopwoop | 717 +woopwoop |
718 + | 718 + |
719 +foo | 719 +foo |
720 +bar (no-eol) | 720 +bar |
721 | 721 |
722 check output when only diffing the subrepository | 722 check output when only diffing the subrepository |
723 $ hg diff -c . --subrepos s | 723 $ hg diff -c . --subrepos s |
724 diff --git a/s/foobar b/s/foobar | 724 diff --git a/s/foobar b/s/foobar |
725 new file mode 100644 | 725 new file mode 100644 |
728 +++ b/s/foobar | 728 +++ b/s/foobar |
729 @@ -0,0 +1,4 @@ | 729 @@ -0,0 +1,4 @@ |
730 +woopwoop | 730 +woopwoop |
731 + | 731 + |
732 +foo | 732 +foo |
733 +bar (no-eol) | 733 +bar |
734 | 734 |
735 check output when diffing something else | 735 check output when diffing something else |
736 $ hg diff -c . --subrepos .hgsubstate --nodates | 736 $ hg diff -c . --subrepos .hgsubstate --nodates |
737 diff -r af6d2edbb0d3 -r 255ee8cf690e .hgsubstate | 737 diff -r af6d2edbb0d3 -r 255ee8cf690e .hgsubstate |
738 --- a/.hgsubstate | 738 --- a/.hgsubstate |
758 new file mode 100644 | 758 new file mode 100644 |
759 index 0000000..257cc56 | 759 index 0000000..257cc56 |
760 --- /dev/null | 760 --- /dev/null |
761 +++ b/s/barfoo | 761 +++ b/s/barfoo |
762 @@ -0,0 +1 @@ | 762 @@ -0,0 +1 @@ |
763 +foo (no-eol) | 763 +foo |
764 $ hg diff --subrepos s/foobar | 764 $ hg diff --subrepos s/foobar |
765 diff --git a/s/foobar b/s/foobar | 765 diff --git a/s/foobar b/s/foobar |
766 index 8a5a5e2..bd5812a 100644 | 766 index 8a5a5e2..bd5812a 100644 |
767 --- a/s/foobar | 767 --- a/s/foobar |
768 +++ b/s/foobar | 768 +++ b/s/foobar |
769 @@ -1,4 +1,4 @@ | 769 @@ -1,4 +1,4 @@ |
770 -woopwoop | 770 -woopwoop |
771 +woop woop | 771 +woop woop |
772 | 772 |
773 foo | 773 foo |
774 bar (no-eol) | 774 bar |
775 | 775 |
776 execute a diffstat | 776 execute a diffstat |
777 the output contains a regex, because git 1.7.10 and 1.7.11 | 777 the output contains a regex, because git 1.7.10 and 1.7.11 |
778 change the amount of whitespace | 778 change the amount of whitespace |
779 $ hg diff --subrepos --stat | 779 $ hg diff --subrepos --stat |
780 \s*barfoo |\s*1 + (re) | 780 \s*barfoo |\s*1 + (re) |
781 \s*foobar |\s*2 +- (re) | 781 \s*foobar |\s*2 +- (re) |
782 2 files changed, 2 insertions\(\+\), 1 deletions?\(-\) \(no-eol\) (re) | 782 2 files changed, 2 insertions\(\+\), 1 deletions?\(-\) (re) |
783 | 783 |
784 ensure adding include/exclude ignores the subrepo | 784 ensure adding include/exclude ignores the subrepo |
785 $ hg diff --subrepos -I s/foobar | 785 $ hg diff --subrepos -I s/foobar |
786 $ hg diff --subrepos -X s/foobar | 786 $ hg diff --subrepos -X s/foobar |
787 | 787 |