Case-insensitive filename handling in Mercurial

mercurial, tortoisehg, windows

Solution

This issue has been resolved in Mercurial 1.1! From the release notes: "Improved correctness in the face of casefolding filesystems".

On Windows, Mercurial now ignores case in its command line arguments:

>hg status -A foo
C foo
>hg status -A FOO
C foo

And it also is aware that filename changes that only involve case are not new files:

>ren foo FOO
>hg status -A fOO
C foo

Thus there's no longer any risk of overlooking changes due to mistypes on the command line.

However, be aware that the contents of the .hgignore file remain case sensitive. This is an issue only if you're using glob syntax; with regexp syntax you can put (?i) at the beginning of patterns to make them insensitive.

Problem

I'm using TortoiseHg 0.5 (which includes Mercurial 1.0.2) on Vista64. My understanding from the Mercurial Book is that Mercurial should handle filenames in a case-insensitive manner on a case-insensitive filesystem (such as NTFS, which is what I'm on). However I find that my installation of Mercurial is in fact sensitive to case: ``` >hg status -A foo C foo >hg status -A FOO ? FOO ``` Could this be a bug in Mercurial, a bug in the TortoiseHg build of Mercurial, or is it something else? How can I achieve case-insensitive filename handling from Mercurial on Windows?

Original source