changeset 13947:d2d1ef6a5238

checkwinfilename: use %r in format string
author Adrian Buehlmann <adrian@cadifra.com>
date Sat, 16 Apr 2011 20:08:43 +0200
parents 3c2f9f611ef6
children 3fc5420016cc
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Sun Apr 17 02:15:47 2011 +0800
+++ b/mercurial/util.py	Sat Apr 16 20:08:43 2011 +0200
@@ -517,7 +517,7 @@
     >>> 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 @@
                 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: