Patchwork [8,of,8] test-revert: add methodical revert to "base" with explicit file path

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 11, 2014, 6:39 p.m.
Message ID <eb9dae836e2d2b495d6c.1407782394@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5350/
State Accepted
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 1403713913 -3600
#      Wed Jun 25 17:31:53 2014 +0100
# Node ID eb9dae836e2d2b495d6c8350f70e6ac781fa6bc6
# Parent  f2f9f3965e9e0cd22473e5159e00b42fdd357645
test-revert: add methodical revert to "base" with explicit file path

We now also test reverting file to another revision content. However this differ
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.
Matt Mackall - Aug. 12, 2014, 6:10 p.m.
On Mon, 2014-08-11 at 11:39 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1403713913 -3600
> #      Wed Jun 25 17:31:53 2014 +0100
> # Node ID eb9dae836e2d2b495d6c8350f70e6ac781fa6bc6
> # Parent  f2f9f3965e9e0cd22473e5159e00b42fdd357645
> test-revert: add methodical revert to "base" with explicit file path

These are queued for default, thanks.

Patch

diff --git a/tests/test-revert.t b/tests/test-revert.t
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -621,5 +621,32 @@  check resulting directory againt the --a
 
   $ python ../dircontent.py > ../content-parent-explicit.txt
   $ 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]