如何将单个文件夹从一个Subversion存储库移动到另一个存储库?(How do I move a single folder from one Subversion repository to a

编程入门 行业动态 更新时间:2024-10-27 19:21:37
如何将单个文件夹从一个Subversion存储库移动到另一个存储库?(How do I move a single folder from one Subversion repository to another repository?)

我有一个名为“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.dump

Without 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.

更多推荐

本文发布于:2023-07-31 00:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340421.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   文件夹   Subversion   move   folder

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!