##// END OF EJS Templates
test-revert: add case where file is unchanged between "base" and "parent"...
Pierre-Yves David -
r22135:37d2bd2c default
parent child Browse files
Show More
@@ -435,6 +435,8 b' Write the python script to disk'
435 > # content of the file in "base" and "parent"
435 > # content of the file in "base" and "parent"
436 > # None means no file at all
436 > # None means no file at all
437 > ctxcontent = {
437 > ctxcontent = {
438 > # clean: no change from base to parent
439 > 'clean': ['base', 'base'],
438 > # modified: file content change from base to parent
440 > # modified: file content change from base to parent
439 > 'modified': ['base', 'parent'],
441 > 'modified': ['base', 'parent'],
440 > # added: file is missing from base and added in parent
442 > # added: file is missing from base and added in parent
@@ -490,6 +492,7 b' check list of planned files'
490
492
491 $ python gen-revert-cases.py filelist
493 $ python gen-revert-cases.py filelist
492 added_clean
494 added_clean
495 clean_clean
493 modified_clean
496 modified_clean
494
497
495 Script to make a simple text version of the content
498 Script to make a simple text version of the content
@@ -517,8 +520,10 b' Generate base changeset'
517
520
518 $ python ../gen-revert-cases.py base
521 $ python ../gen-revert-cases.py base
519 $ hg addremove --similarity 0
522 $ hg addremove --similarity 0
523 adding clean_clean
520 adding modified_clean
524 adding modified_clean
521 $ hg status
525 $ hg status
526 A clean_clean
522 A modified_clean
527 A modified_clean
523 $ hg commit -m 'base'
528 $ hg commit -m 'base'
524
529
@@ -526,6 +531,7 b' Generate base changeset'
526
531
527 $ python ../dircontent.py > ../content-base.txt
532 $ python ../dircontent.py > ../content-base.txt
528 $ cat ../content-base.txt
533 $ cat ../content-base.txt
534 base clean_clean
529 base modified_clean
535 base modified_clean
530
536
531 Create parent changeset
537 Create parent changeset
@@ -543,6 +549,7 b' Create parent changeset'
543 $ python ../dircontent.py > ../content-parent.txt
549 $ python ../dircontent.py > ../content-parent.txt
544 $ cat ../content-parent.txt
550 $ cat ../content-parent.txt
545 parent added_clean
551 parent added_clean
552 base clean_clean
546 parent modified_clean
553 parent modified_clean
547
554
548 Setup working directory
555 Setup working directory
@@ -560,6 +567,7 b' Setup working directory'
560 $ python ../dircontent.py > ../content-wc.txt
567 $ python ../dircontent.py > ../content-wc.txt
561 $ cat ../content-wc.txt
568 $ cat ../content-wc.txt
562 parent added_clean
569 parent added_clean
570 base clean_clean
563 parent modified_clean
571 parent modified_clean
564
572
565 $ cd ..
573 $ cd ..
@@ -629,6 +637,9 b' revert all files individually and check '
629 ### revert for: added_clean
637 ### revert for: added_clean
630 no changes needed to added_clean
638 no changes needed to added_clean
631
639
640 ### revert for: clean_clean
641 no changes needed to clean_clean
642
632 ### revert for: modified_clean
643 ### revert for: modified_clean
633 no changes needed to modified_clean
644 no changes needed to modified_clean
634
645
@@ -652,6 +663,12 b' Test revert to "base" content with expli'
652 revert all files individually and check the output
663 revert all files individually and check the output
653 (output is expected to be different than in the --all case)
664 (output is expected to be different than in the --all case)
654
665
666 Misbehavior:
667
668 - fails to report no change to revert for
669 |
670 | - clean_clean
671
655 $ for file in `python ../gen-revert-cases.py filelist`; do
672 $ for file in `python ../gen-revert-cases.py filelist`; do
656 > echo '### revert for:' $file;
673 > echo '### revert for:' $file;
657 > hg revert $file --rev 'desc(base)';
674 > hg revert $file --rev 'desc(base)';
@@ -659,6 +676,8 b' revert all files individually and check '
659 > done
676 > done
660 ### revert for: added_clean
677 ### revert for: added_clean
661
678
679 ### revert for: clean_clean
680
662 ### revert for: modified_clean
681 ### revert for: modified_clean
663
682
664
683
General Comments 0
You need to be logged in to leave comments. Login now