diff mercurial/util.py @ 32652:9929af2b09b4

merge with stable
author Augie Fackler <augie@google.com>
date Sat, 03 Jun 2017 16:33:28 -0400
parents 3b8155305fbe 377c74ef008d
children 77f354ae1123
line wrap: on
line diff
--- 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