comparison mercurial/context.py @ 29893: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 a22b3de3b65a
children b60a5fe98b73
comparison
equal deleted inserted replaced
29892:8a84347b9907 29893:6f447b9ec263
1499 listsubrepos=False, badfn=None): 1499 listsubrepos=False, badfn=None):
1500 r = self._repo 1500 r = self._repo
1501 1501
1502 # Only a case insensitive filesystem needs magic to translate user input 1502 # Only a case insensitive filesystem needs magic to translate user input
1503 # to actual case in the filesystem. 1503 # to actual case in the filesystem.
1504 if not util.checkcase(r.root): 1504 if not util.fscasesensitive(r.root):
1505 return matchmod.icasefsmatcher(r.root, r.getcwd(), pats, include, 1505 return matchmod.icasefsmatcher(r.root, r.getcwd(), pats, include,
1506 exclude, default, r.auditor, self, 1506 exclude, default, r.auditor, self,
1507 listsubrepos=listsubrepos, 1507 listsubrepos=listsubrepos,
1508 badfn=badfn) 1508 badfn=badfn)
1509 return matchmod.match(r.root, r.getcwd(), pats, 1509 return matchmod.match(r.root, r.getcwd(), pats,