mercurial/util.py
changeset 32652 9929af2b09b4
parent 32546 3b8155305fbe
parent 32572 377c74ef008d
child 32746 77f354ae1123
--- a/mercurial/util.py	Thu Jun 01 08:31:21 2017 -0700
+++ b/mercurial/util.py	Sat Jun 03 16:33:28 2017 -0400
@@ -71,6 +71,9 @@
 urlreq = pycompat.urlreq
 xmlrpclib = pycompat.xmlrpclib
 
+# workaround for win32mbcs
+_filenamebytestr = pycompat.bytestr
+
 def isatty(fp):
     try:
         return fp.isatty()
@@ -1208,7 +1211,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