changeset 24595:136ab89d61cb

darwin: define normcase spec and fallback These will be used in upcoming patches to efficiently create a dirstate foldmap.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 31 Mar 2015 23:30:19 -0700
parents 609aa973c01d
children 75ea27f1711d
files mercurial/posix.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/posix.py	Wed Apr 01 00:26:07 2015 -0700
+++ b/mercurial/posix.py	Tue Mar 31 23:30:19 2015 -0700
@@ -228,7 +228,11 @@
         try:
             return encoding.asciilower(path)  # exception for non-ASCII
         except UnicodeDecodeError:
-            pass
+            return normcasefallback(path)
+
+    normcasespec = encoding.normcasespecs.lower
+
+    def normcasefallback(path):
         try:
             u = path.decode('utf-8')
         except UnicodeDecodeError: