diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py --- a/hgext/win32mbcs.py +++ b/hgext/win32mbcs.py @@ -156,7 +156,7 @@ funcs = '''os.path.join os.path.split os # because they expects argument is local encoded string and cause # problem with unicode string. rfuncs = '''mercurial.encoding.upper mercurial.encoding.lower - mercurial.pycompat.bytestr''' + mercurial.util._filenamebytestr''' # List of Windows specific functions to be wrapped. winfuncs = '''os.path.splitunc''' diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -65,6 +65,9 @@ urlerr = pycompat.urlerr urlreq = pycompat.urlreq xmlrpclib = pycompat.xmlrpclib +# workaround for win32mbcs +_filenamebytestr = pycompat.bytestr + def isatty(fp): try: return fp.isatty() @@ -1224,7 +1227,7 @@ def checkwinfilename(path): 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