diff tests/test-casefolding.t @ 16542:e596a631210e stable

dirstate: preserve path components case on renames (issue3402) The original issue was something like: $ hg init repo $ cd repo $ mkdir D $ echo a > D/a $ hg ci -Am adda adding D/a $ mv D temp $ mv temp d $ echo b > d/b $ hg add d/b adding D/b $ hg ci -m addb $ hg mv d/b d/c moving D/b to d/c $ hg st A d/c R D/b Here we expected: A D/c R D/b the logic being we try to preserve case of path components already known in the dirstate. This is fixed by the current patch. Note the following stories are not still not supported: Changing directory case $ hg mv D d moving D/a to D/D/a moving D/b to D/D/b $ hg st A D/D/a A D/D/b R D/a R D/b or: $ hg mv D/* d D/a: not overwriting - file exists D/b: not overwriting - file exists And if they were, there are probably similar issues with diffing/patching.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 28 Apr 2012 20:29:21 +0200
parents b95b006e18cc
children 54fc9796d75b
line wrap: on
line diff
--- a/tests/test-casefolding.t	Sat Apr 28 02:00:04 2012 +0200
+++ b/tests/test-casefolding.t	Sat Apr 28 20:29:21 2012 +0200
@@ -32,6 +32,42 @@
   $ hg mv a A
   $ hg mv A a
   $ hg st
+
+test changing case of path components
+
+  $ mkdir D
+  $ echo b > D/b
+  $ hg ci -Am addb D/b
+  $ hg mv D/b d/b
+  D/b: not overwriting - file exists
+  $ hg mv D/b d/c
+  $ hg st
+  A D/c
+  R D/b
+  $ mv D temp
+  $ mv temp d
+  $ hg st
+  A D/c
+  R D/b
+  $ hg revert -aq
+  $ rm d/c
+  $ echo c > D/c
+  $ hg add D/c
+  $ hg st
+  A D/c
+  $ hg ci -m addc D/c
+  $ hg mv d/b d/e
+  moving D/b to D/e
+  $ hg st
+  A D/e
+  R D/b
+  $ hg revert -aq
+  $ rm d/e
+  $ hg mv d/b D/B
+  moving D/b to D/B
+  $ hg st
+  A D/B
+  R D/b
   $ cd ..
 
 test case collision between revisions (issue912)