This is how I recovered from an svn: malformed file error. Beware that this solution may not work for you, it may even result in your dog catching the flu.
First a bit of background: In my case the repository is of the fsfs type and not the bdb type. When I first encounterd this error yesterday, i tried the standared remedies like restoring from a previous backup (svnadmin recover) to no avail. I should have known that recover is not going to work because it’s supposed to work with dbd files. Then I reckoned that the revision file in the db/revs folder may be corrupted. I was nearly right.
The error infact turned out to be in db/revprops/122 (122 being the offending revision). The file looks like this:
K 10 svn:author V 4 root K 8 svn:date V 27 2004-12-06T05:46:48.595893Z K 7 svn:log V 52 sftp: Added the code from the earlier work into the branch END
the V 52 – is supposed to be the length of the comment. If you look closely you will see that the 52 does not match the number of characters on the comment line. The remedey then is to open this file in your favorite text editor and either change the V 52 to the correct value or to change the comment. That’s all.




man this was a perfect post. in my case, i had edited the revprops as well, and there was blank line at the EOF. i took a look at the file after reading this, edited the file and KABLAM, this was a worthy post and glad i could find it to fix my issue.
Regards,
DosDawg
Terabyte Hosting Solutions, LLC
Thanks for this post, I had edited my svn:ignore line in dir-props but had not changed the line character count, and this put me on the right track to fix it. Yeah!
Thanks for the number of characters hint, life saver