##// END OF EJS Templates
win32mbcs: avoid unintentional failure at colorization...
FUJIWARA Katsunori -
r32566:377c74ef stable
parent child Browse files
Show More
@@ -156,7 +156,7 b" funcs = '''os.path.join os.path.split os"
156 # because they expects argument is local encoded string and cause
156 # because they expects argument is local encoded string and cause
157 # problem with unicode string.
157 # problem with unicode string.
158 rfuncs = '''mercurial.encoding.upper mercurial.encoding.lower
158 rfuncs = '''mercurial.encoding.upper mercurial.encoding.lower
159 mercurial.pycompat.bytestr'''
159 mercurial.util._filenamebytestr'''
160
160
161 # List of Windows specific functions to be wrapped.
161 # List of Windows specific functions to be wrapped.
162 winfuncs = '''os.path.splitunc'''
162 winfuncs = '''os.path.splitunc'''
@@ -65,6 +65,9 b' urlerr = pycompat.urlerr'
65 urlreq = pycompat.urlreq
65 urlreq = pycompat.urlreq
66 xmlrpclib = pycompat.xmlrpclib
66 xmlrpclib = pycompat.xmlrpclib
67
67
68 # workaround for win32mbcs
69 _filenamebytestr = pycompat.bytestr
70
68 def isatty(fp):
71 def isatty(fp):
69 try:
72 try:
70 return fp.isatty()
73 return fp.isatty()
@@ -1224,7 +1227,7 b' def checkwinfilename(path):'
1224 for n in path.replace('\\', '/').split('/'):
1227 for n in path.replace('\\', '/').split('/'):
1225 if not n:
1228 if not n:
1226 continue
1229 continue
1227 for c in pycompat.bytestr(n):
1230 for c in _filenamebytestr(n):
1228 if c in _winreservedchars:
1231 if c in _winreservedchars:
1229 return _("filename contains '%s', which is reserved "
1232 return _("filename contains '%s', which is reserved "
1230 "on Windows") % c
1233 "on Windows") % c
General Comments 0
You need to be logged in to leave comments. Login now