777 |
777 |
778 Only run on 2 files |
778 Only run on 2 files |
779 |
779 |
780 (remaining changes gathered with unmatched one) |
780 (remaining changes gathered with unmatched one) |
781 |
781 |
|
782 adding content in files to make sure that it prompt us to select the changes, |
|
783 as it won't prompt if a file has no changes at hunk level and passed in cli |
|
784 (for more look into hg db72f9f6580e which made it to not prompt "examine changes to fileX" |
|
785 for files which are explicitly mentioned by user) |
|
786 $ echo sp2 > SPLIT2 |
|
787 $ echo sp3 > SPLIT3 |
|
788 $ echo sp4 > SPLIT4 |
|
789 $ hg amend |
|
790 |
782 $ hg split SPLIT2 SPLIT3 << EOF |
791 $ hg split SPLIT2 SPLIT3 << EOF |
783 > y |
792 > y |
784 > n |
793 > s |
785 > c |
794 > c |
786 > EOF |
795 > EOF |
787 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
796 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
788 adding SPLIT2 |
797 adding SPLIT2 |
789 adding SPLIT3 |
798 adding SPLIT3 |
790 adding SPLIT4 |
799 adding SPLIT4 |
791 diff --git a/SPLIT2 b/SPLIT2 |
800 diff --git a/SPLIT2 b/SPLIT2 |
792 new file mode 100644 |
801 new file mode 100644 |
793 examine changes to 'SPLIT2'? [Ynesfdaq?] y |
802 @@ -0,0 +1,1 @@ |
|
803 +sp2 |
|
804 record change 1/2 to 'SPLIT2'? [Ynesfdaq?] y |
794 |
805 |
795 diff --git a/SPLIT3 b/SPLIT3 |
806 diff --git a/SPLIT3 b/SPLIT3 |
796 new file mode 100644 |
807 new file mode 100644 |
797 examine changes to 'SPLIT3'? [Ynesfdaq?] n |
808 @@ -0,0 +1,1 @@ |
|
809 +sp3 |
|
810 record change 2/2 to 'SPLIT3'? [Ynesfdaq?] s |
798 |
811 |
799 continue splitting? [Ycdq?] c |
812 continue splitting? [Ycdq?] c |
|
813 |
800 $ hg status --change '.~1' |
814 $ hg status --change '.~1' |
801 A SPLIT2 |
815 A SPLIT2 |
802 $ hg status --change '.' |
816 $ hg status --change '.' |
803 A SPLIT3 |
817 A SPLIT3 |
804 A SPLIT4 |
818 A SPLIT4 |
808 |
822 |
809 (no remaining changes) |
823 (no remaining changes) |
810 |
824 |
811 $ hg split SPLIT2 SPLIT3 << EOF |
825 $ hg split SPLIT2 SPLIT3 << EOF |
812 > y |
826 > y |
813 > n |
827 > s |
814 > y |
828 > y |
815 > y |
829 > y |
816 > EOF |
830 > EOF |
817 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
831 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
818 adding SPLIT2 |
832 adding SPLIT2 |
819 adding SPLIT3 |
833 adding SPLIT3 |
820 adding SPLIT4 |
834 adding SPLIT4 |
821 diff --git a/SPLIT2 b/SPLIT2 |
835 diff --git a/SPLIT2 b/SPLIT2 |
822 new file mode 100644 |
836 new file mode 100644 |
823 examine changes to 'SPLIT2'? [Ynesfdaq?] y |
837 @@ -0,0 +1,1 @@ |
|
838 +sp2 |
|
839 record change 1/2 to 'SPLIT2'? [Ynesfdaq?] y |
824 |
840 |
825 diff --git a/SPLIT3 b/SPLIT3 |
841 diff --git a/SPLIT3 b/SPLIT3 |
826 new file mode 100644 |
842 new file mode 100644 |
827 examine changes to 'SPLIT3'? [Ynesfdaq?] n |
843 @@ -0,0 +1,1 @@ |
|
844 +sp3 |
|
845 record change 2/2 to 'SPLIT3'? [Ynesfdaq?] s |
828 |
846 |
829 continue splitting? [Ycdq?] y |
847 continue splitting? [Ycdq?] y |
830 diff --git a/SPLIT3 b/SPLIT3 |
848 diff --git a/SPLIT3 b/SPLIT3 |
831 new file mode 100644 |
849 new file mode 100644 |
832 examine changes to 'SPLIT3'? [Ynesfdaq?] y |
850 @@ -0,0 +1,1 @@ |
|
851 +sp3 |
|
852 record this change to 'SPLIT3'? [Ynesfdaq?] y |
833 |
853 |
834 no more change to split |
854 no more change to split |
|
855 |
835 $ hg status --change '.~2' |
856 $ hg status --change '.~2' |
836 A SPLIT2 |
857 A SPLIT2 |
837 $ hg status --change '.~1' |
858 $ hg status --change '.~1' |
838 A SPLIT3 |
859 A SPLIT3 |
839 $ hg status --change '.' |
860 $ hg status --change '.' |
852 adding SPLIT2 |
873 adding SPLIT2 |
853 adding SPLIT3 |
874 adding SPLIT3 |
854 adding SPLIT4 |
875 adding SPLIT4 |
855 diff --git a/SPLIT2 b/SPLIT2 |
876 diff --git a/SPLIT2 b/SPLIT2 |
856 new file mode 100644 |
877 new file mode 100644 |
857 examine changes to 'SPLIT2'? [Ynesfdaq?] y |
878 @@ -0,0 +1,1 @@ |
|
879 +sp2 |
|
880 record change 1/2 to 'SPLIT2'? [Ynesfdaq?] y |
858 |
881 |
859 diff --git a/SPLIT3 b/SPLIT3 |
882 diff --git a/SPLIT3 b/SPLIT3 |
860 new file mode 100644 |
883 new file mode 100644 |
861 examine changes to 'SPLIT3'? [Ynesfdaq?] y |
884 @@ -0,0 +1,1 @@ |
|
885 +sp3 |
|
886 record change 2/2 to 'SPLIT3'? [Ynesfdaq?] y |
862 |
887 |
863 no more change to split |
888 no more change to split |
864 $ hg status --change '.~1' |
889 $ hg status --change '.~1' |
865 A SPLIT2 |
890 A SPLIT2 |
866 A SPLIT3 |
891 A SPLIT3 |
872 |
897 |
873 Check that discard does not alter unmatched files |
898 Check that discard does not alter unmatched files |
874 |
899 |
875 $ hg split SPLIT2 SPLIT3 << EOF |
900 $ hg split SPLIT2 SPLIT3 << EOF |
876 > y |
901 > y |
877 > n |
902 > s |
878 > d |
903 > d |
879 > EOF |
904 > EOF |
880 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
905 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
881 adding SPLIT2 |
906 adding SPLIT2 |
882 adding SPLIT3 |
907 adding SPLIT3 |
883 adding SPLIT4 |
908 adding SPLIT4 |
884 diff --git a/SPLIT2 b/SPLIT2 |
909 diff --git a/SPLIT2 b/SPLIT2 |
885 new file mode 100644 |
910 new file mode 100644 |
886 examine changes to 'SPLIT2'? [Ynesfdaq?] y |
911 @@ -0,0 +1,1 @@ |
|
912 +sp2 |
|
913 record change 1/2 to 'SPLIT2'? [Ynesfdaq?] y |
887 |
914 |
888 diff --git a/SPLIT3 b/SPLIT3 |
915 diff --git a/SPLIT3 b/SPLIT3 |
889 new file mode 100644 |
916 new file mode 100644 |
890 examine changes to 'SPLIT3'? [Ynesfdaq?] n |
917 @@ -0,0 +1,1 @@ |
|
918 +sp3 |
|
919 record change 2/2 to 'SPLIT3'? [Ynesfdaq?] s |
891 |
920 |
892 continue splitting? [Ycdq?] d |
921 continue splitting? [Ycdq?] d |
893 discarding remaining changes |
922 discarding remaining changes |
894 no more change to split |
923 no more change to split |
895 $ hg status --change '.~1' |
924 $ hg status --change '.~1' |