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

Matt Mackall mpm at selenic.com
Sat Apr 26 10:57:50 CDT 2008


On Sat, Apr 26, 2008 at 02:10:05PM +0100, Paul Moore wrote:
> 2008/4/23 Paul Moore <p.f.moore at gmail.com>:
> > 2008/4/23 Matt Mackall <mpm at selenic.com>:
> >  >  Second, this problem isn't at all localized to Windows, so localizing
> >  >  the solution to Windows is getting off on the wrong foot. Just define
> >  >  the function everywhere and then use checkfolding to decide whether or
> >  >  not to /use/ it.
> >
> >  That sounds fair.
> 
> There's a bit of a problem here, as I use fspath on the elements of
> the files argument to dirstate.statwalk. This is the user-supplied
> list of files, and as such can contain arbitrary file names. I'm OK as
> long as the file has a foldable leaf part, as then I can use
> checkfolding to determine whether I need fspath (I'm assuming that a
> checkfolding call for every element of files is not too much overhead
> on case-sensitive Unix systems, as that's the added cost of this
> method). However, if the user supplies a filename like 'a/1234' then
> checkfolding won't work on it, and yet the filesystem may have the
> directory name as "A". (This type of filename comes up in the test
> suite, so it's not entirely a theoretical issue).

I think we should only need to use checkfolding once per hg invocation, on the
repository's .hg directory.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list