[PATCH 1 of 3] Add a new function, filesystem_case

Paul Moore p.f.moore at gmail.com
Sun Apr 27 09:33:28 CDT 2008


2008/4/27 Dirkjan Ochtman <dirkjan at ochtman.nl>:
>  > There may be places where the repo needs to know about case issues -
>  > my paych for issue 1083 is a case in point - but that's only in order
>  > to know that it needs to work around a case insensitive filesystem in
>  > order to enforce case sensitive semantics.
>
>  Do you have a dirstate there? It should really be as nicely decoupled as
>  possible, so if you can localize things to the dirstate, that seems
>  nice, but if you need it in the repo in other places, maybe not.

The specific code is working round the fact that filecommit expects
wread to fail with IO error if the (case sensitive) filename doesn't
exist - and on case insensitive filesystems, wread('a') works if a
file 'A' exists. So I just precheck for that and raise the error
manually.

I doubt this is something that could be generalised successfully
(without a far more extensive refactoring than I want to do at this
stage).

Paul.


More information about the Mercurial-devel mailing list