Recalculate checksum in SVN dump after manual changes

When we migrated with the project to a shared hosting, I wanted to delete some โ€œpersonalโ€ information from the SVN repository. I still did this with deleting paths or revisions with svndumptool and svndumpfilter . However, I also want to delete text from a specific file in the repository.

I deleted the text manually by re-creating the dump, and it worked fine, but when I want to use the dump, I get a checksum mismatch. This is obviously because I modified the file but did not update the checksum.

Is there any tool that recounts the checksum for files in the dump? Or is there a good tool for editing files (should allow the replacement of regular expressions) inside the svn dump, which also updates the checksum?

+3
source share
1 answer

Well, I didnโ€™t want to wait for an answer anymore, so I wrote the script itself, which I will share with you. It uses SvnDumpTool , or rather its library. To perform custom actions, you need to edit the source code (and know a little python). A simple example is included, and I think the abstraction provided by the script is not bad.

In any case, I hope this is as useful to you as it is to me, although it took me a while to get it to work like this:

SvnDumpToolEdit.py on Github.

+2
source

Source: https://habr.com/ru/post/946802/


All Articles