Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/posix.py @ 24594:609aa973c01d
posix: 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 | Wed, 01 Apr 2015 00:26:07 -0700 |
parents | d65ecb814fc0 |
children | 136ab89d61cb |
comparison
equal
deleted
inserted
replaced
24593:f473a1fe5c7c | 24594:609aa973c01d |
---|---|
197 return st1.st_dev == st2.st_dev | 197 return st1.st_dev == st2.st_dev |
198 | 198 |
199 # os.path.normcase is a no-op, which doesn't help us on non-native filesystems | 199 # os.path.normcase is a no-op, which doesn't help us on non-native filesystems |
200 def normcase(path): | 200 def normcase(path): |
201 return path.lower() | 201 return path.lower() |
202 | |
203 # what normcase does to ASCII strings | |
204 normcasespec = encoding.normcasespecs.lower | |
205 # fallback normcase function for non-ASCII strings | |
206 normcasefallback = normcase | |
202 | 207 |
203 if sys.platform == 'darwin': | 208 if sys.platform == 'darwin': |
204 | 209 |
205 def normcase(path): | 210 def normcase(path): |
206 ''' | 211 ''' |