合并多个 SVN 项目
我正在为一个项目管理一个 svn 存储库,该项目的源代码不是通过单个顶级目录导入的。 结果,大约有 15 个独立的“项目”,而不是一个。 如何将这些合并到一个文件夹中,同时保留更改历史记录?
*提示:svn move 在这种情况下不起作用。
[编辑] 糟糕,将多个 SVN 存储库合并为一个
I'm administering a svn repo for a project where the source wasn't imported with a single top level directory. As a result, there are about 15 separate 'projects' instead of one. How can I merge these into one folder while maintaining the change history?
*hint: svn move doesn't work in this case.
[edit]
whoops, dupe of Combining multiple SVN repositories into one
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不关心保留其中一个存储库的所有历史记录,则可以在一个项目的存储库下创建一个新目录,然后导入另一个。
如果您关心保留两者的历史记录,那么您可以使用“svnadmin dump”转储一个存储库,并使用“svnadmin load”将其加载到另一个存储库中。 修订版本号将会关闭,但您仍然会拥有历史记录。
从这里复制: http://subversion.tigris.org/faq.html#multi-合并
If you don't care about retaining all the history of one of the repositories, you can just create a new directory under one project's repository, then import the other.
If you care about retaining the history of both, then you can use 'svnadmin dump' to dump one repository, and 'svnadmin load' to load it into the other repository. The revision numbers will be off, but you'll still have the history.
Copied from here: http://subversion.tigris.org/faq.html#multi-merge
也许我已经太多地使用分布式版本控制锤了,此时我看到的只是分布式钉子。 但我不得不再次说,这可能是DVCS的工作。
我会尝试使用 git-svn 或类似的东西。 将每个“项目”导入到其自己的 git 存储库中,然后将它们相互 git pull 。 解决所有冲突,并在完成所有操作后,将历史记录导入回 Subversion。
但无论如何,在完成合并所有存储库后,您的团队可能最好只使用分布式控制......
Maybe I've been working too much with the distributed version control hammer and all that I see at this point are distributed nails. But I once again have to say that this is probably a job for DVCSs.
I would try messing around with git-svn or something like that. Import each "project" into its own git repository and them git pull from one another. Resolve any conflicts and, after everything is done, import the history back into Subversion.
But your team may be better off just using the distributed control after you finish merging all the repos anyway...
您可以创建一个新的顶级项目,使用 svn:externals 指向所有其他项目并将它们放置在适当的子目录中。
You could create a new top-level project that uses svn:externals to point to all the other projects and places them in appropriate subdirectories.
svn propedit svn:externals top_dir
).