[PATCH 2 of 6 foldmap-in-C V2] posix: define normcase spec and fallback
Siddharth Agarwal
sid0 at fb.com
Thu Apr 2 22:51:51 UTC 2015
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1427873167 25200
# Wed Apr 01 00:26:07 2015 -0700
# Node ID 15cdbfbc79cdb6866eef380e7c85129b8cf1092a
# Parent 137677d5096e0e7f1f0f19d795a0e54310f65a4a
posix: define normcase spec and fallback
These will be used in upcoming patches to efficiently create a dirstate
foldmap.
diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -200,6 +200,11 @@ def samedevice(fpath1, fpath2):
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):
More information about the Mercurial-devel
mailing list