py3: manually escape control character to be embedded in win filename error
authorYuya Nishihara <yuya@tcha.org>
Wed, 27 Sep 2017 19:11:28 +0900
changeset 34360 f435097d13c9
parent 34359 ee10eb665036
child 34361 7508a7dc95c1
py3: manually escape control character to be embedded in win filename error
mercurial/util.py
--- 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 "