mercurial/scmutil.py
branchstable
changeset 15666 37a6e9765015
parent 15665 081e795c60e0
child 15674 7b7f03502b5a
child 15721 4751d5133f15
--- 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.