Mercurial > hg
comparison tests/test-revert.t @ 22131:8768342af0cd
test-revert: add methodical revert to "base" with explicit file path
We now also test reverting file to another revision's content. However
this differs from previously introduced test by using the explicit path
of each "case file" when calling revert. This should result in the
same result regarding file content and backup creation, but the output
of the `hg revert` call should differ.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 25 Jun 2014 17:31:53 +0100 |
parents | 78abb9a42830 |
children | d732ff677b96 |
comparison
equal
deleted
inserted
replaced
22130:78abb9a42830 | 22131:8768342af0cd |
---|---|
621 | 621 |
622 $ python ../dircontent.py > ../content-parent-explicit.txt | 622 $ python ../dircontent.py > ../content-parent-explicit.txt |
623 $ cd .. | 623 $ cd .. |
624 $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ | 624 $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ |
625 [1] | 625 [1] |
626 | |
627 Test revert to "base" content with explicit file name | |
628 ----------------------------------------------------- | |
629 | |
630 (setup from reference repo) | |
631 | |
632 $ cp -r revert-ref revert-base-explicit | |
633 $ cd revert-base-explicit | |
634 | |
635 revert all files individually and check the output | |
636 (output is expected to be different than in the --all case) | |
637 | |
638 $ for file in `python ../gen-revert-cases.py filelist`; do | |
639 > echo '### revert for:' $file; | |
640 > hg revert $file --rev 'desc(base)'; | |
641 > echo | |
642 > done | |
643 ### revert for: modified_clean | |
644 | |
645 | |
646 check resulting directory againt the --all run | |
647 (There should be no difference) | |
648 | |
649 $ python ../dircontent.py > ../content-base-explicit.txt | |
650 $ cd .. | |
651 $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _ | |
652 [1] |