equal
deleted
inserted
replaced
439 > 'clean': ['base', 'base'], |
439 > 'clean': ['base', 'base'], |
440 > # modified: file content change from base to parent |
440 > # modified: file content change from base to parent |
441 > 'modified': ['base', 'parent'], |
441 > 'modified': ['base', 'parent'], |
442 > # added: file is missing from base and added in parent |
442 > # added: file is missing from base and added in parent |
443 > 'added': [None, 'parent'], |
443 > 'added': [None, 'parent'], |
|
444 > # removed: file exist in base but is removed from parent |
|
445 > 'removed': ['base', None], |
444 > } |
446 > } |
445 > |
447 > |
446 > # content of file in working copy |
448 > # content of file in working copy |
447 > wccontent = { |
449 > wccontent = { |
448 > # clean: wc content is the same as parent |
450 > # clean: wc content is the same as parent |
492 |
494 |
493 $ python gen-revert-cases.py filelist |
495 $ python gen-revert-cases.py filelist |
494 added_clean |
496 added_clean |
495 clean_clean |
497 clean_clean |
496 modified_clean |
498 modified_clean |
|
499 removed_clean |
497 |
500 |
498 Script to make a simple text version of the content |
501 Script to make a simple text version of the content |
499 --------------------------------------------------- |
502 --------------------------------------------------- |
500 |
503 |
501 $ cat << EOF >> dircontent.py |
504 $ cat << EOF >> dircontent.py |
520 |
523 |
521 $ python ../gen-revert-cases.py base |
524 $ python ../gen-revert-cases.py base |
522 $ hg addremove --similarity 0 |
525 $ hg addremove --similarity 0 |
523 adding clean_clean |
526 adding clean_clean |
524 adding modified_clean |
527 adding modified_clean |
|
528 adding removed_clean |
525 $ hg status |
529 $ hg status |
526 A clean_clean |
530 A clean_clean |
527 A modified_clean |
531 A modified_clean |
|
532 A removed_clean |
528 $ hg commit -m 'base' |
533 $ hg commit -m 'base' |
529 |
534 |
530 (create a simple text version of the content) |
535 (create a simple text version of the content) |
531 |
536 |
532 $ python ../dircontent.py > ../content-base.txt |
537 $ python ../dircontent.py > ../content-base.txt |
533 $ cat ../content-base.txt |
538 $ cat ../content-base.txt |
534 base clean_clean |
539 base clean_clean |
535 base modified_clean |
540 base modified_clean |
|
541 base removed_clean |
536 |
542 |
537 Create parent changeset |
543 Create parent changeset |
538 |
544 |
539 $ python ../gen-revert-cases.py parent |
545 $ python ../gen-revert-cases.py parent |
540 $ hg addremove --similarity 0 |
546 $ hg addremove --similarity 0 |
541 adding added_clean |
547 adding added_clean |
|
548 removing removed_clean |
542 $ hg status |
549 $ hg status |
543 M modified_clean |
550 M modified_clean |
544 A added_clean |
551 A added_clean |
|
552 R removed_clean |
545 $ hg commit -m 'parent' |
553 $ hg commit -m 'parent' |
546 |
554 |
547 (create a simple text version of the content) |
555 (create a simple text version of the content) |
548 |
556 |
549 $ python ../dircontent.py > ../content-parent.txt |
557 $ python ../dircontent.py > ../content-parent.txt |
559 $ hg status |
567 $ hg status |
560 |
568 |
561 $ hg status --rev 'desc("base")' |
569 $ hg status --rev 'desc("base")' |
562 M modified_clean |
570 M modified_clean |
563 A added_clean |
571 A added_clean |
|
572 R removed_clean |
564 |
573 |
565 (create a simple text version of the content) |
574 (create a simple text version of the content) |
566 |
575 |
567 $ python ../dircontent.py > ../content-wc.txt |
576 $ python ../dircontent.py > ../content-wc.txt |
568 $ cat ../content-wc.txt |
577 $ cat ../content-wc.txt |
605 check revert output |
614 check revert output |
606 |
615 |
607 $ hg revert --all --rev 'desc(base)' |
616 $ hg revert --all --rev 'desc(base)' |
608 removing added_clean |
617 removing added_clean |
609 reverting modified_clean |
618 reverting modified_clean |
|
619 adding removed_clean |
610 |
620 |
611 Compare resulting directory with revert target. |
621 Compare resulting directory with revert target. |
612 |
622 |
613 The diff is filtered to include change only. The only difference should be |
623 The diff is filtered to include change only. The only difference should be |
614 additional `.orig` backup file when applicable. |
624 additional `.orig` backup file when applicable. |
641 no changes needed to clean_clean |
651 no changes needed to clean_clean |
642 |
652 |
643 ### revert for: modified_clean |
653 ### revert for: modified_clean |
644 no changes needed to modified_clean |
654 no changes needed to modified_clean |
645 |
655 |
|
656 ### revert for: removed_clean |
|
657 removed_clean: no such file in rev * (glob) |
|
658 |
646 |
659 |
647 check resulting directory againt the --all run |
660 check resulting directory againt the --all run |
648 (There should be no difference) |
661 (There should be no difference) |
649 |
662 |
650 $ python ../dircontent.py > ../content-parent-explicit.txt |
663 $ python ../dircontent.py > ../content-parent-explicit.txt |
678 |
691 |
679 ### revert for: clean_clean |
692 ### revert for: clean_clean |
680 |
693 |
681 ### revert for: modified_clean |
694 ### revert for: modified_clean |
682 |
695 |
|
696 ### revert for: removed_clean |
|
697 |
683 |
698 |
684 check resulting directory againt the --all run |
699 check resulting directory againt the --all run |
685 (There should be no difference) |
700 (There should be no difference) |
686 |
701 |
687 $ python ../dircontent.py > ../content-base-explicit.txt |
702 $ python ../dircontent.py > ../content-base-explicit.txt |