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