使用 bzr/git/hg 将 SVN 存储库移动到另一个存储库中的子目录
我有 2 个存储库,我想将其合并为一个,因为项目应该放在一起。 它们看起来像这样:
Repo1
--branches
--tags
--trunk
--Projects
--Project1
--
Repo2
--branches
--tags
--trunk
--Project2
我想最终得到这样的结果:
Repo1
--branches
--tags
--trunk
--Projects
--Project1
--Project2
基本上将 Project2 移动到 Repo1,同时保留其历史记录(尽管对分支不感兴趣)。
我认为这可以通过 svnadmin 和 svndumpfilter 来完成,但我的 svn 管理员说他不想惹麻烦,我应该提交最新版本:(
我可以通过使用 bzr 或 git 或 hg 克隆 Repo2 来解决这个问题吗将其推送到正确目录中的 Repo1 吗?
我对任何 DVCS 都不熟悉,因此欢迎使用其中任何一个命令来执行此操作。
I have 2 repos that I would like to merge into one as the projects should be together.
They look something like this:
Repo1
--branches
--tags
--trunk
--Projects
--Project1
--
Repo2
--branches
--tags
--trunk
--Project2
I want to end up with something like this:
Repo1
--branches
--tags
--trunk
--Projects
--Project1
--Project2
Basically move Project2 into Repo1 whilst keeping its history (not interested in branches though).
I think that this could be done with svnadmin and svndumpfilter but my svn admin says he doesn't want the hassle and that I should just commit the latest revision :(
Can I get around this by using bzr or git or hg to clone Repo2 then push it to Repo1 in the correct directory?
I'm not familiar with any of the DVCSs, so commands to do it with any of them are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为尝试将 bzr/git/hg 添加到混合中只会让事情变得更加复杂。任何方法都要求您从存储库中提取每个修订版本,现有工具希望您可以直接访问存储库文件。如果你的 svn 管理员不会为你做这件事,你至少可以访问存储库文件,以便你可以自己运行 svndumpfilter 吗?
如果您无法访问存储库文件,则您可能只能靠自己,因为您真正的问题是管理员不合作,而不是缺乏工具。在这种情况下,我能想到的选项是编写一个脚本来检查每个修订并将其提交到新的存储库,但这可能会变成一个比您计划的更大的项目。
I think trying to add bzr/git/hg into the mix will only make things more complicated. Any approach requires that you pull every revision from the repository, which existing tools expect you have direct access to the repo files. If your svn admin won't do it for you, can you at least get access to the repo files so you can run svndumpfilter yourself?
If you can't get access to the repo files, you're probably on your own since your real problem is an uncooperative admin, not a lack of tools. In that case, the option I can think of is to write a script that checks out each revision and commits it to the new repository, but that will probably turn into a bigger project than you planned on.