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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Tue Dec 20 02:42:53 CST 2011


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1324370004 -32400
# Branch stable
# Node ID 33e24a5c1981530413680328a4747c234bc2f0ef
# Parent  7722593fef5c54b778f0483f93743ee91db7d340
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 7722593fef5c -r 33e24a5c1981 tests/test-mq-icasefs.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-icasefs.t	Tue Dec 20 17:33:24 2011 +0900
@@ -0,0 +1,46 @@
+run only on case-insensitive filesystems
+
+  $ "$TESTDIR/hghave" icasefs || exit 80
+
+  $ echo "[extensions]" >> $HGRCPATH
+  $ echo "mq=" >> $HGRCPATH
+
+  $ hg init repo1
+  $ cd repo1
+
+  $ 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