comparison mercurial/dirstate.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 2ebd507e5ac3
children ba06562a06a2
comparison
equal deleted inserted replaced
29888:8a84347b9907 29889:6f447b9ec263
225 def _checkexec(self): 225 def _checkexec(self):
226 return util.checkexec(self._root) 226 return util.checkexec(self._root)
227 227
228 @propertycache 228 @propertycache
229 def _checkcase(self): 229 def _checkcase(self):
230 return not util.checkcase(self._join('.hg')) 230 return not util.fscasesensitive(self._join('.hg'))
231 231
232 def _join(self, f): 232 def _join(self, f):
233 # much faster than os.path.join() 233 # much faster than os.path.join()
234 # it's safe because f is always a relative path 234 # it's safe because f is always a relative path
235 return self._rootdir + f 235 return self._rootdir + f