Show More
@@ -451,6 +451,8 b' Write the python script to disk' | |||||
451 | > wccontent = { |
|
451 | > wccontent = { | |
452 | > # clean: wc content is the same as parent |
|
452 | > # clean: wc content is the same as parent | |
453 | > 'clean': lambda cc: cc[1], |
|
453 | > 'clean': lambda cc: cc[1], | |
|
454 | > # revert: wc content is the same as base | |||
|
455 | > 'revert': lambda cc: cc[0], | |||
454 | > } |
|
456 | > } | |
455 | > |
|
457 | > | |
456 | > # build the combination of possible states |
|
458 | > # build the combination of possible states | |
@@ -496,10 +498,15 b' check list of planned files' | |||||
496 |
|
498 | |||
497 | $ python gen-revert-cases.py filelist |
|
499 | $ python gen-revert-cases.py filelist | |
498 | added_clean |
|
500 | added_clean | |
|
501 | added_revert | |||
499 | clean_clean |
|
502 | clean_clean | |
|
503 | clean_revert | |||
500 | missing_clean |
|
504 | missing_clean | |
|
505 | missing_revert | |||
501 | modified_clean |
|
506 | modified_clean | |
|
507 | modified_revert | |||
502 | removed_clean |
|
508 | removed_clean | |
|
509 | removed_revert | |||
503 |
|
510 | |||
504 | Script to make a simple text version of the content |
|
511 | Script to make a simple text version of the content | |
505 | --------------------------------------------------- |
|
512 | --------------------------------------------------- | |
@@ -527,12 +534,18 b' Generate base changeset' | |||||
527 | $ python ../gen-revert-cases.py base |
|
534 | $ python ../gen-revert-cases.py base | |
528 | $ hg addremove --similarity 0 |
|
535 | $ hg addremove --similarity 0 | |
529 | adding clean_clean |
|
536 | adding clean_clean | |
|
537 | adding clean_revert | |||
530 | adding modified_clean |
|
538 | adding modified_clean | |
|
539 | adding modified_revert | |||
531 | adding removed_clean |
|
540 | adding removed_clean | |
|
541 | adding removed_revert | |||
532 | $ hg status |
|
542 | $ hg status | |
533 | A clean_clean |
|
543 | A clean_clean | |
|
544 | A clean_revert | |||
534 | A modified_clean |
|
545 | A modified_clean | |
|
546 | A modified_revert | |||
535 | A removed_clean |
|
547 | A removed_clean | |
|
548 | A removed_revert | |||
536 | $ hg commit -m 'base' |
|
549 | $ hg commit -m 'base' | |
537 |
|
550 | |||
538 | (create a simple text version of the content) |
|
551 | (create a simple text version of the content) | |
@@ -540,19 +553,27 b' Generate base changeset' | |||||
540 | $ python ../dircontent.py > ../content-base.txt |
|
553 | $ python ../dircontent.py > ../content-base.txt | |
541 | $ cat ../content-base.txt |
|
554 | $ cat ../content-base.txt | |
542 | base clean_clean |
|
555 | base clean_clean | |
|
556 | base clean_revert | |||
543 | base modified_clean |
|
557 | base modified_clean | |
|
558 | base modified_revert | |||
544 | base removed_clean |
|
559 | base removed_clean | |
|
560 | base removed_revert | |||
545 |
|
561 | |||
546 | Create parent changeset |
|
562 | Create parent changeset | |
547 |
|
563 | |||
548 | $ python ../gen-revert-cases.py parent |
|
564 | $ python ../gen-revert-cases.py parent | |
549 | $ hg addremove --similarity 0 |
|
565 | $ hg addremove --similarity 0 | |
550 | adding added_clean |
|
566 | adding added_clean | |
|
567 | adding added_revert | |||
551 | removing removed_clean |
|
568 | removing removed_clean | |
|
569 | removing removed_revert | |||
552 | $ hg status |
|
570 | $ hg status | |
553 | M modified_clean |
|
571 | M modified_clean | |
|
572 | M modified_revert | |||
554 | A added_clean |
|
573 | A added_clean | |
|
574 | A added_revert | |||
555 | R removed_clean |
|
575 | R removed_clean | |
|
576 | R removed_revert | |||
556 | $ hg commit -m 'parent' |
|
577 | $ hg commit -m 'parent' | |
557 |
|
578 | |||
558 | (create a simple text version of the content) |
|
579 | (create a simple text version of the content) | |
@@ -560,14 +581,22 b' Create parent changeset' | |||||
560 | $ python ../dircontent.py > ../content-parent.txt |
|
581 | $ python ../dircontent.py > ../content-parent.txt | |
561 | $ cat ../content-parent.txt |
|
582 | $ cat ../content-parent.txt | |
562 | parent added_clean |
|
583 | parent added_clean | |
|
584 | parent added_revert | |||
563 | base clean_clean |
|
585 | base clean_clean | |
|
586 | base clean_revert | |||
564 | parent modified_clean |
|
587 | parent modified_clean | |
|
588 | parent modified_revert | |||
565 |
|
589 | |||
566 | Setup working directory |
|
590 | Setup working directory | |
567 |
|
591 | |||
568 | $ python ../gen-revert-cases.py wc | cat |
|
592 | $ python ../gen-revert-cases.py wc | cat | |
569 | $ hg addremove --similarity 0 |
|
593 | $ hg addremove --similarity 0 | |
|
594 | removing added_revert | |||
|
595 | adding removed_revert | |||
570 | $ hg status |
|
596 | $ hg status | |
|
597 | M modified_revert | |||
|
598 | A removed_revert | |||
|
599 | R added_revert | |||
571 |
|
600 | |||
572 | $ hg status --rev 'desc("base")' |
|
601 | $ hg status --rev 'desc("base")' | |
573 | M modified_clean |
|
602 | M modified_clean | |
@@ -580,7 +609,10 b' Setup working directory' | |||||
580 | $ cat ../content-wc.txt |
|
609 | $ cat ../content-wc.txt | |
581 | parent added_clean |
|
610 | parent added_clean | |
582 | base clean_clean |
|
611 | base clean_clean | |
|
612 | base clean_revert | |||
583 | parent modified_clean |
|
613 | parent modified_clean | |
|
614 | base modified_revert | |||
|
615 | base removed_revert | |||
584 |
|
616 | |||
585 | $ cd .. |
|
617 | $ cd .. | |
586 |
|
618 | |||
@@ -595,6 +627,9 b' Test revert --all to parent content' | |||||
595 | check revert output |
|
627 | check revert output | |
596 |
|
628 | |||
597 | $ hg revert --all |
|
629 | $ hg revert --all | |
|
630 | undeleting added_revert | |||
|
631 | reverting modified_revert | |||
|
632 | forgetting removed_revert | |||
598 |
|
633 | |||
599 | Compare resulting directory with revert target. |
|
634 | Compare resulting directory with revert target. | |
600 |
|
635 | |||
@@ -604,7 +639,8 b' additional `.orig` backup file when appl' | |||||
604 | $ python ../dircontent.py > ../content-parent-all.txt |
|
639 | $ python ../dircontent.py > ../content-parent-all.txt | |
605 | $ cd .. |
|
640 | $ cd .. | |
606 | $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _ |
|
641 | $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _ | |
607 | [1] |
|
642 | +base modified_revert.orig | |
|
643 | +base removed_revert | |||
608 |
|
644 | |||
609 | Test revert --all to "base" content |
|
645 | Test revert --all to "base" content | |
610 | ----------------------------------- |
|
646 | ----------------------------------- | |
@@ -616,10 +652,19 b' Test revert --all to "base" content' | |||||
616 |
|
652 | |||
617 | check revert output |
|
653 | check revert output | |
618 |
|
654 | |||
|
655 | Misbehavior: | |||
|
656 | ||||
|
657 | - report "reverting" when file needs no changes | |||
|
658 | | | |||
|
659 | | - reverting modified_revert | |||
|
660 | | - reverting removed_revert | |||
|
661 | ||||
619 | $ hg revert --all --rev 'desc(base)' |
|
662 | $ hg revert --all --rev 'desc(base)' | |
620 | removing added_clean |
|
663 | removing added_clean | |
621 | reverting modified_clean |
|
664 | reverting modified_clean | |
|
665 | reverting modified_revert | |||
622 | adding removed_clean |
|
666 | adding removed_clean | |
|
667 | reverting removed_revert | |||
623 |
|
668 | |||
624 | Compare resulting directory with revert target. |
|
669 | Compare resulting directory with revert target. | |
625 |
|
670 | |||
@@ -650,18 +695,30 b' revert all files individually and check ' | |||||
650 | ### revert for: added_clean |
|
695 | ### revert for: added_clean | |
651 | no changes needed to added_clean |
|
696 | no changes needed to added_clean | |
652 |
|
697 | |||
|
698 | ### revert for: added_revert | |||
|
699 | ||||
653 | ### revert for: clean_clean |
|
700 | ### revert for: clean_clean | |
654 | no changes needed to clean_clean |
|
701 | no changes needed to clean_clean | |
655 |
|
702 | |||
|
703 | ### revert for: clean_revert | |||
|
704 | no changes needed to clean_revert | |||
|
705 | ||||
656 | ### revert for: missing_clean |
|
706 | ### revert for: missing_clean | |
657 | missing_clean: no such file in rev * (glob) |
|
707 | missing_clean: no such file in rev * (glob) | |
658 |
|
708 | |||
|
709 | ### revert for: missing_revert | |||
|
710 | missing_revert: no such file in rev * (glob) | |||
|
711 | ||||
659 | ### revert for: modified_clean |
|
712 | ### revert for: modified_clean | |
660 | no changes needed to modified_clean |
|
713 | no changes needed to modified_clean | |
661 |
|
714 | |||
|
715 | ### revert for: modified_revert | |||
|
716 | ||||
662 | ### revert for: removed_clean |
|
717 | ### revert for: removed_clean | |
663 | removed_clean: no such file in rev * (glob) |
|
718 | removed_clean: no such file in rev * (glob) | |
664 |
|
719 | |||
|
720 | ### revert for: removed_revert | |||
|
721 | ||||
665 |
|
722 | |||
666 | check resulting directory againt the --all run |
|
723 | check resulting directory againt the --all run | |
667 | (There should be no difference) |
|
724 | (There should be no difference) | |
@@ -687,6 +744,10 b' Misbehavior:' | |||||
687 | - fails to report no change to revert for |
|
744 | - fails to report no change to revert for | |
688 | | |
|
745 | | | |
689 | | - clean_clean |
|
746 | | - clean_clean | |
|
747 | | - added_revert | |||
|
748 | | - clean_revert | |||
|
749 | | - modified_revert | |||
|
750 | | - removed_revert | |||
690 |
|
751 | |||
691 | $ for file in `python ../gen-revert-cases.py filelist`; do |
|
752 | $ for file in `python ../gen-revert-cases.py filelist`; do | |
692 | > echo '### revert for:' $file; |
|
753 | > echo '### revert for:' $file; | |
@@ -695,15 +756,26 b' Misbehavior:' | |||||
695 | > done |
|
756 | > done | |
696 | ### revert for: added_clean |
|
757 | ### revert for: added_clean | |
697 |
|
758 | |||
|
759 | ### revert for: added_revert | |||
|
760 | ||||
698 | ### revert for: clean_clean |
|
761 | ### revert for: clean_clean | |
699 |
|
762 | |||
|
763 | ### revert for: clean_revert | |||
|
764 | ||||
700 | ### revert for: missing_clean |
|
765 | ### revert for: missing_clean | |
701 | missing_clean: no such file in rev * (glob) |
|
766 | missing_clean: no such file in rev * (glob) | |
702 |
|
767 | |||
|
768 | ### revert for: missing_revert | |||
|
769 | missing_revert: no such file in rev * (glob) | |||
|
770 | ||||
703 | ### revert for: modified_clean |
|
771 | ### revert for: modified_clean | |
704 |
|
772 | |||
|
773 | ### revert for: modified_revert | |||
|
774 | ||||
705 | ### revert for: removed_clean |
|
775 | ### revert for: removed_clean | |
706 |
|
776 | |||
|
777 | ### revert for: removed_revert | |||
|
778 | ||||
707 |
|
779 | |||
708 | check resulting directory againt the --all run |
|
780 | check resulting directory againt the --all run | |
709 | (There should be no difference) |
|
781 | (There should be no difference) |
General Comments 0
You need to be logged in to leave comments.
Login now