如何从包含多个项目的 SVN 存储库中转储一个项目? [英] How do I dump one project out of an SVN repository which contains multiple projects?
问题描述
我正在使用包含许多项目的 SVN 存储库.我需要将一些项目从该存储库移到单独的存储库中,每个项目一个,保留历史记录.
I am working with an SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keeping the history.
我已经能够使用 svnadmin dump
转储整个存储库并 svnadmin 加载
到另一个存储库,但我找不到仅转储的方法来自原始存储库的一个项目,因此我可以将其加载到新存储库中.这可能吗?如果是这样怎么办?
I've been able to use svnadmin dump
to dump the entire repository and svnadmin load
it into another repository, but I can't find a way of dumping only one project from the original repository so I can load it into the new one. Is this possible? If so how?
推荐答案
您可以使用 svndumpfilter 实用程序来执行此操作.SVN 书有 很好的解释 如何做到这一点.
You can use the svndumpfilter utility to do this. The SVN book has a good explanation of how to do this.
例如,一种方法是:
$ svnadmin dump /path/to/repo
| svndumpfilter include /proj > dump-file
$ svnadmin create /new/proj/repo
$ svnadmin load --ignore-uuid /new/proj/repo < dump-file
$ svn rm file:///path/to/repo/proj
这篇关于如何从包含多个项目的 SVN 存储库中转储一个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!