tests/test-commit-interactive.t
changeset 25759 ff11c1565c04
parent 25483 fb04372d7b38
child 25796 4eb8d8a44bf1
--- a/tests/test-commit-interactive.t	Wed Jul 08 17:01:09 2015 +0900
+++ b/tests/test-commit-interactive.t	Wed Jul 08 17:07:45 2015 +0900
@@ -1381,6 +1381,8 @@
   record this change to 'subdir/f1'? [Ynesfdaq?] y
   
 
+  $ hg status -A subdir/f1
+  C subdir/f1
   $ hg tip -p
   changeset:   28:* (glob)
   tag:         tip
@@ -1417,6 +1419,8 @@
   +e
   record this change to 'subdir/f1'? [Ynesfdaq?] y
   
+  $ hg status -A subdir/f1
+  C subdir/f1
   $ hg log --template '{author}\n' -l 1
   xyz
   $ HGUSER="test"
@@ -1426,7 +1430,7 @@
 Moving files
 
   $ hg update -C .
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg mv plain plain3
   $ echo somechange >> plain3
   $ hg commit -i -d '23 0' -mmoving_files << EOF
@@ -1447,6 +1451,8 @@
   record this change to 'plain3'? [Ynesfdaq?] y
   
 The #if execbit block above changes the hash here on some systems
+  $ hg status -A plain3
+  C plain3
   $ hg tip
   changeset:   30:* (glob)
   tag:         tip
@@ -1526,3 +1532,98 @@
   +foo
   
   $ cd ..
+
+  $ hg status -A folder/bar
+  C folder/bar
+
+Clear win32text configuration before size/timestamp sensitive test
+
+  $ cat >> .hg/hgrc <<EOF
+  > [extensions]
+  > win32text = !
+  > [decode]
+  > ** = !
+  > [encode]
+  > ** = !
+  > [patch]
+  > eol = strict
+  > EOF
+  $ hg update -q -C null
+  $ hg update -q -C tip
+
+Test that partially committed file is still treated as "modified",
+even if none of mode, size and timestamp is changed on the filesystem
+(see also issue4583).
+
+  $ cat > subdir/f1 <<EOF
+  > A
+  > a
+  > a
+  > b
+  > c
+  > d
+  > E
+  > EOF
+  $ hg diff --git subdir/f1
+  diff --git a/subdir/f1 b/subdir/f1
+  --- a/subdir/f1
+  +++ b/subdir/f1
+  @@ -1,7 +1,7 @@
+  -a
+  +A
+   a
+   a
+   b
+   c
+   d
+  -e
+  +E
+
+  $ touch -t 200001010000 subdir/f1
+
+  $ cat >> .hg/hgrc <<EOF
+  > # emulate invoking patch.internalpatch() at 2000-01-01 00:00
+  > [fakepatchtime]
+  > fakenow = 200001010000
+  > 
+  > [extensions]
+  > fakepatchtime = $TESTDIR/fakepatchtime.py
+  > EOF
+  $ hg commit -i -m 'commit subdir/f1 partially' <<EOF
+  > y
+  > y
+  > n
+  > EOF
+  diff --git a/subdir/f1 b/subdir/f1
+  2 hunks, 2 lines changed
+  examine changes to 'subdir/f1'? [Ynesfdaq?] y
+  
+  @@ -1,6 +1,6 @@
+  -a
+  +A
+   a
+   a
+   b
+   c
+   d
+  record change 1/2 to 'subdir/f1'? [Ynesfdaq?] y
+  
+  @@ -2,6 +2,6 @@
+   a
+   a
+   b
+   c
+   d
+  -e
+  +E
+  record change 2/2 to 'subdir/f1'? [Ynesfdaq?] n
+  
+  $ cat >> .hg/hgrc <<EOF
+  > [extensions]
+  > fakepatchtime = !
+  > EOF
+
+  $ hg debugstate | grep ' subdir/f1$'
+  n   0         -1 unset               subdir/f1
+  $ hg status -A subdir/f1
+  M subdir/f1