darwin: define normcase spec and fallback
authorSiddharth Agarwal <sid0@fb.com>
Tue, 31 Mar 2015 23:30:19 -0700
changeset 24595 136ab89d61cb
parent 24594 609aa973c01d
child 24596 75ea27f1711d
darwin: define normcase spec and fallback These will be used in upcoming patches to efficiently create a dirstate foldmap.
mercurial/posix.py
--- 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: