如何从 SVN 存储库中删除顶级目录而不丢失历史记录?
我有一个具有以下布局的 SVN 存储库:
trunk/somedir/a
/b
/[et cetera]
branches/branch1/somedir/a
/b
/[et cetera]
branches/branch2/somedir/a
/b
/c
整个存储库中有大约 60 个分支和大约 17000 个修订。不幸的是,本地惯例是将 svn:mergeinfo 信息保存在 somedir 目录中,而不是分支的根目录中。这在尝试使用 Fisheye 等解析工具以及 git svn 和 hg Convertextension 等迁移工具时造成了一些困难。
当然,我可以使用 svn move 并正确地重新排序所有内容 - 但我真的很想在历史上做到这一点,以便转换工具能够更正常地工作。我是否必须为此编写一个自定义工具,或者有没有办法使用 svnadmin 和 svndumpfilter 来执行此操作?
I have a SVN repository with the following layout:
trunk/somedir/a
/b
/[et cetera]
branches/branch1/somedir/a
/b
/[et cetera]
branches/branch2/somedir/a
/b
/c
where there are ~60 branches and about 17000 revisions in the whole repository. Unfortunately, local convention has been to keep svn:mergeinfo
information on the somedir
directories, rather than the root of the branch. This has created some difficulties when trying to use parsing tools like Fisheye, and migration tools like git svn
and the hg convertextension.
I can, of course, use svn move
and reorder everything correctly - but I'd really like to do that over history, so that the conversion tools work more sanely. Do I have to write a custom tool for this, or is there a way to do this with svnadmin
and svndumpfilter
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
svn move 可以处理历史记录。但分支之间的合并将变得困难。 (找出为什么移动和重命名在 svn 中会出现问题)。
我有类似的问题,我等到那一刻只有主干和重新组织的存储库结构。
合并信息(您可以将合并信息从某个目录复制到主干。这只是 svn 属性。
我还没有尝试过 svnadmin 工具,如果您成功了,请现在告诉我:)
svn move is ok with history. But merges between branches will became difficult. (find why moves and renames are problematic in svn).
I have similar problem and I wait until there was only trunk and reorganized repository structure in that moment.
Merge-info (you can copy merge info from somedir to trunk. It is just svn properties.
I havent tried svnadmin tools, if You have succed with it let me now :)