[PATCH 00 of 11] a lot of patches concerning casefolding filesystems

Simon Heimberg simohe at besonet.ch
Fri Aug 7 19:42:58 UTC 2009


test-casefolding (extended) finally works on linux on hfs.
On caseinsensitive filesystems,
- it is not possible anymore to add A and a (with hg add or hg addremove or ...)
- it is possible to rename a to A
- it is even not possible to add 'Ä ' and 'Ä' on hfs or 'a' and 'a.' on ntfs or fat

test-issue660 fails on linux with hfs, but it did this bofore
it passes on linux with vfat
test-casefolding fails with vfat because renaming with changing the case is not 
possible (even not mv a zf1x; mv zf1x A)
the other test pass

testing on os x and windows is not done

-----------------------------------------------------------------------------

It is important to distinguish two path functions (name as in mercurial.util):
- realpath, returns path as it is on the filesystem
- foldedpath, returns the same path for all possible folded paths
    (example for ntfs: return 'a' for 'a', 'A', 'a.', 'A.', ...)
And it is important to use each of them in the right place (and only use them 
on folding filesystems).

There are simple versions of this functions in util. The improved versions for 
some platforms are defined in posix and windows.

Btw, it is not possible to read the real path on linux with
  os.readlink('/proc/self/fd/%d' % myfile.fileno())
This returns the path used for opening.


Greetings
Simon



More information about the Mercurial-devel mailing list