Looking at case insensitivity - question
Jens Alfke
jens at mooseyard.com
Mon Apr 14 00:02:09 CDT 2008
On 13 Apr '08, at 3:34 PM, Paul Moore wrote:
> I'm sure there are OS-specific ways of doing this
Well, realpath is part of the POSIX spec, so it's available on most
operating systems (yes I know, not Windows without Cygwin.)
> (no, there doesn't seem to be a general wrapper in the Python
> library :-(
There's os.path.realpath. Unfortunately, some quick tests on OS X 10.5
show that it doesn't affect the capitalization of filenames :-(
> I thought that might be the case :-( That's likely to be far too
> expensive to do in this context - we're at a case where the current
> code does a single stat, as far as I can tell.
But you only need to check once per invocation for any given repo, and
can then cache the result in memory.
—Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1875 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080413/91da160d/attachment.bin
More information about the Mercurial
mailing list