[PATCH 2 of 8] Add a method to dirstate to return case folding state

Paul Moore p.f.moore at gmail.com
Wed Apr 30 16:40:35 CDT 2008


2008/4/30 Adrian Buehlmann <adrian at cadifra.com>:
>  > Add a method to dirstate to return case folding state
>
>  Any reason why you don't name that method? (more on this below)

Just that I forgot...

>  > This patch adds a method to the dirstate to check if the directory is on a
>  > casr folding filesystem. The result of the check is cached, so that it is
>      ^
>      typo

Thanks.

>  In my version of that patch (reposted below), I used the name "foldspaths" because
>  the folding a filesystem can do is more generic than just folding the *case*
>  of a path name (for example, I read somewhere that Mac OS X does some unicode
>  normalization folding, which for example has nothing to do with the case). So I fail to see
>  the point in trying to assert here to upper levels of the software that the filesystem
>  *only* folds _the case_ of a path.

To be honest, I didn't particularly like your name - I don't like the
active verb ("folds") style. But it's a minor point - if there's
agreement on a change, I'll make it.

>  What we do is, we detect that a file system folds paths (yes, we currently do that with
>  a case probe, but that's a low level detail). If we detect that, we use new util.fspath
>  to ask the filesystem for the target path of that folding when needed.
>  We do not care *what* that folding actually is in higher levels.

I take your point that this is not limited to case. Looking at it
again, I see that the lower level function is called "checkfolding" -
for some reason, I'd got the impression that it mentioned case, and
followed that lead.

I'll change this. Would you be OK with the name "pathfolding"?

What's the best way to make this change? Post the whole series of 8
patches again, with only some needing changes? Or post an extra patch
to go on top of the 8, changing the name? Or just repost the 4
affected patches?

Paul.


More information about the Mercurial-devel mailing list