Case handling on windows

Andrei Vermel avermel at mail.ru
Sun Jun 29 09:11:46 CDT 2008


> On Sat, 2008-06-28 at 13:53 +0400, Andrei Vermel wrote:
>> Matt,
>> 
>> I think the way current tip handles case changes on windows is not quite
>> right. At the moment it silently ignores them.
>> 
>> D:\distribs\mercurial\qqq>hg init
>> 
>> D:\distribs\mercurial\qqq>echo "aaa" >aaa.txt
>> 
>> D:\distribs\mercurial\qqq>hg add
>> adding aaa.txt
>> 
>> D:\distribs\mercurial\qqq>hg ci -m 1
>> 
>> D:\distribs\mercurial\qqq>mv aaa.txt AAA.txt
>> 
>> D:\distribs\mercurial\qqq>ls
> AAA.txt
>> 
>> D:\distribs\mercurial\qqq>hg stat
>> 
>> D:\distribs\mercurial\qqq>echo "bbb" >>aaa.txt
>> 
>> D:\distribs\mercurial\qqq>hg stat
>> M aaa.txt
>> 
>> I hope that this behaviour is not the intended one?
>
> Oh, but it is. Such changes are both invisible and meaningless on
> Windows, but generally fatal on Unix. Further, people and programs are
> known to regularly change the case of files by accident on Windows. Why
> would we want to report invisible, meaningless, and possibly accidental
> changes that are fatal to other users?

Actually the fact that the case of the filenames on Windows often changes by accident is what makes knowing that this happened so important. Some of the tools I use do care about the case of filenames, but now I can't find out about the changed filenames and revert them back easily. I agree that this probably is not very typical, but it would be good to at least have an option to see the case renames in 'stat'.

Andrei




More information about the Mercurial mailing list