Show More
@@ -1,4 +1,4 b'' | |||||
1 | #testcases filelog compatibility sidedata |
|
1 | #testcases filelog compatibility changeset sidedata | |
2 |
|
2 | |||
3 | ===================================================== |
|
3 | ===================================================== | |
4 | Test Copy tracing for chain of copies involving merge |
|
4 | Test Copy tracing for chain of copies involving merge | |
@@ -28,6 +28,14 b' use git diff to see rename' | |||||
28 | > EOF |
|
28 | > EOF | |
29 | #endif |
|
29 | #endif | |
30 |
|
30 | |||
|
31 | #if changeset | |||
|
32 | $ cat >> $HGRCPATH << EOF | |||
|
33 | > [experimental] | |||
|
34 | > copies.read-from = changeset-only | |||
|
35 | > copies.write-to = changeset-only | |||
|
36 | > EOF | |||
|
37 | #endif | |||
|
38 | ||||
31 | #if sidedata |
|
39 | #if sidedata | |
32 | $ cat >> $HGRCPATH << EOF |
|
40 | $ cat >> $HGRCPATH << EOF | |
33 | > [format] |
|
41 | > [format] | |
@@ -384,23 +392,39 b' The bugs makes recorded copy is differen' | |||||
384 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
392 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' | |
385 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
393 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
386 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
394 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' | |
387 | 169be882533bc917905d46c0c951aa9a1e288dcf 644 d |
|
395 | 169be882533bc917905d46c0c951aa9a1e288dcf 644 d (no-changeset !) | |
|
396 | b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 d (changeset !) | |||
388 | $ hg debugindex d |
|
397 | $ hg debugindex d | |
389 | rev linkrev nodeid p1 p2 |
|
398 | rev linkrev nodeid p1 p2 | |
390 | 0 2 169be882533b 000000000000 000000000000 |
|
399 | 0 2 169be882533b 000000000000 000000000000 (no-changeset !) | |
|
400 | 0 2 b789fdd96dc2 000000000000 000000000000 (changeset !) | |||
391 | 1 8 b004912a8510 000000000000 000000000000 |
|
401 | 1 8 b004912a8510 000000000000 000000000000 | |
392 |
|
402 | |||
393 | Log output should not include a merge commit as it did not happen |
|
403 | Log output should not include a merge commit as it did not happen | |
394 |
|
404 | |||
|
405 | #if no-changeset | |||
|
406 | $ hg log -Gfr 'desc("mBDm-0")' d | |||
|
407 | o 8 d-2 re-add d | |||
|
408 | | | |||
|
409 | ~ | |||
|
410 | #else | |||
395 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
411 | $ hg log -Gfr 'desc("mBDm-0")' d | |
396 | o 8 d-2 re-add d |
|
412 | o 8 d-2 re-add d | |
397 | | |
|
413 | | | |
398 | ~ |
|
414 | ~ | |
|
415 | #endif | |||
399 |
|
416 | |||
|
417 | #if no-changeset | |||
400 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
418 | $ hg log -Gfr 'desc("mDBm-0")' d | |
401 | o 8 d-2 re-add d |
|
419 | o 8 d-2 re-add d | |
402 | | |
|
420 | | | |
403 | ~ |
|
421 | ~ | |
|
422 | #else | |||
|
423 | $ hg log -Gfr 'desc("mDBm-0")' d | |||
|
424 | o 8 d-2 re-add d | |||
|
425 | | | |||
|
426 | ~ | |||
|
427 | #endif | |||
404 |
|
428 | |||
405 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' |
|
429 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | |
406 | M b |
|
430 | M b | |
@@ -452,6 +476,7 b' Comparing with a merge with colliding re' | |||||
452 | | |
|
476 | | | |
453 | o 0 i-0 initial commit: a b h |
|
477 | o 0 i-0 initial commit: a b h | |
454 |
|
478 | |||
|
479 | #if no-changeset | |||
455 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
480 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
456 | c39c6083dad048d5138618a46f123e2f397f4f18 644 f |
|
481 | c39c6083dad048d5138618a46f123e2f397f4f18 644 f | |
457 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
482 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
@@ -466,6 +491,22 b' Comparing with a merge with colliding re' | |||||
466 | 1 10 71b9b7e73d97 000000000000 000000000000 |
|
491 | 1 10 71b9b7e73d97 000000000000 000000000000 | |
467 | 2 19 c39c6083dad0 263ea25e220a 71b9b7e73d97 |
|
492 | 2 19 c39c6083dad0 263ea25e220a 71b9b7e73d97 | |
468 | 3 20 a9a8bc3860c9 71b9b7e73d97 263ea25e220a |
|
493 | 3 20 a9a8bc3860c9 71b9b7e73d97 263ea25e220a | |
|
494 | #else | |||
|
495 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |||
|
496 | 498e8799f49f9da1ca06bb2d6d4accf165c5b572 644 f | |||
|
497 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |||
|
498 | c5b506a7118667a38a9c9348a1f63b679e382f57 644 f | |||
|
499 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |||
|
500 | b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 f | |||
|
501 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |||
|
502 | 1e88685f5ddec574a34c70af492f95b6debc8741 644 f | |||
|
503 | $ hg debugindex f | |||
|
504 | rev linkrev nodeid p1 p2 | |||
|
505 | 0 4 b789fdd96dc2 000000000000 000000000000 | |||
|
506 | 1 10 1e88685f5dde 000000000000 000000000000 | |||
|
507 | 2 19 498e8799f49f b789fdd96dc2 1e88685f5dde | |||
|
508 | 3 20 c5b506a71186 1e88685f5dde b789fdd96dc2 | |||
|
509 | #endif | |||
469 |
|
510 | |||
470 | # Here the filelog based implementation is not looking at the rename |
|
511 | # Here the filelog based implementation is not looking at the rename | |
471 | # information (because the file exist on both side). However the changelog |
|
512 | # information (because the file exist on both side). However the changelog | |
@@ -549,9 +590,11 b' Merge:' | |||||
549 | $ hg commit -m "f-2: rename i -> d" |
|
590 | $ hg commit -m "f-2: rename i -> d" | |
550 | $ hg debugindex d |
|
591 | $ hg debugindex d | |
551 | rev linkrev nodeid p1 p2 |
|
592 | rev linkrev nodeid p1 p2 | |
552 | 0 2 169be882533b 000000000000 000000000000 |
|
593 | 0 2 169be882533b 000000000000 000000000000 (no-changeset !) | |
|
594 | 0 2 b789fdd96dc2 000000000000 000000000000 (changeset !) | |||
553 | 1 8 b004912a8510 000000000000 000000000000 |
|
595 | 1 8 b004912a8510 000000000000 000000000000 | |
554 | 2 22 4a067cf8965d 000000000000 000000000000 |
|
596 | 2 22 4a067cf8965d 000000000000 000000000000 (no-changeset !) | |
|
597 | 2 22 fe6f8b4f507f 000000000000 000000000000 (changeset !) | |||
555 | $ hg up 'desc("b-1")' |
|
598 | $ hg up 'desc("b-1")' | |
556 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
599 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
557 | $ hg merge 'desc("f-2")' |
|
600 | $ hg merge 'desc("f-2")' | |
@@ -617,6 +660,7 b' Merge:' | |||||
617 | i (no-filelog !) |
|
660 | i (no-filelog !) | |
618 | R i |
|
661 | R i | |
619 |
|
662 | |||
|
663 | #if no-changeset | |||
620 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
664 | $ hg log -Gfr 'desc("mBFm-0")' d | |
621 | o 22 f-2: rename i -> d |
|
665 | o 22 f-2: rename i -> d | |
622 | | |
|
666 | | | |
@@ -624,7 +668,14 b' Merge:' | |||||
624 | : |
|
668 | : | |
625 | o 0 i-0 initial commit: a b h |
|
669 | o 0 i-0 initial commit: a b h | |
626 |
|
670 | |||
|
671 | #else | |||
|
672 | $ hg log -Gfr 'desc("mBFm-0")' d | |||
|
673 | o 22 f-2: rename i -> d | |||
|
674 | | | |||
|
675 | ~ | |||
|
676 | #endif | |||
627 |
|
677 | |||
|
678 | #if no-changeset | |||
628 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
679 | $ hg log -Gfr 'desc("mFBm-0")' d | |
629 | o 22 f-2: rename i -> d |
|
680 | o 22 f-2: rename i -> d | |
630 | | |
|
681 | | | |
@@ -632,6 +683,12 b' Merge:' | |||||
632 | : |
|
683 | : | |
633 | o 0 i-0 initial commit: a b h |
|
684 | o 0 i-0 initial commit: a b h | |
634 |
|
685 | |||
|
686 | #else | |||
|
687 | $ hg log -Gfr 'desc("mFBm-0")' d | |||
|
688 | o 22 f-2: rename i -> d | |||
|
689 | | | |||
|
690 | ~ | |||
|
691 | #endif | |||
635 |
|
692 | |||
636 |
|
693 | |||
637 | Merge: |
|
694 | Merge: | |
@@ -701,6 +758,7 b' revision numbers)' | |||||
701 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' |
|
758 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | |
702 | M d |
|
759 | M d | |
703 |
|
760 | |||
|
761 | #if no-changeset | |||
704 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
762 | $ hg log -Gfr 'desc("mDGm-0")' d | |
705 | o 26 mDGm-0 simple merge - one way |
|
763 | o 26 mDGm-0 simple merge - one way | |
706 | |\ |
|
764 | |\ | |
@@ -714,8 +772,21 b' revision numbers)' | |||||
714 | | |
|
772 | | | |
715 | o 0 i-0 initial commit: a b h |
|
773 | o 0 i-0 initial commit: a b h | |
716 |
|
774 | |||
|
775 | #else | |||
|
776 | $ hg log -Gfr 'desc("mDGm-0")' d | |||
|
777 | o 26 mDGm-0 simple merge - one way | |||
|
778 | |\ | |||
|
779 | | o 25 g-1: update d | |||
|
780 | | | | |||
|
781 | o | 8 d-2 re-add d | |||
|
782 | |/ | |||
|
783 | o 2 i-2: c -move-> d | |||
|
784 | | | |||
|
785 | ~ | |||
|
786 | #endif | |||
717 |
|
787 | |||
718 |
|
788 | |||
|
789 | #if no-changeset | |||
719 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
790 | $ hg log -Gfr 'desc("mDGm-0")' d | |
720 | o 26 mDGm-0 simple merge - one way |
|
791 | o 26 mDGm-0 simple merge - one way | |
721 | |\ |
|
792 | |\ | |
@@ -729,6 +800,18 b' revision numbers)' | |||||
729 | | |
|
800 | | | |
730 | o 0 i-0 initial commit: a b h |
|
801 | o 0 i-0 initial commit: a b h | |
731 |
|
802 | |||
|
803 | #else | |||
|
804 | $ hg log -Gfr 'desc("mDGm-0")' d | |||
|
805 | o 26 mDGm-0 simple merge - one way | |||
|
806 | |\ | |||
|
807 | | o 25 g-1: update d | |||
|
808 | | | | |||
|
809 | o | 8 d-2 re-add d | |||
|
810 | |/ | |||
|
811 | o 2 i-2: c -move-> d | |||
|
812 | | | |||
|
813 | ~ | |||
|
814 | #endif | |||
732 |
|
815 | |||
733 |
|
816 | |||
734 | Merge: |
|
817 | Merge: | |
@@ -809,6 +892,7 b' Note:' | |||||
809 | h (no-filelog !) |
|
892 | h (no-filelog !) | |
810 | R h |
|
893 | R h | |
811 |
|
894 | |||
|
895 | #if no-changeset | |||
812 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
896 | $ hg log -Gfr 'desc("mFGm-0")' d | |
813 | o 28 mFGm-0 simple merge - one way |
|
897 | o 28 mFGm-0 simple merge - one way | |
814 | |\ |
|
898 | |\ | |
@@ -824,7 +908,20 b' Note:' | |||||
824 | | |
|
908 | | | |
825 | o 0 i-0 initial commit: a b h |
|
909 | o 0 i-0 initial commit: a b h | |
826 |
|
910 | |||
|
911 | #else | |||
|
912 | $ hg log -Gfr 'desc("mFGm-0")' d | |||
|
913 | o 28 mFGm-0 simple merge - one way | |||
|
914 | |\ | |||
|
915 | | o 25 g-1: update d | |||
|
916 | | | | |||
|
917 | o | 22 f-2: rename i -> d | |||
|
918 | |/ | |||
|
919 | o 2 i-2: c -move-> d | |||
|
920 | | | |||
|
921 | ~ | |||
|
922 | #endif | |||
827 |
|
923 | |||
|
924 | #if no-changeset | |||
828 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
925 | $ hg log -Gfr 'desc("mGFm-0")' d | |
829 | @ 29 mGFm-0 simple merge - the other way |
|
926 | @ 29 mGFm-0 simple merge - the other way | |
830 | |\ |
|
927 | |\ | |
@@ -840,6 +937,18 b' Note:' | |||||
840 | | |
|
937 | | | |
841 | o 0 i-0 initial commit: a b h |
|
938 | o 0 i-0 initial commit: a b h | |
842 |
|
939 | |||
|
940 | #else | |||
|
941 | $ hg log -Gfr 'desc("mGFm-0")' d | |||
|
942 | @ 29 mGFm-0 simple merge - the other way | |||
|
943 | |\ | |||
|
944 | | o 25 g-1: update d | |||
|
945 | | | | |||
|
946 | o | 22 f-2: rename i -> d | |||
|
947 | |/ | |||
|
948 | o 2 i-2: c -move-> d | |||
|
949 | | | |||
|
950 | ~ | |||
|
951 | #endif | |||
843 |
|
952 | |||
844 |
|
953 | |||
845 | Comparing with merging with a deletion (and keeping the file) |
|
954 | Comparing with merging with a deletion (and keeping the file) | |
@@ -901,11 +1010,11 b' copy tracing chain.' | |||||
901 |
|
1010 | |||
902 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' |
|
1011 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' | |
903 | A d |
|
1012 | A d | |
904 | a (no-compatibility !) |
|
1013 | a (no-compatibility no-changeset !) | |
905 | R a |
|
1014 | R a | |
906 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' |
|
1015 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' | |
907 | A d |
|
1016 | A d | |
908 | a (no-compatibility !) |
|
1017 | a (no-compatibility no-changeset !) | |
909 | R a |
|
1018 | R a | |
910 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' |
|
1019 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' | |
911 | A d |
|
1020 | A d | |
@@ -965,12 +1074,12 b' copy tracing chain.' | |||||
965 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
1074 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | |
966 | M b |
|
1075 | M b | |
967 | A d |
|
1076 | A d | |
968 | a (no-compatibility !) |
|
1077 | a (no-compatibility no-changeset !) | |
969 | R a |
|
1078 | R a | |
970 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
1079 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | |
971 | M b |
|
1080 | M b | |
972 | A d |
|
1081 | A d | |
973 | a (no-compatibility !) |
|
1082 | a (no-compatibility no-changeset !) | |
974 | R a |
|
1083 | R a | |
975 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' |
|
1084 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' | |
976 | M b |
|
1085 | M b | |
@@ -1018,7 +1127,7 b' We upgrade a repository that is not usin' | |||||
1018 | #endif |
|
1127 | #endif | |
1019 |
|
1128 | |||
1020 |
|
1129 | |||
1021 | #if no-compatibility |
|
1130 | #if no-compatibility no-changeset | |
1022 |
|
1131 | |||
1023 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do |
|
1132 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | |
1024 | > echo "##### revision $rev #####" |
|
1133 | > echo "##### revision $rev #####" |
General Comments 0
You need to be logged in to leave comments.
Login now