[PATCH] util: rename checkcase() to fscasesensitive() (API)

Yuya Nishihara yuya at tcha.org
Fri Sep 2 14:11:56 UTC 2016


On Tue, 30 Aug 2016 09:33:39 -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1472574173 25200
> #      Tue Aug 30 09:22:53 2016 -0700
> # Node ID 710794310d9d85f5d5085ce294e2d5cdfcf25c68
> # Parent  58db005d870ea22f650b13e01467777816bebfa2
> util: rename checkcase() to fscasesensitive() (API)

Sure, queued this, thanks.

> I always read the name "checkcase(path)" as "do we need to check for
> case folding at this path", but it's actually (I think) meant to be
> read "check if the file system cares about case at this path". I'm
> clearly not the only one confused by this as the dirstate has this
> property:
> 
>   def _checkcase(self):
>       return not util.checkcase(self._join('.hg'))
> 
> Maybe we should even inverse the function and call it fscasefolding()
> since that's what all callers care about?

I have no preference. Both of them sound better than checkcase().


More information about the Mercurial-devel mailing list