Show More
@@ -883,3 +883,126 b' Test that removing .hgsub removes .hgsub' | |||||
883 | rm2 |
|
883 | rm2 | |
884 |
|
884 | |||
885 |
|
885 | |||
|
886 | Test behavior of add for explicit path in subrepo: | |||
|
887 | $ cd .. | |||
|
888 | $ hg init addtests | |||
|
889 | $ cd addtests | |||
|
890 | $ echo s = s > .hgsub | |||
|
891 | $ hg add .hgsub | |||
|
892 | $ hg init s | |||
|
893 | $ hg ci -m0 | |||
|
894 | committing subrepository s | |||
|
895 | Adding with an explicit path in a subrepo currently fails silently | |||
|
896 | $ echo c1 > f1 | |||
|
897 | $ echo c2 > s/f2 | |||
|
898 | $ hg st -S | |||
|
899 | ? f1 | |||
|
900 | ? s/f2 | |||
|
901 | $ hg add s/f2 | |||
|
902 | $ hg st -S | |||
|
903 | ? f1 | |||
|
904 | ? s/f2 | |||
|
905 | $ hg ci -R s -Am0 | |||
|
906 | adding f2 | |||
|
907 | $ hg ci -Am1 | |||
|
908 | adding f1 | |||
|
909 | committing subrepository s | |||
|
910 | Adding with an explicit path in a subrepo with -S adds the file | |||
|
911 | $ echo c3 > f3 | |||
|
912 | $ echo c4 > s/f4 | |||
|
913 | $ hg st -S | |||
|
914 | ? f3 | |||
|
915 | ? s/f4 | |||
|
916 | $ hg add -S s/f4 | |||
|
917 | $ hg st -S | |||
|
918 | A s/f4 | |||
|
919 | ? f3 | |||
|
920 | $ hg ci -R s -m1 | |||
|
921 | $ hg ci -Ama2 | |||
|
922 | adding f3 | |||
|
923 | committing subrepository s | |||
|
924 | Adding without a path or pattern silently ignores subrepos | |||
|
925 | $ echo c5 > f5 | |||
|
926 | $ echo c6 > s/f6 | |||
|
927 | $ echo c7 > s/f7 | |||
|
928 | $ hg st -S | |||
|
929 | ? f5 | |||
|
930 | ? s/f6 | |||
|
931 | ? s/f7 | |||
|
932 | $ hg add | |||
|
933 | adding f5 | |||
|
934 | $ hg st -S | |||
|
935 | A f5 | |||
|
936 | ? s/f6 | |||
|
937 | ? s/f7 | |||
|
938 | $ hg ci -R s -Am2 | |||
|
939 | adding f6 | |||
|
940 | adding f7 | |||
|
941 | $ hg ci -m3 | |||
|
942 | committing subrepository s | |||
|
943 | Adding without a path or pattern with -S also adds files in subrepos | |||
|
944 | $ echo c8 > f8 | |||
|
945 | $ echo c9 > s/f9 | |||
|
946 | $ echo c10 > s/f10 | |||
|
947 | $ hg st -S | |||
|
948 | ? f8 | |||
|
949 | ? s/f10 | |||
|
950 | ? s/f9 | |||
|
951 | $ hg add -S | |||
|
952 | adding f8 | |||
|
953 | adding s/f10 | |||
|
954 | adding s/f9 | |||
|
955 | $ hg st -S | |||
|
956 | A f8 | |||
|
957 | A s/f10 | |||
|
958 | A s/f9 | |||
|
959 | $ hg ci -R s -m3 | |||
|
960 | $ hg ci -m4 | |||
|
961 | committing subrepository s | |||
|
962 | Adding with a pattern silently ignores subrepos | |||
|
963 | $ echo c11 > fm11 | |||
|
964 | $ echo c12 > fn12 | |||
|
965 | $ echo c13 > s/fm13 | |||
|
966 | $ echo c14 > s/fn14 | |||
|
967 | $ hg st -S | |||
|
968 | ? fm11 | |||
|
969 | ? fn12 | |||
|
970 | ? s/fm13 | |||
|
971 | ? s/fn14 | |||
|
972 | $ hg add 'glob:**fm*' | |||
|
973 | adding fm11 | |||
|
974 | $ hg st -S | |||
|
975 | A fm11 | |||
|
976 | ? fn12 | |||
|
977 | ? s/fm13 | |||
|
978 | ? s/fn14 | |||
|
979 | $ hg ci -R s -Am4 | |||
|
980 | adding fm13 | |||
|
981 | adding fn14 | |||
|
982 | $ hg ci -Am5 | |||
|
983 | adding fn12 | |||
|
984 | committing subrepository s | |||
|
985 | Adding with a pattern with -S also adds matches in subrepos | |||
|
986 | $ echo c15 > fm15 | |||
|
987 | $ echo c16 > fn16 | |||
|
988 | $ echo c17 > s/fm17 | |||
|
989 | $ echo c18 > s/fn18 | |||
|
990 | $ hg st -S | |||
|
991 | ? fm15 | |||
|
992 | ? fn16 | |||
|
993 | ? s/fm17 | |||
|
994 | ? s/fn18 | |||
|
995 | $ hg add -S 'glob:**fm*' | |||
|
996 | adding fm15 | |||
|
997 | adding s/fm17 | |||
|
998 | $ hg st -S | |||
|
999 | A fm15 | |||
|
1000 | A s/fm17 | |||
|
1001 | ? fn16 | |||
|
1002 | ? s/fn18 | |||
|
1003 | $ hg ci -R s -Am5 | |||
|
1004 | adding fn18 | |||
|
1005 | $ hg ci -Am6 | |||
|
1006 | adding fn16 | |||
|
1007 | committing subrepository s | |||
|
1008 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now