Mercurial > hg
comparison tests/test-revert.t @ 23155:25e12d496429
test-revert: removing a missing file has no effect
The tests for removed_deleted and removed_removed test the same state
as removed_clean and removed_untracked-clean, respectively. Drop the
duplicate tests.
See additional motivation in earlier patch.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 16 Oct 2014 23:59:08 -0700 |
parents | 690db7415e23 |
children | e630c176ceda |
comparison
equal
deleted
inserted
replaced
23154:690db7415e23 | 23155:25e12d496429 |
---|---|
470 > for wckey in wccontent: | 470 > for wckey in wccontent: |
471 > if (ctxvalue[0] == ctxvalue[1] and 'revert' in wckey): | 471 > if (ctxvalue[0] == ctxvalue[1] and 'revert' in wckey): |
472 > continue | 472 > continue |
473 > if not ctxvalue[0] and 'revert' in wckey: | 473 > if not ctxvalue[0] and 'revert' in wckey: |
474 > continue | 474 > continue |
475 > if not ctxvalue[1] and ('removed' in wckey or 'deleted' in wckey): | |
476 > continue | |
475 > filename = "%s_%s" % (ctxkey, wckey) | 477 > filename = "%s_%s" % (ctxkey, wckey) |
476 > combination.append((filename, ctxkey, wckey)) | 478 > combination.append((filename, ctxkey, wckey)) |
477 > | 479 > |
478 > # make sure we have stable output | 480 > # make sure we have stable output |
479 > combination.sort() | 481 > combination.sort() |
521 clean_removed | 523 clean_removed |
522 clean_untracked-clean | 524 clean_untracked-clean |
523 clean_untracked-wc | 525 clean_untracked-wc |
524 clean_wc | 526 clean_wc |
525 missing_clean | 527 missing_clean |
526 missing_deleted | |
527 missing_removed | |
528 missing_untracked-clean | 528 missing_untracked-clean |
529 missing_untracked-wc | 529 missing_untracked-wc |
530 missing_wc | 530 missing_wc |
531 modified_clean | 531 modified_clean |
532 modified_deleted | 532 modified_deleted |
535 modified_untracked-clean | 535 modified_untracked-clean |
536 modified_untracked-revert | 536 modified_untracked-revert |
537 modified_untracked-wc | 537 modified_untracked-wc |
538 modified_wc | 538 modified_wc |
539 removed_clean | 539 removed_clean |
540 removed_deleted | |
541 removed_removed | |
542 removed_revert | 540 removed_revert |
543 removed_untracked-clean | 541 removed_untracked-clean |
544 removed_untracked-revert | 542 removed_untracked-revert |
545 removed_untracked-wc | 543 removed_untracked-wc |
546 removed_wc | 544 removed_wc |
583 adding modified_untracked-clean | 581 adding modified_untracked-clean |
584 adding modified_untracked-revert | 582 adding modified_untracked-revert |
585 adding modified_untracked-wc | 583 adding modified_untracked-wc |
586 adding modified_wc | 584 adding modified_wc |
587 adding removed_clean | 585 adding removed_clean |
588 adding removed_deleted | |
589 adding removed_removed | |
590 adding removed_revert | 586 adding removed_revert |
591 adding removed_untracked-clean | 587 adding removed_untracked-clean |
592 adding removed_untracked-revert | 588 adding removed_untracked-revert |
593 adding removed_untracked-wc | 589 adding removed_untracked-wc |
594 adding removed_wc | 590 adding removed_wc |
606 A modified_untracked-clean | 602 A modified_untracked-clean |
607 A modified_untracked-revert | 603 A modified_untracked-revert |
608 A modified_untracked-wc | 604 A modified_untracked-wc |
609 A modified_wc | 605 A modified_wc |
610 A removed_clean | 606 A removed_clean |
611 A removed_deleted | |
612 A removed_removed | |
613 A removed_revert | 607 A removed_revert |
614 A removed_untracked-clean | 608 A removed_untracked-clean |
615 A removed_untracked-revert | 609 A removed_untracked-revert |
616 A removed_untracked-wc | 610 A removed_untracked-wc |
617 A removed_wc | 611 A removed_wc |
634 base modified_untracked-clean | 628 base modified_untracked-clean |
635 base modified_untracked-revert | 629 base modified_untracked-revert |
636 base modified_untracked-wc | 630 base modified_untracked-wc |
637 base modified_wc | 631 base modified_wc |
638 base removed_clean | 632 base removed_clean |
639 base removed_deleted | |
640 base removed_removed | |
641 base removed_revert | 633 base removed_revert |
642 base removed_untracked-clean | 634 base removed_untracked-clean |
643 base removed_untracked-revert | 635 base removed_untracked-revert |
644 base removed_untracked-wc | 636 base removed_untracked-wc |
645 base removed_wc | 637 base removed_wc |
653 adding added_removed | 645 adding added_removed |
654 adding added_untracked-clean | 646 adding added_untracked-clean |
655 adding added_untracked-wc | 647 adding added_untracked-wc |
656 adding added_wc | 648 adding added_wc |
657 removing removed_clean | 649 removing removed_clean |
658 removing removed_deleted | |
659 removing removed_removed | |
660 removing removed_revert | 650 removing removed_revert |
661 removing removed_untracked-clean | 651 removing removed_untracked-clean |
662 removing removed_untracked-revert | 652 removing removed_untracked-revert |
663 removing removed_untracked-wc | 653 removing removed_untracked-wc |
664 removing removed_wc | 654 removing removed_wc |
676 A added_removed | 666 A added_removed |
677 A added_untracked-clean | 667 A added_untracked-clean |
678 A added_untracked-wc | 668 A added_untracked-wc |
679 A added_wc | 669 A added_wc |
680 R removed_clean | 670 R removed_clean |
681 R removed_deleted | |
682 R removed_removed | |
683 R removed_revert | 671 R removed_revert |
684 R removed_untracked-clean | 672 R removed_untracked-clean |
685 R removed_untracked-revert | 673 R removed_untracked-revert |
686 R removed_untracked-wc | 674 R removed_untracked-wc |
687 R removed_wc | 675 R removed_wc |
716 | 704 |
717 $ python ../gen-revert-cases.py wc | 705 $ python ../gen-revert-cases.py wc |
718 $ hg addremove --similarity 0 | 706 $ hg addremove --similarity 0 |
719 removing added_removed | 707 removing added_removed |
720 removing clean_removed | 708 removing clean_removed |
721 adding missing_deleted | |
722 adding missing_untracked-wc | 709 adding missing_untracked-wc |
723 adding missing_wc | 710 adding missing_wc |
724 removing modified_removed | 711 removing modified_removed |
725 adding removed_deleted | |
726 adding removed_revert | 712 adding removed_revert |
727 adding removed_untracked-revert | 713 adding removed_untracked-revert |
728 adding removed_untracked-wc | 714 adding removed_untracked-wc |
729 adding removed_wc | 715 adding removed_wc |
730 $ hg forget *untracked* | 716 $ hg forget *untracked* |
747 R modified_untracked-clean | 733 R modified_untracked-clean |
748 R modified_untracked-revert | 734 R modified_untracked-revert |
749 R modified_untracked-wc | 735 R modified_untracked-wc |
750 ! added_deleted | 736 ! added_deleted |
751 ! clean_deleted | 737 ! clean_deleted |
752 ! missing_deleted | |
753 ! modified_deleted | 738 ! modified_deleted |
754 ! removed_deleted | |
755 ? missing_untracked-wc | 739 ? missing_untracked-wc |
756 ? removed_untracked-revert | 740 ? removed_untracked-revert |
757 ? removed_untracked-wc | 741 ? removed_untracked-wc |
758 | 742 |
759 $ hg status --rev 'desc("base")' | 743 $ hg status --rev 'desc("base")' |
770 R modified_removed | 754 R modified_removed |
771 R modified_untracked-clean | 755 R modified_untracked-clean |
772 R modified_untracked-revert | 756 R modified_untracked-revert |
773 R modified_untracked-wc | 757 R modified_untracked-wc |
774 R removed_clean | 758 R removed_clean |
775 R removed_deleted | |
776 R removed_removed | |
777 R removed_untracked-clean | 759 R removed_untracked-clean |
778 R removed_untracked-revert | 760 R removed_untracked-revert |
779 R removed_untracked-wc | 761 R removed_untracked-wc |
780 ! added_deleted | 762 ! added_deleted |
781 ! clean_deleted | 763 ! clean_deleted |
782 ! missing_deleted | |
783 ! modified_deleted | 764 ! modified_deleted |
784 ! removed_deleted | |
785 ? missing_untracked-wc | 765 ? missing_untracked-wc |
786 | 766 |
787 (create a simple text version of the content) | 767 (create a simple text version of the content) |
788 | 768 |
789 $ python ../dircontent.py > ../content-wc.txt | 769 $ python ../dircontent.py > ../content-wc.txt |
830 reverting clean_deleted | 810 reverting clean_deleted |
831 undeleting clean_removed | 811 undeleting clean_removed |
832 undeleting clean_untracked-clean | 812 undeleting clean_untracked-clean |
833 undeleting clean_untracked-wc | 813 undeleting clean_untracked-wc |
834 reverting clean_wc | 814 reverting clean_wc |
835 forgetting missing_deleted | |
836 forgetting missing_wc | 815 forgetting missing_wc |
837 reverting modified_deleted | 816 reverting modified_deleted |
838 undeleting modified_removed | 817 undeleting modified_removed |
839 reverting modified_revert | 818 reverting modified_revert |
840 undeleting modified_untracked-clean | 819 undeleting modified_untracked-clean |
841 undeleting modified_untracked-revert | 820 undeleting modified_untracked-revert |
842 undeleting modified_untracked-wc | 821 undeleting modified_untracked-wc |
843 reverting modified_wc | 822 reverting modified_wc |
844 forgetting removed_deleted | |
845 forgetting removed_revert | 823 forgetting removed_revert |
846 forgetting removed_wc | 824 forgetting removed_wc |
847 | 825 |
848 Compare resulting directory with revert target. | 826 Compare resulting directory with revert target. |
849 | 827 |
885 reverting clean_deleted | 863 reverting clean_deleted |
886 undeleting clean_removed | 864 undeleting clean_removed |
887 undeleting clean_untracked-clean | 865 undeleting clean_untracked-clean |
888 undeleting clean_untracked-wc | 866 undeleting clean_untracked-wc |
889 reverting clean_wc | 867 reverting clean_wc |
890 forgetting missing_deleted | |
891 forgetting missing_wc | 868 forgetting missing_wc |
892 reverting modified_clean | 869 reverting modified_clean |
893 reverting modified_deleted | 870 reverting modified_deleted |
894 undeleting modified_removed | 871 undeleting modified_removed |
895 undeleting modified_untracked-clean | 872 undeleting modified_untracked-clean |
896 undeleting modified_untracked-revert | 873 undeleting modified_untracked-revert |
897 undeleting modified_untracked-wc | 874 undeleting modified_untracked-wc |
898 reverting modified_wc | 875 reverting modified_wc |
899 adding removed_clean | 876 adding removed_clean |
900 reverting removed_deleted | |
901 adding removed_removed | |
902 adding removed_untracked-clean | 877 adding removed_untracked-clean |
903 adding removed_untracked-revert | 878 adding removed_untracked-revert |
904 adding removed_untracked-wc | 879 adding removed_untracked-wc |
905 reverting removed_wc | 880 reverting removed_wc |
906 | 881 |
968 ### revert for: clean_wc | 943 ### revert for: clean_wc |
969 | 944 |
970 ### revert for: missing_clean | 945 ### revert for: missing_clean |
971 missing_clean: no such file in rev * (glob) | 946 missing_clean: no such file in rev * (glob) |
972 | 947 |
973 ### revert for: missing_deleted | |
974 | |
975 ### revert for: missing_removed | |
976 missing_removed: no such file in rev * (glob) | |
977 | |
978 ### revert for: missing_untracked-clean | 948 ### revert for: missing_untracked-clean |
979 missing_untracked-clean: no such file in rev * (glob) | 949 missing_untracked-clean: no such file in rev * (glob) |
980 | 950 |
981 ### revert for: missing_untracked-wc | 951 ### revert for: missing_untracked-wc |
982 file not managed: missing_untracked-wc | 952 file not managed: missing_untracked-wc |
1000 | 970 |
1001 ### revert for: modified_wc | 971 ### revert for: modified_wc |
1002 | 972 |
1003 ### revert for: removed_clean | 973 ### revert for: removed_clean |
1004 removed_clean: no such file in rev * (glob) | 974 removed_clean: no such file in rev * (glob) |
1005 | |
1006 ### revert for: removed_deleted | |
1007 | |
1008 ### revert for: removed_removed | |
1009 removed_removed: no such file in rev * (glob) | |
1010 | 975 |
1011 ### revert for: removed_revert | 976 ### revert for: removed_revert |
1012 | 977 |
1013 ### revert for: removed_untracked-clean | 978 ### revert for: removed_untracked-clean |
1014 removed_untracked-clean: no such file in rev * (glob) | 979 removed_untracked-clean: no such file in rev * (glob) |
1075 ### revert for: clean_wc | 1040 ### revert for: clean_wc |
1076 | 1041 |
1077 ### revert for: missing_clean | 1042 ### revert for: missing_clean |
1078 missing_clean: no such file in rev * (glob) | 1043 missing_clean: no such file in rev * (glob) |
1079 | 1044 |
1080 ### revert for: missing_deleted | |
1081 | |
1082 ### revert for: missing_removed | |
1083 missing_removed: no such file in rev * (glob) | |
1084 | |
1085 ### revert for: missing_untracked-clean | 1045 ### revert for: missing_untracked-clean |
1086 missing_untracked-clean: no such file in rev * (glob) | 1046 missing_untracked-clean: no such file in rev * (glob) |
1087 | 1047 |
1088 ### revert for: missing_untracked-wc | 1048 ### revert for: missing_untracked-wc |
1089 file not managed: missing_untracked-wc | 1049 file not managed: missing_untracked-wc |
1106 ### revert for: modified_untracked-wc | 1066 ### revert for: modified_untracked-wc |
1107 | 1067 |
1108 ### revert for: modified_wc | 1068 ### revert for: modified_wc |
1109 | 1069 |
1110 ### revert for: removed_clean | 1070 ### revert for: removed_clean |
1111 | |
1112 ### revert for: removed_deleted | |
1113 | |
1114 ### revert for: removed_removed | |
1115 | 1071 |
1116 ### revert for: removed_revert | 1072 ### revert for: removed_revert |
1117 no changes needed to removed_revert | 1073 no changes needed to removed_revert |
1118 | 1074 |
1119 ### revert for: removed_untracked-clean | 1075 ### revert for: removed_untracked-clean |