如何批量重写SVN日志?

发布于 2024-12-07 10:38:20 字数 359 浏览 0 评论 0原文

我需要对更改我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不奢求什么 2024-12-14 10:38:20

有吗有一种方法可以通过整个存储库历史记录更改 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.

子栖 2024-12-14 10:38:20

您可以使用 svnadmin setrevprop 来实现此目的。在 Linux 中:

svnadmin setrevprop -r1 MyRepoDir svn:author <(echo -n NewAuthor)

所以下一个问题是:如何获取旧作者:

svnlook author -r1 MyRepoDir

所以你基本上会从修订版 1 迭代到“最年轻的”版本,并在此过程中映射每个作者。我希望您不会像某些 Apache 存储库那样进行过多的修订。 :-)

You can use svnadmin setrevprop for that. In Linux speak:

svnadmin setrevprop -r1 MyRepoDir svn:author <(echo -n NewAuthor)

So the next question will be: How the get the old author:

svnlook author -r1 MyRepoDir

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. :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文