# HG changeset patch # User FUJIWARA Katsunori # Date 1324037380 -32400 # Node ID 37a6e9765015a0bb957d126204878f890565f09a # Parent 081e795c60e0e725f0259b13e5c0050ccd91f603 pathauditor: switch normcase logic according to case sensitivity of filesystem this patch applies 'util.normcase()' to audit path only on case insensitive filesystem. diff -r 081e795c60e0 -r 37a6e9765015 mercurial/scmutil.py --- 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.