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

Matt Mackall mpm at selenic.com
Fri Dec 23 17:15:03 CST 2011


On Sat, 2011-12-24 at 01:03 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1324655555 -32400
> # Node ID b61b6a6195c4b831d3942f5e30cc2822bec72b01
> # Parent  3bcfea777efc41c87918c1bb594615ff4fb6a34b
> icasefs: add test for case preservation on case insensitive filesystem

I've applied the first three to default, thanks. This one should be
folded into an existing test, please.

> "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 b61b6a6195c4 tests/test-mq-icasefs.t
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/tests/test-mq-icasefs.t	Sat Dec 24 00:52:35 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 ..
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list