Mercurial > hg
changeset 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 |
files | tests/test-revert.t |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-revert.t Wed Jun 25 17:16:05 2014 +0100 +++ b/tests/test-revert.t Wed Jun 25 17:22:47 2014 +0100 @@ -595,3 +595,31 @@ $ cd .. $ diff -U 0 -- content-base.txt content-base-all.txt | grep _ [1] + +Test revert to parent content with explicit file name +----------------------------------------------------- + +(setup from reference repo) + + $ cp -r revert-ref revert-parent-explicit + $ cd revert-parent-explicit + +revert all files individually and check the output +(output is expected to be different than in the --all case) + + $ for file in `python ../gen-revert-cases.py filelist`; do + > echo '### revert for:' $file; + > hg revert $file; + > echo + > done + ### revert for: modified_clean + no changes needed to modified_clean + + +check resulting directory againt the --all run +(There should be no difference) + + $ python ../dircontent.py > ../content-parent-explicit.txt + $ cd .. + $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ + [1]