# HG changeset patch # User Adrian Buehlmann # Date 2011-04-16 18:08:43 # Node ID d2d1ef6a5238848e38f7acb583bd74862d2eeb91 # Parent 3c2f9f611ef6cc80157f3066045eccefce5a4f55 checkwinfilename: use %r in format string diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -517,7 +517,7 @@ def checkwinfilename(path): >>> checkwinfilename("foo/bar/bla:.txt") "filename contains ':', which is reserved on Windows" >>> checkwinfilename("foo/bar/b\07la.txt") - "filename contains '\\x07', which is invalid on Windows" + "filename contains '\\\\x07', which is invalid on Windows" >>> checkwinfilename("foo/bar/bla ") "filename ends with ' ', which is not allowed on Windows" ''' @@ -529,7 +529,7 @@ def checkwinfilename(path): return _("filename contains '%s', which is reserved " "on Windows") % c if ord(c) <= 31: - return _("filename contains '%s', which is invalid " + return _("filename contains %r, which is invalid " "on Windows") % c base = n.split('.')[0] if base and base.lower() in _windows_reserved_filenames: