[PATCH] icasefs: add test for case preservation on case insensitive filesystem

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sat Dec 24 04:19:05 CST 2011


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1324721796 -32400
# Node ID 548c164efed8f797181b112b015e97e3d5afe162
# Parent  3bcfea777efc41c87918c1bb594615ff4fb6a34b
icasefs: add test for case preservation on case insensitive filesystem

"hg qpush" causes unexpected behavior, if case preservation on case
insensitive filesystem is not enough.

this patch adds the test using mixed-case filenames to reproduce this
problem on any case insensitive filesystems.

diff -r 3bcfea777efc -r 548c164efed8 tests/test-mq.t
--- a/tests/test-mq.t	Sat Dec 24 00:52:06 2011 +0900
+++ b/tests/test-mq.t	Sat Dec 24 19:16:36 2011 +0900
@@ -1394,3 +1394,46 @@
   patch queue now empty
   $ cd ..
 
+
+test case preservation through patch pushing especially on case
+insensitive filesystem
+
+  $ hg init casepreserve
+  $ cd casepreserve
+
+  $ hg qnew add-file1
+  $ echo a > TeXtFiLe.TxT
+  $ hg add TeXtFiLe.TxT
+  $ hg qrefresh
+
+  $ hg qnew add-file2
+  $ echo b > AnOtHeRFiLe.TxT
+  $ hg add AnOtHeRFiLe.TxT
+  $ hg qrefresh
+
+  $ hg qnew modify-file
+  $ echo c >> AnOtHeRFiLe.TxT
+  $ hg qrefresh
+
+  $ hg qapplied
+  add-file1
+  add-file2
+  modify-file
+  $ hg qpop -a
+  popping modify-file
+  popping add-file2
+  popping add-file1
+  patch queue now empty
+
+this qpush causes problems below, if case preservation on case
+insensitive filesystem is not enough:
+(1) unexpected "adding ..." messages are shown
+(2) patching fails in modification of (1) files
+
+  $ hg qpush -a
+  applying add-file1
+  applying add-file2
+  applying modify-file
+  now at: modify-file
+
+  $ cd ..


More information about the Mercurial-devel mailing list