##// END OF EJS Templates
util: rename checkcase() to fscasesensitive() (API)...
Martin von Zweigbergk -
r29889:6f447b9e default
parent child Browse files
Show More
@@ -148,8 +148,8 b' def wrapname(name, wrapper):'
148 # NOTE: os.path.dirname() and os.path.basename() are safe because
148 # NOTE: os.path.dirname() and os.path.basename() are safe because
149 # they use result of os.path.split()
149 # they use result of os.path.split()
150 funcs = '''os.path.join os.path.split os.path.splitext
150 funcs = '''os.path.join os.path.split os.path.splitext
151 os.path.normpath os.makedirs
151 os.path.normpath os.makedirs mercurial.util.endswithsep
152 mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase
152 mercurial.util.splitpath mercurial.util.fscasesensitive
153 mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath
153 mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath
154 mercurial.util.checkwinfilename mercurial.util.checkosfilename
154 mercurial.util.checkwinfilename mercurial.util.checkosfilename
155 mercurial.util.split'''
155 mercurial.util.split'''
@@ -2449,7 +2449,7 b' def debugfsinfo(ui, path="."):'
2449 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
2449 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
2450 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
2450 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
2451 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
2451 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
2452 ui.write(('case-sensitive: %s\n') % (util.checkcase('.debugfsinfo')
2452 ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo')
2453 and 'yes' or 'no'))
2453 and 'yes' or 'no'))
2454 os.unlink('.debugfsinfo')
2454 os.unlink('.debugfsinfo')
2455
2455
@@ -1501,7 +1501,7 b' class workingctx(committablectx):'
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,
@@ -227,7 +227,7 b' class dirstate(object):'
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()
@@ -1586,7 +1586,7 b' def update(repo, node, branchmerge, forc'
1586 actions[m] = []
1586 actions[m] = []
1587 actions[m].append((f, args, msg))
1587 actions[m].append((f, args, msg))
1588
1588
1589 if not util.checkcase(repo.path):
1589 if not util.fscasesensitive(repo.path):
1590 # check collision between files only in p2 for clean update
1590 # check collision between files only in p2 for clean update
1591 if (not branchmerge and
1591 if (not branchmerge and
1592 (force or not wc.dirty(missing=True, branch=False))):
1592 (force or not wc.dirty(missing=True, branch=False))):
@@ -40,7 +40,7 b' class pathauditor(object):'
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
@@ -1213,7 +1213,7 b' def fstat(fp):'
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
General Comments 0
You need to be logged in to leave comments. Login now