diff mercurial/util.py @ 13947:d2d1ef6a5238

checkwinfilename: use %r in format string
author Adrian Buehlmann <adrian@cadifra.com>
date Sat, 16 Apr 2011 20:08:43 +0200
parents bc32bb0e909f
children d13913355390
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: