Mercurial > hg
comparison tests/test-obsmarker-template.t @ 33275:4cf60d5894b5
template: add tests for more complex cases
We add new tests for improving the coverage of existing obs-markers related
template (predecessors) and the new one we are introducing (successorssets).
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 03 Jul 2017 14:22:28 +0200 |
parents | 53b3a1968aa6 |
children | 89796a25d4bb |
comparison
equal
deleted
inserted
replaced
33274:68f3e819d41d | 33275:4cf60d5894b5 |
---|---|
885 | semi-colon: 2:0dec01379d3b | 885 | semi-colon: 2:0dec01379d3b |
886 | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | 886 | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
887 | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | 887 | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
888 @ ea207398892e | 888 @ ea207398892e |
889 | 889 |
890 Test template with split + divergence with cycles | |
891 ================================================= | |
892 | |
893 $ hg log -G | |
894 o changeset: 3:f897c6137566 | |
895 | tag: tip | |
896 | parent: 0:ea207398892e | |
897 | user: test | |
898 | date: Thu Jan 01 00:00:00 1970 +0000 | |
899 | summary: C0 | |
900 | | |
901 @ changeset: 0:ea207398892e | |
902 user: test | |
903 date: Thu Jan 01 00:00:00 1970 +0000 | |
904 summary: ROOT | |
905 | |
906 $ hg up | |
907 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
908 | |
909 Create a commit with three files | |
910 $ touch A B C | |
911 $ hg commit -A -m "Add A,B,C" A B C | |
912 | |
913 Split it | |
914 $ hg up 3 | |
915 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
916 $ touch A | |
917 $ hg commit -A -m "Add A,B,C" A | |
918 created new head | |
919 | |
920 $ touch B | |
921 $ hg commit -A -m "Add A,B,C" B | |
922 | |
923 $ touch C | |
924 $ hg commit -A -m "Add A,B,C" C | |
925 | |
926 $ hg log -G | |
927 @ changeset: 7:ba2ed02b0c9a | |
928 | tag: tip | |
929 | user: test | |
930 | date: Thu Jan 01 00:00:00 1970 +0000 | |
931 | summary: Add A,B,C | |
932 | | |
933 o changeset: 6:4a004186e638 | |
934 | user: test | |
935 | date: Thu Jan 01 00:00:00 1970 +0000 | |
936 | summary: Add A,B,C | |
937 | | |
938 o changeset: 5:dd800401bd8c | |
939 | parent: 3:f897c6137566 | |
940 | user: test | |
941 | date: Thu Jan 01 00:00:00 1970 +0000 | |
942 | summary: Add A,B,C | |
943 | | |
944 | o changeset: 4:9bd10a0775e4 | |
945 |/ user: test | |
946 | date: Thu Jan 01 00:00:00 1970 +0000 | |
947 | summary: Add A,B,C | |
948 | | |
949 o changeset: 3:f897c6137566 | |
950 | parent: 0:ea207398892e | |
951 | user: test | |
952 | date: Thu Jan 01 00:00:00 1970 +0000 | |
953 | summary: C0 | |
954 | | |
955 o changeset: 0:ea207398892e | |
956 user: test | |
957 date: Thu Jan 01 00:00:00 1970 +0000 | |
958 summary: ROOT | |
959 | |
960 $ hg debugobsolete `getid "4"` `getid "5"` `getid "6"` `getid "7"` | |
961 $ hg log -G | |
962 @ changeset: 7:ba2ed02b0c9a | |
963 | tag: tip | |
964 | user: test | |
965 | date: Thu Jan 01 00:00:00 1970 +0000 | |
966 | summary: Add A,B,C | |
967 | | |
968 o changeset: 6:4a004186e638 | |
969 | user: test | |
970 | date: Thu Jan 01 00:00:00 1970 +0000 | |
971 | summary: Add A,B,C | |
972 | | |
973 o changeset: 5:dd800401bd8c | |
974 | parent: 3:f897c6137566 | |
975 | user: test | |
976 | date: Thu Jan 01 00:00:00 1970 +0000 | |
977 | summary: Add A,B,C | |
978 | | |
979 o changeset: 3:f897c6137566 | |
980 | parent: 0:ea207398892e | |
981 | user: test | |
982 | date: Thu Jan 01 00:00:00 1970 +0000 | |
983 | summary: C0 | |
984 | | |
985 o changeset: 0:ea207398892e | |
986 user: test | |
987 date: Thu Jan 01 00:00:00 1970 +0000 | |
988 summary: ROOT | |
989 | |
990 Diverge one of the splitted commit | |
991 | |
992 $ hg up 6 | |
993 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
994 $ hg commit --amend -m "Add only B" | |
995 | |
996 $ hg up 6 --hidden | |
997 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
998 $ hg commit --amend -m "Add B only" | |
999 | |
1000 $ hg log -G | |
1001 @ changeset: 9:0b997eb7ceee | |
1002 | tag: tip | |
1003 | parent: 5:dd800401bd8c | |
1004 | user: test | |
1005 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1006 | trouble: divergent | |
1007 | summary: Add B only | |
1008 | | |
1009 | o changeset: 8:b18bc8331526 | |
1010 |/ parent: 5:dd800401bd8c | |
1011 | user: test | |
1012 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1013 | trouble: divergent | |
1014 | summary: Add only B | |
1015 | | |
1016 | o changeset: 7:ba2ed02b0c9a | |
1017 | | user: test | |
1018 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1019 | | trouble: unstable, divergent | |
1020 | | summary: Add A,B,C | |
1021 | | | |
1022 | x changeset: 6:4a004186e638 | |
1023 |/ user: test | |
1024 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1025 | summary: Add A,B,C | |
1026 | | |
1027 o changeset: 5:dd800401bd8c | |
1028 | parent: 3:f897c6137566 | |
1029 | user: test | |
1030 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1031 | trouble: divergent | |
1032 | summary: Add A,B,C | |
1033 | | |
1034 o changeset: 3:f897c6137566 | |
1035 | parent: 0:ea207398892e | |
1036 | user: test | |
1037 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1038 | summary: C0 | |
1039 | | |
1040 o changeset: 0:ea207398892e | |
1041 user: test | |
1042 date: Thu Jan 01 00:00:00 1970 +0000 | |
1043 summary: ROOT | |
1044 | |
1045 | |
1046 Check templates | |
1047 --------------- | |
1048 | |
1049 $ hg tlog | |
1050 @ 0b997eb7ceee | |
1051 | Predecessors: 6:4a004186e638 | |
1052 | semi-colon: 6:4a004186e638 | |
1053 | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1054 | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1055 | o b18bc8331526 | |
1056 |/ Predecessors: 6:4a004186e638 | |
1057 | semi-colon: 6:4a004186e638 | |
1058 | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1059 | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1060 | o ba2ed02b0c9a | |
1061 | | | |
1062 | x 4a004186e638 | |
1063 |/ | |
1064 o dd800401bd8c | |
1065 | | |
1066 o f897c6137566 | |
1067 | | |
1068 o ea207398892e | |
1069 | |
1070 $ hg tlog --hidden | |
1071 @ 0b997eb7ceee | |
1072 | Predecessors: 6:4a004186e638 | |
1073 | semi-colon: 6:4a004186e638 | |
1074 | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1075 | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1076 | o b18bc8331526 | |
1077 |/ Predecessors: 6:4a004186e638 | |
1078 | semi-colon: 6:4a004186e638 | |
1079 | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1080 | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1081 | o ba2ed02b0c9a | |
1082 | | Predecessors: 4:9bd10a0775e4 | |
1083 | | semi-colon: 4:9bd10a0775e4 | |
1084 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1085 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1086 | x 4a004186e638 | |
1087 |/ Predecessors: 4:9bd10a0775e4 | |
1088 | semi-colon: 4:9bd10a0775e4 | |
1089 | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1090 | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1091 o dd800401bd8c | |
1092 | Predecessors: 4:9bd10a0775e4 | |
1093 | semi-colon: 4:9bd10a0775e4 | |
1094 | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1095 | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1096 | x 9bd10a0775e4 | |
1097 |/ | |
1098 o f897c6137566 | |
1099 | Predecessors: 2:0dec01379d3b | |
1100 | semi-colon: 2:0dec01379d3b | |
1101 | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1102 | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1103 | x 0dec01379d3b | |
1104 | | Predecessors: 1:471f378eab4c | |
1105 | | semi-colon: 1:471f378eab4c | |
1106 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1107 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1108 | x 471f378eab4c | |
1109 |/ Predecessors: 2:0dec01379d3b | |
1110 | semi-colon: 2:0dec01379d3b | |
1111 | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1112 | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1113 o ea207398892e | |
1114 | |
1115 $ hg up --hidden 4 | |
1116 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1117 $ hg rebase -r 7 -d 8 --config extensions.rebase= | |
1118 rebasing 7:ba2ed02b0c9a "Add A,B,C" | |
1119 $ hg tlog | |
1120 o eceed8f98ffc | |
1121 | Predecessors: 4:9bd10a0775e4 | |
1122 | semi-colon: 4:9bd10a0775e4 | |
1123 | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1124 | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1125 | o 0b997eb7ceee | |
1126 | | Predecessors: 4:9bd10a0775e4 | |
1127 | | semi-colon: 4:9bd10a0775e4 | |
1128 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1129 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1130 o | b18bc8331526 | |
1131 |/ Predecessors: 4:9bd10a0775e4 | |
1132 | semi-colon: 4:9bd10a0775e4 | |
1133 | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1134 | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1135 o dd800401bd8c | |
1136 | Predecessors: 4:9bd10a0775e4 | |
1137 | semi-colon: 4:9bd10a0775e4 | |
1138 | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1139 | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1140 | @ 9bd10a0775e4 | |
1141 |/ | |
1142 o f897c6137566 | |
1143 | | |
1144 o ea207398892e | |
1145 | |
1146 Test templates with pruned commits | |
1147 ================================== | |
1148 | |
1149 Test setup | |
1150 ---------- | |
1151 | |
1152 $ hg init $TESTTMP/templates-local-prune | |
1153 $ cd $TESTTMP/templates-local-prune | |
1154 $ mkcommit ROOT | |
1155 $ mkcommit A0 | |
1156 $ hg debugobsolete --record-parent `getid "."` | |
1157 | |
1158 Check output | |
1159 ------------ | |
1160 | |
1161 $ hg up "desc(A0)" --hidden | |
1162 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1163 $ hg tlog | |
1164 @ 471f378eab4c | |
1165 | | |
1166 o ea207398892e | |
1167 |