如何批量重写SVN日志?
我需要对更改我的 SVN 存储库的用户名进行搜索/替换;我们正在进行一些组织更改,因此我需要将日志中各种更改的作者“fantasticMan”更改为“authorA”(仅作为示例)。
我的想法是 svn dump
然后对转储文件进行搜索/替换。问题是,第一次结账后,只能到达修订版 1;当我执行 svnadmin load
命令时,我收到此消息:svnadmin:转储流数据似乎格式错误
。我怀疑日志中存在一些校验和以确保转储文件的完整性,因此我不能只对转储文件进行搜索和替换。
如何更改存储库的作者姓名? (如果有一种方法可以做到这一点,而无需转储存储库然后重新加载转储,我更喜欢该解决方案。)
I need to do a search/replace over the names of users making changes to my SVN repository; we're making some organizational changes so I need to change 'fantasticMan' as the author of various changes in the log to 'authorA' (just an example).
My idea was to svn dump
and then do a search/replace over the dump file. The problem is that after the first checkout, it only gets to revision 1; when I was doing an svnadmin load
command I got this message: svnadmin: Dumpstream data appears to be malformed
. I suspect that there are some checksums in the log to ensure the integrity of the dumpfile so I can't just do a search and replace over the dumpfile.
How do I make changes on the author names of a repository? (If there's a way to do this without having to dump the repository and then reload the dump, I'd prefer that solution.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有吗有一种方法可以通过整个存储库历史记录更改 SVN 用户用户名吗?
使用 svndumptool 效果最好。 AH的方式会花费我更长的时间。
Is there a way to change a SVN users username through the entire repository history?
Using
svndumptool
works best. A.H.'s way would take me much longer.您可以使用 svnadmin setrevprop 来实现此目的。在 Linux 中:
所以下一个问题是:如何获取旧作者:
所以你基本上会从修订版 1 迭代到“最年轻的”版本,并在此过程中映射每个作者。我希望您不会像某些 Apache 存储库那样进行过多的修订。 :-)
You can use
svnadmin setrevprop
for that. In Linux speak:So the next question will be: How the get the old author:
So you will basically iterate from revision 1 up to "youngest" and map each author on the way. I hope for you, that you don't have as many revisions as some Apache repositories. :-)