"hg mv" cannot change case on windows, and "hg status" does not notice it either

Bill Barry after.fallout at gmail.com
Fri Jun 5 13:03:30 CDT 2009


The operating system cannot always just change the case of a file.

powershell:

Posh C:\hgwork\Website> echo test > test.txt
Posh C:\hgwork\Website> rename test.txt Test.txt
Posh C:\hgwork\Website> ls


    Directory: Microsoft.PowerShell.Core\FileSystem::C:\hgwork\Website


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---          6/5/2009  11:57 AM         14 test.txt

though this same test works in a command prompt...

in explorer I get an error when I try to change the case of a file; I 
have to rename it to something else and then rename it to the final name.


The simple answer is that case sensitivity in file systems is simply 
broken in Windows. Some places it works, some places it doesn't. Nowhere 
does it work 100%. It could be a Mercurial bug, a python bug or a 
Windows bug.

rupert.thurner wrote:
> while the operating system can change the case of a file, mercurial
> cannot on windows:
>
> $ echo bla > ts
> $ hg init
> $ hg st
> $ hg add ts
> $ hg commit -m "as "
> $ hg mv ts Ts
> Ts: not overwriting - file exists
> $ mv ts Ts
> $ ls -l
> total 1
> -rw-r--r--    1 me Administ        4 Jun  5 19:29 Ts
>
> this test was done with msys, but the same is true for cmd, etc. is
> this a mercurial bug, or a python thing?
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
>   



More information about the Mercurial mailing list