comparison mercurial/pathutil.py @ 29889:6f447b9ec263

util: rename checkcase() to fscasesensitive() (API) 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?
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 30 Aug 2016 09:22:53 -0700
parents 0b7ce0b16d8a
children 318a24b52eeb
comparison
equal deleted inserted replaced
29888:8a84347b9907 29889:6f447b9ec263
38 self.audited = set() 38 self.audited = set()
39 self.auditeddir = set() 39 self.auditeddir = set()
40 self.root = root 40 self.root = root
41 self._realfs = realfs 41 self._realfs = realfs
42 self.callback = callback 42 self.callback = callback
43 if os.path.lexists(root) and not util.checkcase(root): 43 if os.path.lexists(root) and not util.fscasesensitive(root):
44 self.normcase = util.normcase 44 self.normcase = util.normcase
45 else: 45 else:
46 self.normcase = lambda x: x 46 self.normcase = lambda x: x
47 47
48 def __call__(self, path): 48 def __call__(self, path):