mercurial/util.py
branchstable
changeset 32572 377c74ef008d
parent 31952 a34b5e7c6683
child 32652 9929af2b09b4
child 33634 53224b1ffbc2
--- a/mercurial/util.py	Fri May 26 19:33:20 2017 -0700
+++ b/mercurial/util.py	Wed May 31 23:44:33 2017 +0900
@@ -65,6 +65,9 @@
 urlreq = pycompat.urlreq
 xmlrpclib = pycompat.xmlrpclib
 
+# workaround for win32mbcs
+_filenamebytestr = pycompat.bytestr
+
 def isatty(fp):
     try:
         return fp.isatty()
@@ -1224,7 +1227,7 @@
     for n in path.replace('\\', '/').split('/'):
         if not n:
             continue
-        for c in pycompat.bytestr(n):
+        for c in _filenamebytestr(n):
             if c in _winreservedchars:
                 return _("filename contains '%s', which is reserved "
                          "on Windows") % c