Mercurial > hg
comparison mercurial/util.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 | bac1829ec31f |
children | 73b1c328a7da |
comparison
equal
deleted
inserted
replaced
29888:8a84347b9907 | 29889:6f447b9ec263 |
---|---|
1211 except AttributeError: | 1211 except AttributeError: |
1212 return os.stat(fp.name) | 1212 return os.stat(fp.name) |
1213 | 1213 |
1214 # File system features | 1214 # File system features |
1215 | 1215 |
1216 def checkcase(path): | 1216 def fscasesensitive(path): |
1217 """ | 1217 """ |
1218 Return true if the given path is on a case-sensitive filesystem | 1218 Return true if the given path is on a case-sensitive filesystem |
1219 | 1219 |
1220 Requires a path (like /foo/.hg) ending with a foldable final | 1220 Requires a path (like /foo/.hg) ending with a foldable final |
1221 directory component. | 1221 directory component. |