changeset 22129:f0147ff1109f

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 25 Jun 2014 17:16:05 +0100
parents db23fb4e210d
children 78abb9a42830
files tests/test-revert.t
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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]