posix: define normcase spec and fallback
authorSiddharth Agarwal <sid0@fb.com>
Wed, 01 Apr 2015 00:26:07 -0700
changeset 24594 609aa973c01d
parent 24593 f473a1fe5c7c
child 24595 136ab89d61cb
posix: 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:21:10 2015 -0700
+++ b/mercurial/posix.py	Wed Apr 01 00:26:07 2015 -0700
@@ -200,6 +200,11 @@
 def normcase(path):
     return path.lower()
 
+# what normcase does to ASCII strings
+normcasespec = encoding.normcasespecs.lower
+# fallback normcase function for non-ASCII strings
+normcasefallback = normcase
+
 if sys.platform == 'darwin':
 
     def normcase(path):