mercurial/loggingutil.py
changeset 46892 4a6024b87dfc
parent 43077 687b865b95ad
child 48875 6000f5b25c9b
--- a/mercurial/loggingutil.py	Thu Apr 08 14:38:27 2021 +0200
+++ b/mercurial/loggingutil.py	Wed Mar 31 17:54:02 2021 -0400
@@ -10,7 +10,10 @@
 
 import errno
 
-from . import pycompat
+from . import (
+    encoding,
+    pycompat,
+)
 
 from .utils import (
     dateutil,
@@ -32,7 +35,7 @@
             if err.errno != errno.ENOENT:
                 ui.debug(
                     b"warning: cannot remove '%s': %s\n"
-                    % (newpath, err.strerror)
+                    % (newpath, encoding.strtolocal(err.strerror))
                 )
         try:
             if newpath:
@@ -41,7 +44,7 @@
             if err.errno != errno.ENOENT:
                 ui.debug(
                     b"warning: cannot rename '%s' to '%s': %s\n"
-                    % (newpath, oldpath, err.strerror)
+                    % (newpath, oldpath, encoding.strtolocal(err.strerror))
                 )
 
     if maxsize > 0: