mercurial/dispatch.py
changeset 34022 d5b2beca16c0
parent 33620 cc047a733f69
child 34087 5361771f9714
--- a/mercurial/dispatch.py	Wed Aug 30 14:04:55 2017 -0700
+++ b/mercurial/dispatch.py	Tue Aug 22 20:03:07 2017 -0400
@@ -88,7 +88,8 @@
             status = -1
     if util.safehasattr(req.ui, 'ferr'):
         if err is not None and err.errno != errno.EPIPE:
-            req.ui.ferr.write('abort: %s\n' % err.strerror)
+            req.ui.ferr.write('abort: %s\n' %
+                              encoding.strtolocal(err.strerror))
         req.ui.ferr.flush()
     sys.exit(status & 255)
 
@@ -676,7 +677,7 @@
             wd = pycompat.getcwd()
         except OSError as e:
             raise error.Abort(_("error getting current working directory: %s") %
-                              e.strerror)
+                              encoding.strtolocal(e.strerror))
     path = cmdutil.findrepo(wd) or ""
     if not path:
         lui = ui