changeset 34361:f435097d13c9

py3: manually escape control character to be embedded in win filename error
author Yuya Nishihara <yuya@tcha.org>
date Wed, 27 Sep 2017 19:11:28 +0900
parents ee10eb665036
children 7508a7dc95c1
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Wed Sep 27 19:08:23 2017 +0900
+++ b/mercurial/util.py	Wed Sep 27 19:11:28 2017 +0900
@@ -1334,8 +1334,8 @@
                 return _("filename contains '%s', which is reserved "
                          "on Windows") % c
             if ord(c) <= 31:
-                return _("filename contains %r, which is invalid "
-                         "on Windows") % c
+                return _("filename contains '%s', which is invalid "
+                         "on Windows") % escapestr(c)
         base = n.split('.')[0]
         if base and base.lower() in _winreservednames:
             return _("filename contains '%s', which is reserved "