##// END OF EJS Templates
test-revert: add case with untracked files with unique content...
Pierre-Yves David -
r22143:ca278b89 default
parent child Browse files
Show More
@@ -461,6 +461,7 b' Write the python script to disk'
461 461 > # untracked-X is a version of X where the file is not tracked (? unknown)
462 462 > wccontent['untracked-clean'] = wccontent['clean']
463 463 > wccontent['untracked-revert'] = wccontent['revert']
464 > wccontent['untracked-wc'] = wccontent['wc']
464 465 >
465 466 > # build the combination of possible states
466 467 > combination = []
@@ -509,30 +510,35 b' check list of planned files'
509 510 added_revert
510 511 added_untracked-clean
511 512 added_untracked-revert
513 added_untracked-wc
512 514 added_wc
513 515 clean_clean
514 516 clean_removed
515 517 clean_revert
516 518 clean_untracked-clean
517 519 clean_untracked-revert
520 clean_untracked-wc
518 521 clean_wc
519 522 missing_clean
520 523 missing_removed
521 524 missing_revert
522 525 missing_untracked-clean
523 526 missing_untracked-revert
527 missing_untracked-wc
524 528 missing_wc
525 529 modified_clean
526 530 modified_removed
527 531 modified_revert
528 532 modified_untracked-clean
529 533 modified_untracked-revert
534 modified_untracked-wc
530 535 modified_wc
531 536 removed_clean
532 537 removed_removed
533 538 removed_revert
534 539 removed_untracked-clean
535 540 removed_untracked-revert
541 removed_untracked-wc
536 542 removed_wc
537 543
538 544 Script to make a simple text version of the content
@@ -565,18 +571,21 b' Generate base changeset'
565 571 adding clean_revert
566 572 adding clean_untracked-clean
567 573 adding clean_untracked-revert
574 adding clean_untracked-wc
568 575 adding clean_wc
569 576 adding modified_clean
570 577 adding modified_removed
571 578 adding modified_revert
572 579 adding modified_untracked-clean
573 580 adding modified_untracked-revert
581 adding modified_untracked-wc
574 582 adding modified_wc
575 583 adding removed_clean
576 584 adding removed_removed
577 585 adding removed_revert
578 586 adding removed_untracked-clean
579 587 adding removed_untracked-revert
588 adding removed_untracked-wc
580 589 adding removed_wc
581 590 $ hg status
582 591 A clean_clean
@@ -584,18 +593,21 b' Generate base changeset'
584 593 A clean_revert
585 594 A clean_untracked-clean
586 595 A clean_untracked-revert
596 A clean_untracked-wc
587 597 A clean_wc
588 598 A modified_clean
589 599 A modified_removed
590 600 A modified_revert
591 601 A modified_untracked-clean
592 602 A modified_untracked-revert
603 A modified_untracked-wc
593 604 A modified_wc
594 605 A removed_clean
595 606 A removed_removed
596 607 A removed_revert
597 608 A removed_untracked-clean
598 609 A removed_untracked-revert
610 A removed_untracked-wc
599 611 A removed_wc
600 612 $ hg commit -m 'base'
601 613
@@ -608,18 +620,21 b' Generate base changeset'
608 620 base clean_revert
609 621 base clean_untracked-clean
610 622 base clean_untracked-revert
623 base clean_untracked-wc
611 624 base clean_wc
612 625 base modified_clean
613 626 base modified_removed
614 627 base modified_revert
615 628 base modified_untracked-clean
616 629 base modified_untracked-revert
630 base modified_untracked-wc
617 631 base modified_wc
618 632 base removed_clean
619 633 base removed_removed
620 634 base removed_revert
621 635 base removed_untracked-clean
622 636 base removed_untracked-revert
637 base removed_untracked-wc
623 638 base removed_wc
624 639
625 640 Create parent changeset
@@ -631,12 +646,14 b' Create parent changeset'
631 646 adding added_revert
632 647 adding added_untracked-clean
633 648 adding added_untracked-revert
649 adding added_untracked-wc
634 650 adding added_wc
635 651 removing removed_clean
636 652 removing removed_removed
637 653 removing removed_revert
638 654 removing removed_untracked-clean
639 655 removing removed_untracked-revert
656 removing removed_untracked-wc
640 657 removing removed_wc
641 658 $ hg status
642 659 M modified_clean
@@ -644,18 +661,21 b' Create parent changeset'
644 661 M modified_revert
645 662 M modified_untracked-clean
646 663 M modified_untracked-revert
664 M modified_untracked-wc
647 665 M modified_wc
648 666 A added_clean
649 667 A added_removed
650 668 A added_revert
651 669 A added_untracked-clean
652 670 A added_untracked-revert
671 A added_untracked-wc
653 672 A added_wc
654 673 R removed_clean
655 674 R removed_removed
656 675 R removed_revert
657 676 R removed_untracked-clean
658 677 R removed_untracked-revert
678 R removed_untracked-wc
659 679 R removed_wc
660 680 $ hg commit -m 'parent'
661 681
@@ -668,18 +688,21 b' Create parent changeset'
668 688 parent added_revert
669 689 parent added_untracked-clean
670 690 parent added_untracked-revert
691 parent added_untracked-wc
671 692 parent added_wc
672 693 base clean_clean
673 694 base clean_removed
674 695 base clean_revert
675 696 base clean_untracked-clean
676 697 base clean_untracked-revert
698 base clean_untracked-wc
677 699 base clean_wc
678 700 parent modified_clean
679 701 parent modified_removed
680 702 parent modified_revert
681 703 parent modified_untracked-clean
682 704 parent modified_untracked-revert
705 parent modified_untracked-wc
683 706 parent modified_wc
684 707
685 708 Setup working directory
@@ -690,10 +713,12 b' Setup working directory'
690 713 removing added_revert
691 714 removing added_untracked-revert
692 715 removing clean_removed
716 adding missing_untracked-wc
693 717 adding missing_wc
694 718 removing modified_removed
695 719 adding removed_revert
696 720 adding removed_untracked-revert
721 adding removed_untracked-wc
697 722 adding removed_wc
698 723 $ hg forget *untracked*
699 724 $ hg status
@@ -708,13 +733,18 b' Setup working directory'
708 733 R added_revert
709 734 R added_untracked-clean
710 735 R added_untracked-revert
736 R added_untracked-wc
711 737 R clean_removed
712 738 R clean_untracked-clean
713 739 R clean_untracked-revert
740 R clean_untracked-wc
714 741 R modified_removed
715 742 R modified_untracked-clean
716 743 R modified_untracked-revert
744 R modified_untracked-wc
745 ? missing_untracked-wc
717 746 ? removed_untracked-revert
747 ? removed_untracked-wc
718 748
719 749 $ hg status --rev 'desc("base")'
720 750 M clean_wc
@@ -727,13 +757,17 b' Setup working directory'
727 757 R clean_removed
728 758 R clean_untracked-clean
729 759 R clean_untracked-revert
760 R clean_untracked-wc
730 761 R modified_removed
731 762 R modified_untracked-clean
732 763 R modified_untracked-revert
764 R modified_untracked-wc
733 765 R removed_clean
734 766 R removed_removed
735 767 R removed_untracked-clean
736 768 R removed_untracked-revert
769 R removed_untracked-wc
770 ? missing_untracked-wc
737 771
738 772 (create a simple text version of the content)
739 773
@@ -741,20 +775,25 b' Setup working directory'
741 775 $ cat ../content-wc.txt
742 776 parent added_clean
743 777 parent added_untracked-clean
778 wc added_untracked-wc
744 779 wc added_wc
745 780 base clean_clean
746 781 base clean_revert
747 782 base clean_untracked-clean
748 783 base clean_untracked-revert
784 wc clean_untracked-wc
749 785 wc clean_wc
786 wc missing_untracked-wc
750 787 wc missing_wc
751 788 parent modified_clean
752 789 base modified_revert
753 790 parent modified_untracked-clean
754 791 base modified_untracked-revert
792 wc modified_untracked-wc
755 793 wc modified_wc
756 794 base removed_revert
757 795 base removed_untracked-revert
796 wc removed_untracked-wc
758 797 wc removed_wc
759 798
760 799 $ cd ..
@@ -774,16 +813,19 b' check revert output'
774 813 undeleting added_revert
775 814 undeleting added_untracked-clean
776 815 undeleting added_untracked-revert
816 undeleting added_untracked-wc
777 817 reverting added_wc
778 818 undeleting clean_removed
779 819 undeleting clean_untracked-clean
780 820 undeleting clean_untracked-revert
821 undeleting clean_untracked-wc
781 822 reverting clean_wc
782 823 forgetting missing_wc
783 824 undeleting modified_removed
784 825 reverting modified_revert
785 826 undeleting modified_untracked-clean
786 827 undeleting modified_untracked-revert
828 undeleting modified_untracked-wc
787 829 reverting modified_wc
788 830 forgetting removed_revert
789 831 forgetting removed_wc
@@ -796,14 +838,19 b' additional `.orig` backup file when appl'
796 838 $ python ../dircontent.py > ../content-parent-all.txt
797 839 $ cd ..
798 840 $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _
841 +wc added_untracked-wc.orig
799 842 +wc added_wc.orig
843 +wc clean_untracked-wc.orig
800 844 +wc clean_wc.orig
845 +wc missing_untracked-wc
801 846 +wc missing_wc
802 847 +base modified_revert.orig
803 848 +base modified_untracked-revert.orig
849 +wc modified_untracked-wc.orig
804 850 +wc modified_wc.orig
805 851 +base removed_revert
806 852 +base removed_untracked-revert
853 +wc removed_untracked-wc
807 854 +wc removed_wc
808 855
809 856 Test revert --all to "base" content
@@ -829,6 +876,7 b' Misbehavior:'
829 876 undeleting clean_removed
830 877 undeleting clean_untracked-clean
831 878 undeleting clean_untracked-revert
879 undeleting clean_untracked-wc
832 880 reverting clean_wc
833 881 forgetting missing_wc
834 882 reverting modified_clean
@@ -836,12 +884,14 b' Misbehavior:'
836 884 reverting modified_revert
837 885 undeleting modified_untracked-clean
838 886 undeleting modified_untracked-revert
887 undeleting modified_untracked-wc
839 888 reverting modified_wc
840 889 adding removed_clean
841 890 adding removed_removed
842 891 reverting removed_revert
843 892 adding removed_untracked-clean
844 893 adding removed_untracked-revert
894 adding removed_untracked-wc
845 895 reverting removed_wc
846 896
847 897 Compare resulting directory with revert target.
@@ -858,10 +908,15 b' Misbehavior:'
858 908 $ cd ..
859 909 $ diff -U 0 -- content-base.txt content-base-all.txt | grep _
860 910 +parent added_untracked-clean
911 +wc added_untracked-wc
912 +wc clean_untracked-wc.orig
861 913 +wc clean_wc.orig
914 +wc missing_untracked-wc
862 915 +wc missing_wc
863 916 +parent modified_untracked-clean.orig
917 +wc modified_untracked-wc.orig
864 918 +wc modified_wc.orig
919 +wc removed_untracked-wc.orig
865 920 +wc removed_wc.orig
866 921
867 922 Test revert to parent content with explicit file name
@@ -891,6 +946,8 b' revert all files individually and check '
891 946
892 947 ### revert for: added_untracked-revert
893 948
949 ### revert for: added_untracked-wc
950
894 951 ### revert for: added_wc
895 952
896 953 ### revert for: clean_clean
@@ -905,6 +962,8 b' revert all files individually and check '
905 962
906 963 ### revert for: clean_untracked-revert
907 964
965 ### revert for: clean_untracked-wc
966
908 967 ### revert for: clean_wc
909 968
910 969 ### revert for: missing_clean
@@ -922,6 +981,9 b' revert all files individually and check '
922 981 ### revert for: missing_untracked-revert
923 982 missing_untracked-revert: no such file in rev * (glob)
924 983
984 ### revert for: missing_untracked-wc
985 file not managed: missing_untracked-wc
986
925 987 ### revert for: missing_wc
926 988
927 989 ### revert for: modified_clean
@@ -935,6 +997,8 b' revert all files individually and check '
935 997
936 998 ### revert for: modified_untracked-revert
937 999
1000 ### revert for: modified_untracked-wc
1001
938 1002 ### revert for: modified_wc
939 1003
940 1004 ### revert for: removed_clean
@@ -951,6 +1015,9 b' revert all files individually and check '
951 1015 ### revert for: removed_untracked-revert
952 1016 file not managed: removed_untracked-revert
953 1017
1018 ### revert for: removed_untracked-wc
1019 file not managed: removed_untracked-wc
1020
954 1021 ### revert for: removed_wc
955 1022
956 1023
@@ -985,6 +1052,7 b' Misbehavior:'
985 1052 | - added_removed
986 1053 | - added_untracked-clean
987 1054 | - added_untracked-revert
1055 | - added_untracked-wc
988 1056
989 1057 $ for file in `python ../gen-revert-cases.py filelist`; do
990 1058 > echo '### revert for:' $file;
@@ -1001,6 +1069,8 b' Misbehavior:'
1001 1069
1002 1070 ### revert for: added_untracked-revert
1003 1071
1072 ### revert for: added_untracked-wc
1073
1004 1074 ### revert for: added_wc
1005 1075
1006 1076 ### revert for: clean_clean
@@ -1013,6 +1083,8 b' Misbehavior:'
1013 1083
1014 1084 ### revert for: clean_untracked-revert
1015 1085
1086 ### revert for: clean_untracked-wc
1087
1016 1088 ### revert for: clean_wc
1017 1089
1018 1090 ### revert for: missing_clean
@@ -1030,6 +1102,9 b' Misbehavior:'
1030 1102 ### revert for: missing_untracked-revert
1031 1103 missing_untracked-revert: no such file in rev * (glob)
1032 1104
1105 ### revert for: missing_untracked-wc
1106 file not managed: missing_untracked-wc
1107
1033 1108 ### revert for: missing_wc
1034 1109
1035 1110 ### revert for: modified_clean
@@ -1042,6 +1117,8 b' Misbehavior:'
1042 1117
1043 1118 ### revert for: modified_untracked-revert
1044 1119
1120 ### revert for: modified_untracked-wc
1121
1045 1122 ### revert for: modified_wc
1046 1123
1047 1124 ### revert for: removed_clean
@@ -1054,6 +1131,8 b' Misbehavior:'
1054 1131
1055 1132 ### revert for: removed_untracked-revert
1056 1133
1134 ### revert for: removed_untracked-wc
1135
1057 1136 ### revert for: removed_wc
1058 1137
1059 1138
General Comments 0
You need to be logged in to leave comments. Login now