Subversion Checksum Problems

OK, so I didn’t quite make this up in one week, but I’ll keep trying. Here’s a tip for SVN users who get the dreaded “checksum mismatch” (usually by entirely replacing a file instead of editing it or something, actually I’m not quite sure what the exact cause is). There are already a couple workarounds on the Internet, but this one’s pretty clean.

  1. cp theFile theFile.bak
    Save your changes.

  2. svn info theFile | grep "Last Changed Rev"
    This is the last time the file changed in the repository; say it’s something like 6207.

  3. svn update -r6206 theFile
    Rollback…