svn: malformed file recovery

2005 Feb 17 at 07:07 » Tagged as :

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: