Aaron Weeden
Aaron Weeden

Reputation: 21

svn: E200030: database disk image is malformed

Occasionally I will try to commit a file and receive the error:

Transmitting file data .svn: E200030: Commit failed (details follow):
svn: E200030: database disk image is malformed

This answer recommends running the following:

$ sqlite3 .svn/wc.db "pragma integrity_check"

I do this and simply get the following:

ok

The same answer recommends checking out a fresh copy into a different directory, than copying the .svn directory back into the current directory. I also try this, but get the same error:

$ svn co $URL /tmp/svn-tmp
$ rm -rf .svn
$ cp -r /tmp/svn-tmp/.svn .
$ svn ci -F svn-commit.txt
Transmitting file data .svn: E200030: Commit failed (details follow):
svn: E200030: database disk image is malformed

I can usually track down the problem to a single file that I am trying to commit, and it is often a single character in that file that needs to be deleted or replaced; often it is whitespace. This happens even if files are only edited on OS X and Linux, not Windows. The issue happens on different systems and different versions of SVN (1.7 and 1.8).

Most recently I noticed that if I tried to make the same change (replace the number 3 with the number 4) to the same file (a package.json) on two different systems (one OS X, one Linux) and two different versions of SVN (1.8 and 1.7 respectively), the issue happened in both cases.

Is there anything else I can do to try to diagnose these issues?

Upvotes: 2

Views: 11595

Answers (1)

unJordi
unJordi

Reputation: 111

This has been asked before:

svn cleanup: sqlite: database disk image is malformed

The answer there is:

You do an integrity check on the sqlite database that keeps track of the repository (/.svn/wc.db):

sqlite3 .svn/wc.db "pragma integrity_check"

That should report some errors.

Then you might be able to clean them up by doing:

sqlite3 .svn/wc.db "reindex nodes"
sqlite3 .svn/wc.db "reindex pristine"

If there are still errors after that, you still got the option to check out a fresh copy of the repository to a temporary folder and copy the .svn folder from the fresh copy to the old one. Then the old copy should work again and you can delete the temporary folder.

Upvotes: 3

Related Questions