# HG changeset patch # User FUJIWARA Katsunori # Date 2011-12-16 12:09:40 # Node ID 3c5e818ac6792a5f74035ae1b8ce60cff5cde47d # Parent d6c19cfa03cee4e7c565b53ba832845f2033a415 windows: use upper() instead of lower() or os.path.normcase() this patch uses upper() instead of lower() or os.path.normcase() for case folding on Windows(NTFS), because lower-ing causes problems for some languages on it. see below for detail about problem of lower-ing: https://blogs.msdn.com/b/michkap/archive/2005/01/16/353873.aspx diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py --- a/hgext/win32mbcs.py +++ b/hgext/win32mbcs.py @@ -127,7 +127,9 @@ def wrapname(name, wrapper): # NOTE: os.path.dirname() and os.path.basename() are safe because # they use result of os.path.split() funcs = '''os.path.join os.path.split os.path.splitext - os.path.splitunc os.path.normpath os.path.normcase os.makedirs + os.path.splitunc os.path.normpath os.makedirs + mercurial.windows.normcase + mercurial.util.normcase mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath mercurial.util.checkwinfilename mercurial.util.checkosfilename''' diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -131,7 +131,8 @@ def localpath(path): def normpath(path): return pconvert(os.path.normpath(path)) -normcase = os.path.normcase +def normcase(path): + return path.upper() def realpath(path): '''