##// END OF EJS Templates
test-revert: add case where file is tracked but deleted in working directory
Pierre-Yves David -
r22144:b7c9f07b default
parent child Browse files
Show More
@@ -457,6 +457,9 b' Write the python script to disk'
457 > 'wc': lambda cc: 'wc',
457 > 'wc': lambda cc: 'wc',
458 > # removed: file is missing and marked as untracked
458 > # removed: file is missing and marked as untracked
459 > 'removed': lambda cc: None,
459 > 'removed': lambda cc: None,
460 > # deleted: file is recorded as tracked but missing
461 > # rely on file deletion outside of this script
462 > 'deleted': lambda cc:'TOBEDELETED',
460 > }
463 > }
461 > # untracked-X is a version of X where the file is not tracked (? unknown)
464 > # untracked-X is a version of X where the file is not tracked (? unknown)
462 > wccontent['untracked-clean'] = wccontent['clean']
465 > wccontent['untracked-clean'] = wccontent['clean']
@@ -506,6 +509,7 b' check list of planned files'
506
509
507 $ python gen-revert-cases.py filelist
510 $ python gen-revert-cases.py filelist
508 added_clean
511 added_clean
512 added_deleted
509 added_removed
513 added_removed
510 added_revert
514 added_revert
511 added_untracked-clean
515 added_untracked-clean
@@ -513,6 +517,7 b' check list of planned files'
513 added_untracked-wc
517 added_untracked-wc
514 added_wc
518 added_wc
515 clean_clean
519 clean_clean
520 clean_deleted
516 clean_removed
521 clean_removed
517 clean_revert
522 clean_revert
518 clean_untracked-clean
523 clean_untracked-clean
@@ -520,6 +525,7 b' check list of planned files'
520 clean_untracked-wc
525 clean_untracked-wc
521 clean_wc
526 clean_wc
522 missing_clean
527 missing_clean
528 missing_deleted
523 missing_removed
529 missing_removed
524 missing_revert
530 missing_revert
525 missing_untracked-clean
531 missing_untracked-clean
@@ -527,6 +533,7 b' check list of planned files'
527 missing_untracked-wc
533 missing_untracked-wc
528 missing_wc
534 missing_wc
529 modified_clean
535 modified_clean
536 modified_deleted
530 modified_removed
537 modified_removed
531 modified_revert
538 modified_revert
532 modified_untracked-clean
539 modified_untracked-clean
@@ -534,6 +541,7 b' check list of planned files'
534 modified_untracked-wc
541 modified_untracked-wc
535 modified_wc
542 modified_wc
536 removed_clean
543 removed_clean
544 removed_deleted
537 removed_removed
545 removed_removed
538 removed_revert
546 removed_revert
539 removed_untracked-clean
547 removed_untracked-clean
@@ -567,6 +575,7 b' Generate base changeset'
567 $ python ../gen-revert-cases.py base
575 $ python ../gen-revert-cases.py base
568 $ hg addremove --similarity 0
576 $ hg addremove --similarity 0
569 adding clean_clean
577 adding clean_clean
578 adding clean_deleted
570 adding clean_removed
579 adding clean_removed
571 adding clean_revert
580 adding clean_revert
572 adding clean_untracked-clean
581 adding clean_untracked-clean
@@ -574,6 +583,7 b' Generate base changeset'
574 adding clean_untracked-wc
583 adding clean_untracked-wc
575 adding clean_wc
584 adding clean_wc
576 adding modified_clean
585 adding modified_clean
586 adding modified_deleted
577 adding modified_removed
587 adding modified_removed
578 adding modified_revert
588 adding modified_revert
579 adding modified_untracked-clean
589 adding modified_untracked-clean
@@ -581,6 +591,7 b' Generate base changeset'
581 adding modified_untracked-wc
591 adding modified_untracked-wc
582 adding modified_wc
592 adding modified_wc
583 adding removed_clean
593 adding removed_clean
594 adding removed_deleted
584 adding removed_removed
595 adding removed_removed
585 adding removed_revert
596 adding removed_revert
586 adding removed_untracked-clean
597 adding removed_untracked-clean
@@ -589,6 +600,7 b' Generate base changeset'
589 adding removed_wc
600 adding removed_wc
590 $ hg status
601 $ hg status
591 A clean_clean
602 A clean_clean
603 A clean_deleted
592 A clean_removed
604 A clean_removed
593 A clean_revert
605 A clean_revert
594 A clean_untracked-clean
606 A clean_untracked-clean
@@ -596,6 +608,7 b' Generate base changeset'
596 A clean_untracked-wc
608 A clean_untracked-wc
597 A clean_wc
609 A clean_wc
598 A modified_clean
610 A modified_clean
611 A modified_deleted
599 A modified_removed
612 A modified_removed
600 A modified_revert
613 A modified_revert
601 A modified_untracked-clean
614 A modified_untracked-clean
@@ -603,6 +616,7 b' Generate base changeset'
603 A modified_untracked-wc
616 A modified_untracked-wc
604 A modified_wc
617 A modified_wc
605 A removed_clean
618 A removed_clean
619 A removed_deleted
606 A removed_removed
620 A removed_removed
607 A removed_revert
621 A removed_revert
608 A removed_untracked-clean
622 A removed_untracked-clean
@@ -616,6 +630,7 b' Generate base changeset'
616 $ python ../dircontent.py > ../content-base.txt
630 $ python ../dircontent.py > ../content-base.txt
617 $ cat ../content-base.txt
631 $ cat ../content-base.txt
618 base clean_clean
632 base clean_clean
633 base clean_deleted
619 base clean_removed
634 base clean_removed
620 base clean_revert
635 base clean_revert
621 base clean_untracked-clean
636 base clean_untracked-clean
@@ -623,6 +638,7 b' Generate base changeset'
623 base clean_untracked-wc
638 base clean_untracked-wc
624 base clean_wc
639 base clean_wc
625 base modified_clean
640 base modified_clean
641 base modified_deleted
626 base modified_removed
642 base modified_removed
627 base modified_revert
643 base modified_revert
628 base modified_untracked-clean
644 base modified_untracked-clean
@@ -630,6 +646,7 b' Generate base changeset'
630 base modified_untracked-wc
646 base modified_untracked-wc
631 base modified_wc
647 base modified_wc
632 base removed_clean
648 base removed_clean
649 base removed_deleted
633 base removed_removed
650 base removed_removed
634 base removed_revert
651 base removed_revert
635 base removed_untracked-clean
652 base removed_untracked-clean
@@ -642,6 +659,7 b' Create parent changeset'
642 $ python ../gen-revert-cases.py parent
659 $ python ../gen-revert-cases.py parent
643 $ hg addremove --similarity 0
660 $ hg addremove --similarity 0
644 adding added_clean
661 adding added_clean
662 adding added_deleted
645 adding added_removed
663 adding added_removed
646 adding added_revert
664 adding added_revert
647 adding added_untracked-clean
665 adding added_untracked-clean
@@ -649,6 +667,7 b' Create parent changeset'
649 adding added_untracked-wc
667 adding added_untracked-wc
650 adding added_wc
668 adding added_wc
651 removing removed_clean
669 removing removed_clean
670 removing removed_deleted
652 removing removed_removed
671 removing removed_removed
653 removing removed_revert
672 removing removed_revert
654 removing removed_untracked-clean
673 removing removed_untracked-clean
@@ -657,6 +676,7 b' Create parent changeset'
657 removing removed_wc
676 removing removed_wc
658 $ hg status
677 $ hg status
659 M modified_clean
678 M modified_clean
679 M modified_deleted
660 M modified_removed
680 M modified_removed
661 M modified_revert
681 M modified_revert
662 M modified_untracked-clean
682 M modified_untracked-clean
@@ -664,6 +684,7 b' Create parent changeset'
664 M modified_untracked-wc
684 M modified_untracked-wc
665 M modified_wc
685 M modified_wc
666 A added_clean
686 A added_clean
687 A added_deleted
667 A added_removed
688 A added_removed
668 A added_revert
689 A added_revert
669 A added_untracked-clean
690 A added_untracked-clean
@@ -671,6 +692,7 b' Create parent changeset'
671 A added_untracked-wc
692 A added_untracked-wc
672 A added_wc
693 A added_wc
673 R removed_clean
694 R removed_clean
695 R removed_deleted
674 R removed_removed
696 R removed_removed
675 R removed_revert
697 R removed_revert
676 R removed_untracked-clean
698 R removed_untracked-clean
@@ -684,6 +706,7 b' Create parent changeset'
684 $ python ../dircontent.py > ../content-parent.txt
706 $ python ../dircontent.py > ../content-parent.txt
685 $ cat ../content-parent.txt
707 $ cat ../content-parent.txt
686 parent added_clean
708 parent added_clean
709 parent added_deleted
687 parent added_removed
710 parent added_removed
688 parent added_revert
711 parent added_revert
689 parent added_untracked-clean
712 parent added_untracked-clean
@@ -691,6 +714,7 b' Create parent changeset'
691 parent added_untracked-wc
714 parent added_untracked-wc
692 parent added_wc
715 parent added_wc
693 base clean_clean
716 base clean_clean
717 base clean_deleted
694 base clean_removed
718 base clean_removed
695 base clean_revert
719 base clean_revert
696 base clean_untracked-clean
720 base clean_untracked-clean
@@ -698,6 +722,7 b' Create parent changeset'
698 base clean_untracked-wc
722 base clean_untracked-wc
699 base clean_wc
723 base clean_wc
700 parent modified_clean
724 parent modified_clean
725 parent modified_deleted
701 parent modified_removed
726 parent modified_removed
702 parent modified_revert
727 parent modified_revert
703 parent modified_untracked-clean
728 parent modified_untracked-clean
@@ -713,14 +738,17 b' Setup working directory'
713 removing added_revert
738 removing added_revert
714 removing added_untracked-revert
739 removing added_untracked-revert
715 removing clean_removed
740 removing clean_removed
741 adding missing_deleted
716 adding missing_untracked-wc
742 adding missing_untracked-wc
717 adding missing_wc
743 adding missing_wc
718 removing modified_removed
744 removing modified_removed
745 adding removed_deleted
719 adding removed_revert
746 adding removed_revert
720 adding removed_untracked-revert
747 adding removed_untracked-revert
721 adding removed_untracked-wc
748 adding removed_untracked-wc
722 adding removed_wc
749 adding removed_wc
723 $ hg forget *untracked*
750 $ hg forget *untracked*
751 $ rm *deleted*
724 $ hg status
752 $ hg status
725 M added_wc
753 M added_wc
726 M clean_wc
754 M clean_wc
@@ -742,6 +770,11 b' Setup working directory'
742 R modified_untracked-clean
770 R modified_untracked-clean
743 R modified_untracked-revert
771 R modified_untracked-revert
744 R modified_untracked-wc
772 R modified_untracked-wc
773 ! added_deleted
774 ! clean_deleted
775 ! missing_deleted
776 ! modified_deleted
777 ! removed_deleted
745 ? missing_untracked-wc
778 ? missing_untracked-wc
746 ? removed_untracked-revert
779 ? removed_untracked-revert
747 ? removed_untracked-wc
780 ? removed_untracked-wc
@@ -763,10 +796,16 b' Setup working directory'
763 R modified_untracked-revert
796 R modified_untracked-revert
764 R modified_untracked-wc
797 R modified_untracked-wc
765 R removed_clean
798 R removed_clean
799 R removed_deleted
766 R removed_removed
800 R removed_removed
767 R removed_untracked-clean
801 R removed_untracked-clean
768 R removed_untracked-revert
802 R removed_untracked-revert
769 R removed_untracked-wc
803 R removed_untracked-wc
804 ! added_deleted
805 ! clean_deleted
806 ! missing_deleted
807 ! modified_deleted
808 ! removed_deleted
770 ? missing_untracked-wc
809 ? missing_untracked-wc
771
810
772 (create a simple text version of the content)
811 (create a simple text version of the content)
@@ -809,24 +848,29 b' Test revert --all to parent content'
809 check revert output
848 check revert output
810
849
811 $ hg revert --all
850 $ hg revert --all
851 reverting added_deleted
812 undeleting added_removed
852 undeleting added_removed
813 undeleting added_revert
853 undeleting added_revert
814 undeleting added_untracked-clean
854 undeleting added_untracked-clean
815 undeleting added_untracked-revert
855 undeleting added_untracked-revert
816 undeleting added_untracked-wc
856 undeleting added_untracked-wc
817 reverting added_wc
857 reverting added_wc
858 reverting clean_deleted
818 undeleting clean_removed
859 undeleting clean_removed
819 undeleting clean_untracked-clean
860 undeleting clean_untracked-clean
820 undeleting clean_untracked-revert
861 undeleting clean_untracked-revert
821 undeleting clean_untracked-wc
862 undeleting clean_untracked-wc
822 reverting clean_wc
863 reverting clean_wc
864 forgetting missing_deleted
823 forgetting missing_wc
865 forgetting missing_wc
866 reverting modified_deleted
824 undeleting modified_removed
867 undeleting modified_removed
825 reverting modified_revert
868 reverting modified_revert
826 undeleting modified_untracked-clean
869 undeleting modified_untracked-clean
827 undeleting modified_untracked-revert
870 undeleting modified_untracked-revert
828 undeleting modified_untracked-wc
871 undeleting modified_untracked-wc
829 reverting modified_wc
872 reverting modified_wc
873 forgetting removed_deleted
830 forgetting removed_revert
874 forgetting removed_revert
831 forgetting removed_wc
875 forgetting removed_wc
832
876
@@ -872,14 +916,18 b' Misbehavior:'
872
916
873 $ hg revert --all --rev 'desc(base)'
917 $ hg revert --all --rev 'desc(base)'
874 removing added_clean
918 removing added_clean
919 removing added_deleted
875 removing added_wc
920 removing added_wc
921 reverting clean_deleted
876 undeleting clean_removed
922 undeleting clean_removed
877 undeleting clean_untracked-clean
923 undeleting clean_untracked-clean
878 undeleting clean_untracked-revert
924 undeleting clean_untracked-revert
879 undeleting clean_untracked-wc
925 undeleting clean_untracked-wc
880 reverting clean_wc
926 reverting clean_wc
927 forgetting missing_deleted
881 forgetting missing_wc
928 forgetting missing_wc
882 reverting modified_clean
929 reverting modified_clean
930 reverting modified_deleted
883 undeleting modified_removed
931 undeleting modified_removed
884 reverting modified_revert
932 reverting modified_revert
885 undeleting modified_untracked-clean
933 undeleting modified_untracked-clean
@@ -887,6 +935,7 b' Misbehavior:'
887 undeleting modified_untracked-wc
935 undeleting modified_untracked-wc
888 reverting modified_wc
936 reverting modified_wc
889 adding removed_clean
937 adding removed_clean
938 reverting removed_deleted
890 adding removed_removed
939 adding removed_removed
891 reverting removed_revert
940 reverting removed_revert
892 adding removed_untracked-clean
941 adding removed_untracked-clean
@@ -938,6 +987,8 b' revert all files individually and check '
938 ### revert for: added_clean
987 ### revert for: added_clean
939 no changes needed to added_clean
988 no changes needed to added_clean
940
989
990 ### revert for: added_deleted
991
941 ### revert for: added_removed
992 ### revert for: added_removed
942
993
943 ### revert for: added_revert
994 ### revert for: added_revert
@@ -953,6 +1004,8 b' revert all files individually and check '
953 ### revert for: clean_clean
1004 ### revert for: clean_clean
954 no changes needed to clean_clean
1005 no changes needed to clean_clean
955
1006
1007 ### revert for: clean_deleted
1008
956 ### revert for: clean_removed
1009 ### revert for: clean_removed
957
1010
958 ### revert for: clean_revert
1011 ### revert for: clean_revert
@@ -969,6 +1022,8 b' revert all files individually and check '
969 ### revert for: missing_clean
1022 ### revert for: missing_clean
970 missing_clean: no such file in rev * (glob)
1023 missing_clean: no such file in rev * (glob)
971
1024
1025 ### revert for: missing_deleted
1026
972 ### revert for: missing_removed
1027 ### revert for: missing_removed
973 missing_removed: no such file in rev * (glob)
1028 missing_removed: no such file in rev * (glob)
974
1029
@@ -989,6 +1044,8 b' revert all files individually and check '
989 ### revert for: modified_clean
1044 ### revert for: modified_clean
990 no changes needed to modified_clean
1045 no changes needed to modified_clean
991
1046
1047 ### revert for: modified_deleted
1048
992 ### revert for: modified_removed
1049 ### revert for: modified_removed
993
1050
994 ### revert for: modified_revert
1051 ### revert for: modified_revert
@@ -1004,6 +1061,8 b' revert all files individually and check '
1004 ### revert for: removed_clean
1061 ### revert for: removed_clean
1005 removed_clean: no such file in rev * (glob)
1062 removed_clean: no such file in rev * (glob)
1006
1063
1064 ### revert for: removed_deleted
1065
1007 ### revert for: removed_removed
1066 ### revert for: removed_removed
1008 removed_removed: no such file in rev * (glob)
1067 removed_removed: no such file in rev * (glob)
1009
1068
@@ -1061,6 +1120,8 b' Misbehavior:'
1061 > done
1120 > done
1062 ### revert for: added_clean
1121 ### revert for: added_clean
1063
1122
1123 ### revert for: added_deleted
1124
1064 ### revert for: added_removed
1125 ### revert for: added_removed
1065
1126
1066 ### revert for: added_revert
1127 ### revert for: added_revert
@@ -1075,6 +1136,8 b' Misbehavior:'
1075
1136
1076 ### revert for: clean_clean
1137 ### revert for: clean_clean
1077
1138
1139 ### revert for: clean_deleted
1140
1078 ### revert for: clean_removed
1141 ### revert for: clean_removed
1079
1142
1080 ### revert for: clean_revert
1143 ### revert for: clean_revert
@@ -1090,6 +1153,8 b' Misbehavior:'
1090 ### revert for: missing_clean
1153 ### revert for: missing_clean
1091 missing_clean: no such file in rev * (glob)
1154 missing_clean: no such file in rev * (glob)
1092
1155
1156 ### revert for: missing_deleted
1157
1093 ### revert for: missing_removed
1158 ### revert for: missing_removed
1094 missing_removed: no such file in rev * (glob)
1159 missing_removed: no such file in rev * (glob)
1095
1160
@@ -1109,6 +1174,8 b' Misbehavior:'
1109
1174
1110 ### revert for: modified_clean
1175 ### revert for: modified_clean
1111
1176
1177 ### revert for: modified_deleted
1178
1112 ### revert for: modified_removed
1179 ### revert for: modified_removed
1113
1180
1114 ### revert for: modified_revert
1181 ### revert for: modified_revert
@@ -1123,6 +1190,8 b' Misbehavior:'
1123
1190
1124 ### revert for: removed_clean
1191 ### revert for: removed_clean
1125
1192
1193 ### revert for: removed_deleted
1194
1126 ### revert for: removed_removed
1195 ### revert for: removed_removed
1127
1196
1128 ### revert for: removed_revert
1197 ### revert for: removed_revert
General Comments 0
You need to be logged in to leave comments. Login now