[PATCH] manifest: improve error message about newlines in filenames

Greg Ward greg-hg at gerg.ca
Sat Apr 18 08:49:38 CDT 2009


# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1240062539 14400
# Node ID 5ae3bb2acf3b711edb239bdec1357d767c351cb6
# Parent  2075c4ca0f407c3e9d3fe0ff3e63f42c3bd2eae8
manifest: improve error message about newlines in filenames
by including the offending filenames.  Now this error message is
consistent with the same error issued by dirstate.py
(although there is still duplicate code).

diff -r 2075c4ca0f40 -r 5ae3bb2acf3b mercurial/manifest.py
--- a/mercurial/manifest.py	Sat Apr 18 09:44:51 2009 -0400
+++ b/mercurial/manifest.py	Sat Apr 18 09:48:59 2009 -0400
@@ -125,7 +125,7 @@
             for f in l:
                 if '\n' in f or '\r' in f:
                     raise error.RevlogError(
-                        _("'\\n' and '\\r' disallowed in filenames"))
+                        _("'\\n' and '\\r' disallowed in filenames: %r") % f)
 
         # if we're using the listcache, make sure it is valid and
         # parented by the same node we're diffing against


More information about the Mercurial-devel mailing list