Overcoming SVN database corruption
I think one of my find and replace commands went astray and screwed up svn's files, making it impossible to commit. One way to overcome this is to delete your working copy and checkout anew. But I had lots of local modifications.
Transmitting file data ....................svn: Commit failed (details follow): svn: Checksum mismatch for '/home/ian/Work/main/trunk/.svn/text-base/foo.js.svn-base'; expected 'aa8e8c396d0f16dec2d807ec5ac2623f', actual: '51114bc6389fa5e9748565443c7b625d'
This svn-base file is just a copy of the latest revision from the repo. So you can get the prisitine file from svn:
$ wget https://svn.example.com/main/trunk/foo.js -o main/trunk/.svn/text-base/foo.js.svn-base --user=ian --password=god
You might also just edit the file to fix it, eg. if svn isn't easily available with wget. To check if the file is acceptably fixed:
$ md5sum main/trunk/.svn/text-base/foo.js.svn-base aa8e8c396d0f16dec2d807ec5ac2623f /home/ian/Work/main/trunk/.svn/text-base/foo.js.svn-base
Which should match with the hash svn was expecting.
Leave a Reply