180 |
180 |
181 More complex case where part of the rebase set were already rebased |
181 More complex case where part of the rebase set were already rebased |
182 |
182 |
183 $ hg rebase --rev 'desc(D)' --dest 'desc(H)' |
183 $ hg rebase --rev 'desc(D)' --dest 'desc(H)' |
184 rebasing 9:08483444fef9 "D" |
184 rebasing 9:08483444fef9 "D" |
|
185 1 new orphan changesets |
185 $ hg debugobsolete |
186 $ hg debugobsolete |
186 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
187 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
187 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
188 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
188 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
189 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
189 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
190 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
614 updating to a hidden changeset 4bde274eefcf |
617 updating to a hidden changeset 4bde274eefcf |
615 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
618 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
616 $ echo J > J |
619 $ echo J > J |
617 $ hg add J |
620 $ hg add J |
618 $ hg commit -m J |
621 $ hg commit -m J |
|
622 1 new orphan changesets |
619 $ hg debugobsolete `hg log --rev . -T '{node}'` |
623 $ hg debugobsolete `hg log --rev . -T '{node}'` |
620 obsoleted 1 changesets |
624 obsoleted 1 changesets |
621 |
625 |
622 $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off |
626 $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off |
623 rebasing 9:4bde274eefcf "I" |
627 rebasing 9:4bde274eefcf "I" |
624 rebasing 13:06edfc82198f "J" (tip) |
628 rebasing 13:06edfc82198f "J" (tip) |
|
629 2 new content-divergent changesets |
625 $ hg log -G |
630 $ hg log -G |
626 @ 15:5ae8a643467b J |
631 @ 15:5ae8a643467b J |
627 | |
632 | |
628 * 14:9ad579b4a5de I |
633 * 14:9ad579b4a5de I |
629 | |
634 | |
654 $ hg up 14 -C |
659 $ hg up 14 -C |
655 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
660 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
656 $ echo "K" > K |
661 $ echo "K" > K |
657 $ hg add K |
662 $ hg add K |
658 $ hg commit --amend -m "K" |
663 $ hg commit --amend -m "K" |
|
664 1 new orphan changesets |
659 $ echo "L" > L |
665 $ echo "L" > L |
660 $ hg add L |
666 $ hg add L |
661 $ hg commit -m "L" |
667 $ hg commit -m "L" |
662 $ hg up '.^' |
668 $ hg up '.^' |
663 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
669 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
664 $ echo "M" > M |
670 $ echo "M" > M |
665 $ hg add M |
671 $ hg add M |
666 $ hg commit --amend -m "M" |
672 $ hg commit --amend -m "M" |
|
673 1 new orphan changesets |
667 $ hg log -G |
674 $ hg log -G |
668 @ 18:bfaedf8eb73b M |
675 @ 18:bfaedf8eb73b M |
669 | |
676 | |
670 | * 17:97219452e4bd L |
677 | * 17:97219452e4bd L |
671 | | |
678 | | |
700 o 0:cd010b8cd998 A |
707 o 0:cd010b8cd998 A |
701 |
708 |
702 $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True |
709 $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True |
703 note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" |
710 note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" |
704 rebasing 15:5ae8a643467b "J" |
711 rebasing 15:5ae8a643467b "J" |
|
712 1 new orphan changesets |
705 |
713 |
706 $ cd .. |
714 $ cd .. |
707 |
715 |
708 Skip obsolete changeset even with multiple hops |
716 Skip obsolete changeset even with multiple hops |
709 ----------------------------------------------- |
717 ----------------------------------------------- |
730 updating to a hidden changeset a8b11f55fb19 |
738 updating to a hidden changeset a8b11f55fb19 |
731 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
739 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
732 $ echo C > C |
740 $ echo C > C |
733 $ hg add C |
741 $ hg add C |
734 $ hg commit -m C |
742 $ hg commit -m C |
|
743 1 new orphan changesets |
735 $ hg log -G |
744 $ hg log -G |
736 @ 4:212cb178bcbb C |
745 @ 4:212cb178bcbb C |
737 | |
746 | |
738 | o 3:261e70097290 B2 |
747 | o 3:261e70097290 B2 |
739 | | |
748 | | |
754 updating to a hidden changeset a8b11f55fb19 |
763 updating to a hidden changeset a8b11f55fb19 |
755 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
764 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
756 $ echo D > D |
765 $ echo D > D |
757 $ hg add D |
766 $ hg add D |
758 $ hg commit -m D |
767 $ hg commit -m D |
|
768 1 new orphan changesets |
759 $ hg --hidden strip -r 'desc(B1)' |
769 $ hg --hidden strip -r 'desc(B1)' |
760 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg |
770 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg |
761 $ hg log -G |
771 $ hg log -G |
762 @ 5:1a79b7535141 D |
772 @ 5:1a79b7535141 D |
763 | |
773 | |
794 | |
804 | |
795 o 0:4a2df7238c3b A |
805 o 0:4a2df7238c3b A |
796 |
806 |
797 $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true |
807 $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true |
798 obsoleted 1 changesets |
808 obsoleted 1 changesets |
|
809 1 new orphan changesets |
799 $ hg rebase -d 6 -r "4::" |
810 $ hg rebase -d 6 -r "4::" |
800 rebasing 4:ff2c4d47b71d "C" |
811 rebasing 4:ff2c4d47b71d "C" |
801 note: not rebasing 7:360bbaa7d3ce "O", it has no successor |
812 note: not rebasing 7:360bbaa7d3ce "O", it has no successor |
802 rebasing 8:8d47583e023f "P" (tip) |
813 rebasing 8:8d47583e023f "P" (tip) |
803 |
814 |
869 updating to a hidden changeset 121d9e3bc4c6 |
880 updating to a hidden changeset 121d9e3bc4c6 |
870 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
881 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
871 $ echo "bar" > foo |
882 $ echo "bar" > foo |
872 $ hg add foo |
883 $ hg add foo |
873 $ hg commit -m "bar foo" |
884 $ hg commit -m "bar foo" |
|
885 1 new orphan changesets |
874 $ hg log -G |
886 $ hg log -G |
875 @ 14:73568ab6879d bar foo |
887 @ 14:73568ab6879d bar foo |
876 | |
888 | |
877 | o 13:77d874d096a2 10' |
889 | o 13:77d874d096a2 10' |
878 | | |
890 | | |
920 With experimental.evolution.allowdivergence=True, rebase can create divergence |
932 With experimental.evolution.allowdivergence=True, rebase can create divergence |
921 |
933 |
922 $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True |
934 $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True |
923 rebasing 10:121d9e3bc4c6 "P" |
935 rebasing 10:121d9e3bc4c6 "P" |
924 rebasing 14:73568ab6879d "bar foo" (tip) |
936 rebasing 14:73568ab6879d "bar foo" (tip) |
|
937 2 new content-divergent changesets |
925 $ hg summary |
938 $ hg summary |
926 parent: 16:61bd55f69bc4 tip |
939 parent: 16:61bd55f69bc4 tip |
927 bar foo |
940 bar foo |
928 branch: default |
941 branch: default |
929 commit: (clean) |
942 commit: (clean) |
959 $ printf "dummy" > L |
972 $ printf "dummy" > L |
960 $ hg add L |
973 $ hg add L |
961 $ hg commit -m "dummy change" |
974 $ hg commit -m "dummy change" |
962 $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true |
975 $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true |
963 obsoleted 1 changesets |
976 obsoleted 1 changesets |
|
977 1 new orphan changesets |
964 |
978 |
965 $ hg log -G -r 16:: |
979 $ hg log -G -r 16:: |
966 @ 21:7bdc8a87673d dummy change |
980 @ 21:7bdc8a87673d dummy change |
967 | |
981 | |
968 x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) |
982 x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) |
1085 [255] |
1100 [255] |
1086 $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' |
1101 $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' |
1087 rebasing 3:a82ac2b38757 "c" (c) |
1102 rebasing 3:a82ac2b38757 "c" (c) |
1088 rebasing 4:76be324c128b "d" (d) |
1103 rebasing 4:76be324c128b "d" (d) |
1089 rebasing 7:1143e9adc121 "f" (f tip) |
1104 rebasing 7:1143e9adc121 "f" (f tip) |
|
1105 1 new orphan changesets |
|
1106 2 new content-divergent changesets |
1090 $ hg log -G -r 'a':: -T instabilities |
1107 $ hg log -G -r 'a':: -T instabilities |
1091 o 10:e1744ea07510 f |
1108 o 10:e1744ea07510 f |
1092 | |
1109 | |
1093 * 9:e2b36ea9a0a0 d (content-divergent) |
1110 * 9:e2b36ea9a0a0 d (content-divergent) |
1094 | |
1111 | |
1116 |
1133 |
1117 $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' |
1134 $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' |
1118 rebasing 3:a82ac2b38757 "c" (c) |
1135 rebasing 3:a82ac2b38757 "c" (c) |
1119 rebasing 4:76be324c128b "d" (d) |
1136 rebasing 4:76be324c128b "d" (d) |
1120 rebasing 7:1143e9adc121 "f" (f tip) |
1137 rebasing 7:1143e9adc121 "f" (f tip) |
|
1138 1 new orphan changesets |
|
1139 2 new content-divergent changesets |
1121 |
1140 |
1122 $ hg strip -r 0: |
1141 $ hg strip -r 0: |
1123 |
1142 |
1124 Similar test on a more complex graph |
1143 Similar test on a more complex graph |
1125 |
1144 |
1204 > /| |
1224 > /| |
1205 > E D B # replace: D -> B |
1225 > E D B # replace: D -> B |
1206 > \|/ |
1226 > \|/ |
1207 > A |
1227 > A |
1208 > EOF |
1228 > EOF |
|
1229 1 new orphan changesets |
1209 |
1230 |
1210 $ hg rebase -d B -s D |
1231 $ hg rebase -d B -s D |
1211 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
1232 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
1212 rebasing 4:66f1a38021c9 "F" (F tip) |
1233 rebasing 4:66f1a38021c9 "F" (F tip) |
1213 $ hg log -G |
1234 $ hg log -G |
1235 > /| |
1256 > /| |
1236 > E D B # replace: E -> B |
1257 > E D B # replace: E -> B |
1237 > \|/ |
1258 > \|/ |
1238 > A |
1259 > A |
1239 > EOF |
1260 > EOF |
|
1261 1 new orphan changesets |
1240 |
1262 |
1241 $ hg rebase -d B -s E |
1263 $ hg rebase -d B -s E |
1242 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
1264 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
1243 rebasing 4:66f1a38021c9 "F" (F tip) |
1265 rebasing 4:66f1a38021c9 "F" (F tip) |
1244 $ hg log -G |
1266 $ hg log -G |
1266 > /| | |
1288 > /| | |
1267 > E D B # replace: D -> B |
1289 > E D B # replace: D -> B |
1268 > \|/ |
1290 > \|/ |
1269 > A |
1291 > A |
1270 > EOF |
1292 > EOF |
|
1293 1 new orphan changesets |
1271 |
1294 |
1272 $ hg rebase -d C -s D |
1295 $ hg rebase -d C -s D |
1273 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
1296 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
1274 rebasing 5:66f1a38021c9 "F" (F tip) |
1297 rebasing 5:66f1a38021c9 "F" (F tip) |
1275 |
1298 |
1300 > /| | |
1323 > /| | |
1301 > E D B # replace: E -> B |
1324 > E D B # replace: E -> B |
1302 > \|/ |
1325 > \|/ |
1303 > A |
1326 > A |
1304 > EOF |
1327 > EOF |
|
1328 1 new orphan changesets |
1305 |
1329 |
1306 $ hg rebase -d C -s E |
1330 $ hg rebase -d C -s E |
1307 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
1331 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
1308 rebasing 5:66f1a38021c9 "F" (F tip) |
1332 rebasing 5:66f1a38021c9 "F" (F tip) |
1309 $ hg log -G |
1333 $ hg log -G |
1333 > /| | |
1357 > /| | |
1334 > E D B # replace: E -> B |
1358 > E D B # replace: E -> B |
1335 > \|/ |
1359 > \|/ |
1336 > A |
1360 > A |
1337 > EOF |
1361 > EOF |
|
1362 1 new orphan changesets |
1338 |
1363 |
1339 $ hg rebase -d C -b F |
1364 $ hg rebase -d C -b F |
1340 rebasing 2:b18e25de2cf5 "D" (D) |
1365 rebasing 2:b18e25de2cf5 "D" (D) |
1341 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
1366 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
1342 rebasing 5:66f1a38021c9 "F" (F tip) |
1367 rebasing 5:66f1a38021c9 "F" (F tip) |
1368 > /| | |
1393 > /| | |
1369 > E D B # replace: D -> B |
1394 > E D B # replace: D -> B |
1370 > \|/ |
1395 > \|/ |
1371 > A |
1396 > A |
1372 > EOF |
1397 > EOF |
|
1398 1 new orphan changesets |
1373 |
1399 |
1374 $ hg rebase -d C -b F |
1400 $ hg rebase -d C -b F |
1375 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
1401 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
1376 rebasing 3:7fb047a69f22 "E" (E) |
1402 rebasing 3:7fb047a69f22 "E" (E) |
1377 rebasing 5:66f1a38021c9 "F" (F tip) |
1403 rebasing 5:66f1a38021c9 "F" (F tip) |
1403 > /| /| # replace: A -> C |
1429 > /| /| # replace: A -> C |
1404 > A B C D # replace: B -> D |
1430 > A B C D # replace: B -> D |
1405 > | | |
1431 > | | |
1406 > X Y |
1432 > X Y |
1407 > EOS |
1433 > EOS |
|
1434 1 new orphan changesets |
1408 $ hg rebase -r A+B+E -d F |
1435 $ hg rebase -r A+B+E -d F |
1409 note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) |
1436 note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) |
1410 note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) |
1437 note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) |
1411 rebasing 7:dac5d11c5a7d "E" (E tip) |
1438 rebasing 7:dac5d11c5a7d "E" (E tip) |
1412 abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f |
1439 abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f |
1421 $ hg debugdrawdag <<'EOS' |
1448 $ hg debugdrawdag <<'EOS' |
1422 > D Z |
1449 > D Z |
1423 > /| | # replace: A -> C |
1450 > /| | # replace: A -> C |
1424 > A B C # D/D = D |
1451 > A B C # D/D = D |
1425 > EOS |
1452 > EOS |
|
1453 1 new orphan changesets |
1426 $ hg rebase -r A+B+D -d Z |
1454 $ hg rebase -r A+B+D -d Z |
1427 note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) |
1455 note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) |
1428 rebasing 1:fc2b737bb2e5 "B" (B) |
1456 rebasing 1:fc2b737bb2e5 "B" (B) |
1429 rebasing 3:b8ed089c80ad "D" (D) |
1457 rebasing 3:b8ed089c80ad "D" (D) |
1430 |
1458 |
1451 $ hg debugdrawdag <<'EOS' |
1479 $ hg debugdrawdag <<'EOS' |
1452 > D Z |
1480 > D Z |
1453 > /| | # replace: B -> C |
1481 > /| | # replace: B -> C |
1454 > A B C # D/D = D |
1482 > A B C # D/D = D |
1455 > EOS |
1483 > EOS |
|
1484 1 new orphan changesets |
1456 $ hg rebase -r B+A+D -d Z |
1485 $ hg rebase -r B+A+D -d Z |
1457 rebasing 0:426bada5c675 "A" (A) |
1486 rebasing 0:426bada5c675 "A" (A) |
1458 note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) |
1487 note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) |
1459 rebasing 3:b8ed089c80ad "D" (D) |
1488 rebasing 3:b8ed089c80ad "D" (D) |
1460 |
1489 |
1528 $ hg update D1 -q |
1557 $ hg update D1 -q |
1529 $ hg bookmark book -i |
1558 $ hg bookmark book -i |
1530 $ hg rebase -r B+D1 -d E |
1559 $ hg rebase -r B+D1 -d E |
1531 rebasing 1:112478962961 "B" (B) |
1560 rebasing 1:112478962961 "B" (B) |
1532 note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) |
1561 note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) |
|
1562 1 new orphan changesets |
1533 $ hg log -G -T '{desc} {bookmarks}' |
1563 $ hg log -G -T '{desc} {bookmarks}' |
1534 @ B book |
1564 @ B book |
1535 | |
1565 | |
1536 | x D1 |
1566 | x D1 |
1537 | | |
1567 | | |