手动更改后重新计算 SVN 转储中的校验和
当我们将项目迁移到公共源托管时,我想从 SVN 存储库中删除一些“个人”信息。到目前为止,我使用 svndumptool
和 删除路径或修订版本做得很好svndumpfilter
。不过,我也想从存储库中的特定文件中删除一些文本。
我通过对转储进行正则表达式手动删除文本,效果很好,但是当我想使用转储时,我得到了校验和不匹配的结果。这显然是因为我更改了文件但没有更新校验和。
是否有任何工具可以重新计算转储中文件的校验和?或者是否有一个好的文件编辑工具(应该允许正则表达式替换)在svn转储中也更新校验和?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我不想再等待答案,所以我自己写了一个脚本,我将与大家分享。它利用 SvnDumpTool,或者更确切地说是它的库。要执行自定义操作,您需要编辑源代码(并且了解一点Python)。其中包含一个简单的示例,我认为该脚本提供的抽象非常好。
不管怎样,希望它对你和对我一样有用,尽管我花了很长时间才让它像这样工作:
SvnDumpToolEdit.py 在 Github 上。
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.