Patchwork [6,of,8] test-revert: add methodical revert to "base"

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 11, 2014, 6:39 p.m.
Message ID <6288c0ecc8ac7d6d4e15.1407782392@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5348/
State Superseded
Commit f0147ff1109f52fab36a464f631aef5c20129ba8
Headers show

Comments

Pierre-Yves David - Aug. 11, 2014, 6:39 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1403712965 -3600
#      Wed Jun 25 17:16:05 2014 +0100
# Node ID 6288c0ecc8ac7d6d4e15edd241f6e15893ef18ea
# Parent  31b8bd16d1b4e1e6b02e84979d4968d9415b92e9
test-revert: add methodical revert to "base"

We now also test reverting file to the content of another revision. This is
still done using the `--all` flag.

Patch

diff --git a/tests/test-revert.t b/tests/test-revert.t
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -570,5 +570,28 @@  additional `.orig` backup file when appl
 
   $ python ../dircontent.py > ../content-parent-all.txt
   $ 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]