pathauditor: switch normcase logic according to case sensitivity of filesystem
this patch applies 'util.normcase()' to audit path only on case
insensitive filesystem.
--- a/mercurial/scmutil.py Fri Dec 16 21:09:40 2011 +0900
+++ b/mercurial/scmutil.py Fri Dec 16 21:09:40 2011 +0900
@@ -76,12 +76,16 @@
self.auditeddir = set()
self.root = root
self.callback = callback
+ if os.path.lexists(root) and not util.checkcase(root):
+ self.normcase = util.normcase
+ else:
+ self.normcase = lambda x: x
def __call__(self, path):
'''Check the relative path.
path may contain a pattern (e.g. foodir/**.txt)'''
- normpath = os.path.normcase(path)
+ normpath = self.normcase(path)
if normpath in self.audited:
return
# AIX ignores "/" at end of path, others raise EISDIR.