[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] for #2441

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-01-05 13:17:01 CET

Hi All,
This patch gives the error message in the cases mentioned by the issue
#2441 with a corresponding header key and the reason, this might help
the user to go back and verify what went wrong.

Not sure whether it needs a testcase.

With regards
Kamesh Jayachandran
P.S Can someone apply my earlier patches for #699 and #2440, I did not
hear anything about that for quite sometime.

[[[
Fix issue #2441, 'svnadmin load' malformed dumpfile errors are
intolerably vague

* subversion/libsvn_repos/load.c
  (read_header_block): Error message is made to give the hint to the
user with a
  problematic header keyword.

]]]

Index: subversion/libsvn_repos/load.c
===================================================================
--- subversion/libsvn_repos/load.c (revision 17989)
+++ subversion/libsvn_repos/load.c (working copy)
@@ -153,9 +153,11 @@
       while (header_str->data[i] != ':')
         {
           if (header_str->data[i] == '\0')
- return svn_error_create (SVN_ERR_STREAM_MALFORMED_DATA, NULL,
+ return svn_error_createf (SVN_ERR_STREAM_MALFORMED_DATA, NULL,
                                      _("Found malformed header block "
- "in dumpfile stream"));
+ "near the line starting with a key %s "
+ "with no : character "
+ "in dumpfile stream"), header_str->data);
           i++;
         }
       /* Create a 'name' string and point to it. */
@@ -165,9 +167,11 @@
       /* Skip over the NULL byte and the space following it. */
       i += 2;
       if (i > header_str->len)
- return svn_error_create (SVN_ERR_STREAM_MALFORMED_DATA, NULL,
+ return svn_error_createf (SVN_ERR_STREAM_MALFORMED_DATA, NULL,
                                  _("Found malformed header block "
- "in dumpfile stream"));
+ "near the line starting with a key %s " \
+ "with no value after a : character " \
+ "in dumpfile stream"), header_str->data);
 
       /* Point to the 'value' string. */
       value = header_str->data + i;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 5 13:17:04 2006

This is an archived mail posted to the Subversion Dev mailing list.