diff -r ee10eb665036 -r f435097d13c9 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 "