# HG changeset patch # User Pierre-Yves David # Date 2014-06-25 16:31:53 # Node ID 8768342af0cd538fddd898c64fa6e504635070c9 # Parent 78abb9a42830ba0c2a12bf433e33016d13c3f4ad 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. diff --git a/tests/test-revert.t b/tests/test-revert.t --- a/tests/test-revert.t +++ b/tests/test-revert.t @@ -623,3 +623,30 @@ check resulting directory againt the --a $ cd .. $ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _ [1] + +Test revert to "base" content with explicit file name +----------------------------------------------------- + +(setup from reference repo) + + $ cp -r revert-ref revert-base-explicit + $ cd revert-base-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 --rev 'desc(base)'; + > echo + > done + ### revert for: modified_clean + + +check resulting directory againt the --all run +(There should be no difference) + + $ python ../dircontent.py > ../content-base-explicit.txt + $ cd .. + $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _ + [1]