我有一个名为“project”的Subversion存储库中的“docs”文件夹。 我得出结论,它应该真的保存在一个名为“project_docs”的单独的Subversion存储库中。
我想将“docs”文件夹( 及其所有修订版本 )移动到“project_docs”存储库。 有没有办法做到这一点?
I have a "docs" folder in a Subversion repository named "project". I've come to the conclusion that it should really be kept under a separate Subversion repository named "project_docs".
I'd like to move the "docs" folder (and all of its revisions) to the "project_docs" repository. Is there a way to do this?
最满意答案
如果您可以访问存储库本身(而不是工作副本),则应该能够转储当前的存储库,将其过滤到仅包含有关文档文件夹的信息,并将其加载到其他存储库中。
会是这样的:
svnadmin dump /svn/old_repos > ./repository.dump svndumpfilter include path/to/docs --drop-empty-revs --renumber-revs --preserve-revprops < ./repository.dump > ./docs_only.dump svnadmin load /svn/new_repos < ./docs_only.dump无法访问存储库,您无法维护修订历史记录,您必须解决将文件复制到新存储库并提交。
If you have access the repository itself (not a working copy), you should be able to dump the current repository, filter it to only include information about the docs folder, and load it into the other repository.
Would be something like this:
svnadmin dump /svn/old_repos > ./repository.dump svndumpfilter include path/to/docs --drop-empty-revs --renumber-revs --preserve-revprops < ./repository.dump > ./docs_only.dump svnadmin load /svn/new_repos < ./docs_only.dumpWithout access to the repository, you cannot maintain the revision history and you have to settle for copying the files into the new repository and committing.
更多推荐
发布评论