checkwinfilename: use %r in format string
authorAdrian Buehlmann <adrian@cadifra.com>
Sat, 16 Apr 2011 20:08:43 +0200
changeset 13947 d2d1ef6a5238
parent 13946 3c2f9f611ef6
child 13948 3fc5420016cc
checkwinfilename: use %r in format string
mercurial/util.py
--- 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: