test-revert: add methodical revert to "base"
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 25 Jun 2014 17:16:05 +0100
changeset 22129 f0147ff1109f
parent 22128 db23fb4e210d
child 22130 78abb9a42830
test-revert: add methodical revert to "base" We now also test reverting s file to the content of another revision. This is still done using the `--all` flag.
tests/test-revert.t
--- a/tests/test-revert.t	Wed Jun 25 17:03:55 2014 +0100
+++ b/tests/test-revert.t	Wed Jun 25 17:16:05 2014 +0100
@@ -572,3 +572,26 @@
   $ cd ..
   $ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _
   [1]
+
+Test revert --all to "base" content
+-----------------------------------
+
+(setup from reference repo)
+
+  $ cp -r revert-ref revert-base-all
+  $ cd revert-base-all
+
+check revert output
+
+  $ hg revert --all --rev 'desc(base)'
+  reverting modified_clean
+
+Compare resulting directory with revert target.
+
+The diff is filtered to include change only. The only difference should be
+additional `.orig` backup file when applicable.
+
+  $ python ../dircontent.py > ../content-base-all.txt
+  $ cd ..
+  $ diff -U 0 -- content-base.txt content-base-all.txt | grep _
+  [1]