Mercurial > hg
comparison tests/test-revert.t @ 22130:78abb9a42830
test-revert: add methodical revert with explicit file path
We now also test reverting file to the working directory parent
content. However this differs from the 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:22:47 +0100 |
parents | f0147ff1109f |
children | 8768342af0cd |
comparison
equal
deleted
inserted
replaced
22129:f0147ff1109f | 22130:78abb9a42830 |
---|---|
593 | 593 |
594 $ python ../dircontent.py > ../content-base-all.txt | 594 $ python ../dircontent.py > ../content-base-all.txt |
595 $ cd .. | 595 $ cd .. |
596 $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ | 596 $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ |
597 [1] | 597 [1] |
598 | |
599 Test revert to parent content with explicit file name | |
600 ----------------------------------------------------- | |
601 | |
602 (setup from reference repo) | |
603 | |
604 $ cp -r revert-ref revert-parent-explicit | |
605 $ cd revert-parent-explicit | |
606 | |
607 revert all files individually and check the output | |
608 (output is expected to be different than in the --all case) | |
609 | |
610 $ for file in `python ../gen-revert-cases.py filelist`; do | |
611 > echo '### revert for:' $file; | |
612 > hg revert $file; | |
613 > echo | |
614 > done | |
615 ### revert for: modified_clean | |
616 no changes needed to modified_clean | |
617 | |
618 | |
619 check resulting directory againt the --all run | |
620 (There should be no difference) | |
621 | |
622 $ python ../dircontent.py > ../content-parent-explicit.txt | |
623 $ cd .. | |
624 $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ | |
625 [1] |