Recalculate checksum in SVN dump after manual changes

北城以北 提交于 2019-12-10 09:14:40

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/3886515/recalculate-checksum-in-svn-dump-after-manual-changes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!