Search code examples
svnsvndump

Recalculate checksum in SVN dump after manual changes


As we are migrating with a project to a public source hosting, I wanted to remove some “personal” information from the SVN repository. I did fine so far with removing paths or revisions using svndumptool and svndumpfilter. However I want to remove some text from a particular file in the repository as well.

I removed the text manually by regex’ing the dump and that worked fine, but when I want to use the dump, I get a checksum mismatch. This is obviously because I changed the file but didn't update the checksum.

Is there any tool that recalculates the checksum for the files in a dump? Or is there a good editing tool for files (should allow regex replacements) inside a svn dump that also updates the checksum?


Solution

  • Okay, I didn't want to wait longer for answers, so I wrote a script myself, which I will share with you. It utilizes SvnDumpTool, or rather its library. To do custom actions you are required to edit the source (and know a bit python). A simple example is included and I think the abstraction the script provides is quite good.

    Anyway, hope it is as useful for you as it was for me, although it took me quite a while to get it working like that:

    SvnDumpToolEdit.py on Github.