Tuesday, September 30, 2008

Found malformed header in revision file

The Problem
The client, browser, command line, etc returned the following error when attempting to access, update, check in, or any other svn command; "Found malformed header in revision file."

The apache error log contained the follow statements:
Could not fetch resource information
Could not open the root of the repository
Found malformed header in revision file.

I ran svnadmin verify repo_name and it returned the malformed header error on the last revision checked into the repository.

Solution
So here is what I ended up doing. I would like to find a way to fix the bad revision and save the check in. In the interest of time and work I chose a different solution. I am still looking into the problem and if I discover a way to fix the revision I will post again. So here it is....

svnadmin dump -r 1:lastgoodrevnumber repo_name > repo_name.dump
This dumps the content of the repository minus the bad revision. This worked for me since the bad revision number was the last revision number.

The command looks like this svnadmin dump -r 1:2742 vignette > vignette.dump

Then you need to create and load a new repository.

svnadmin create vignette_new

svnadmin load vignette_new < vignette.dump

2 comments:

Swe said...

Thanks alot dude. It saved my life. Really :)

Cavanman said...

Fantastic post - thanks you so much