[PATCH 4 of 6 foldmap-in-C] cygwin: define normcase ASCII spec and fallback

Siddharth Agarwal sid0 at fb.com
Wed Apr 1 21:48:09 CDT 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1427873362 25200
#      Wed Apr 01 00:29:22 2015 -0700
# Node ID 134dd4b964369e65530f72f453937a52220ef3e7
# Parent  ea8dd7ff10e7f46d1c83ce3a65d55e5c274bc6ff
cygwin: define normcase ASCII spec and fallback

These will be used in upcoming patches to efficiently create a dirstate
foldmap.

The Cygwin normcase behavior is more complicated than just a simple lowercasing
or uppercasing. That's why we specify 'other'.

diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -311,6 +311,9 @@ if sys.platform == 'cygwin':
 
         return encoding.upper(path)
 
+    normcaseasciispec = encoding.normcaseasciispecs.other
+    normcasefallback = normcase
+
     # Cygwin translates native ACLs to POSIX permissions,
     # but these translations are not supported by native
     # tools, so the exec bit tends to be set erroneously.


More information about the Mercurial-devel mailing list