January 3rd, 2006
This entry was published quite a while back, so it may no longer be accurate. Reader beware!
Earlier today I needed to make a big big, very big SVN commit so I thought it would be smart to take a backup of the repository in case anything went wrong. And what do I get? Something going wrong, in the form of this weird message:
* Dumped revision 7. svn: Checksum mismatch on rep '1wx':
Just the sort of thing that makes you wonder whether maybe Subversion wasn't the way to go after all.
This is probably only a problem you'll run into if your repository is still using the BerkeleyDB storage format. Mine is, because that's what you get on Dreamhost. Fortunately, a solution for svn checksum mismatches exists. It goes like this:
db_dump -kp representations > representations.dump
((fulltext 1 7 (md5 16 \fa\85\a5\e3\bdN7\95\03\e8\baq0\ad\9cn)) w)Edit the part after '(md5 16 ' to 16 repeats of \00 - the all-zero checksum matches anything. "
db_load representations < representations.dump
In the process of figuring this process out, a couple things confused me:
Michael Stephenson of wordmap.com wrote in with some additional comments on spotting the offending checksums:
The first thing which was slightly different for us is that some of the md5sums are of the form:
xs4 ((fulltext 3 1n6 (md5 m\96\13\d0\16\82\82'uL\02\81\18\feG\d3)) 4 11yx)Which can safely be turned into:
xs4 ((fulltext 3 1n6 (md5 16 \00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00)) 4 11yx)And secondly some of the checksums were on delta lines, eg.
28p3 ((delta 0 (md5 16 W\7f!\f2x7E\d7\04\02\05\97\c4\ec(?)) (1 0 ((svndiff 1 0 4 2yc1)...Which can just go to:
28p3 ((delta 0 (md5 16 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00)) (1 0 ((svndiff 1 0 4 2yc1)...This seems to work and is pretty obvious but might help save someone else a few minutes.