4

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?

poke
  • 369,085
  • 72
  • 557
  • 602
  • Easy path: remove the file entirely, reinsert as fresh copy. – Wrikken Oct 07 '10 at 23:04
  • You mean adding it as a new revision to the end? I want to keep the history intact though. – poke Oct 07 '10 at 23:05
  • You could also simply run `sed '/Text-content-md5/d' dumpfile.txt | svnadmin load repo` to remove the checksum check for desired revisions. – bekce Mar 11 '17 at 14:11

1 Answers1

2

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.

poke
  • 369,085
  • 72
  • 557
  • 602