tests/test-merge-tools.t
changeset 25753 fe03f522dda9
parent 24843 21b33f0460e0
child 26168 b907051df5b7
--- a/tests/test-merge-tools.t	Wed Jul 08 17:01:09 2015 +0900
+++ b/tests/test-merge-tools.t	Wed Jul 08 17:01:09 2015 +0900
@@ -601,6 +601,17 @@
 
 update is a merge ...
 
+(this also tests that files reverted with '--rev REV' are treated as
+"modified", even if none of mode, size and timestamp of them isn't
+changed on the filesystem (see also issue4583))
+
+  $ cat >> $HGRCPATH <<EOF
+  > [fakedirstatewritetime]
+  > # emulate invoking dirstate.write() via repo.status()
+  > # at 2000-01-01 00:00
+  > fakenow = 200001010000
+  > EOF
+
   $ beforemerge
   [merge-tools]
   false.whatever=
@@ -611,8 +622,16 @@
   $ f -s f
   f: size=17
   $ touch -t 200001010000 f
-  $ hg status f
+  $ hg debugrebuildstate
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
+  > EOF
   $ hg revert -q -r 1 .
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > fakedirstatewritetime = !
+  > EOF
   $ f -s f
   f: size=17
   $ touch -t 200001010000 f
@@ -646,8 +665,16 @@
   $ f -s f
   f: size=17
   $ touch -t 200001010000 f
-  $ hg status f
+  $ hg debugrebuildstate
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
+  > EOF
   $ hg revert -q -r 1 .
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > fakedirstatewritetime = !
+  > EOF
   $ f -s f
   f: size=17
   $ touch -t 200001010000 f