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

查看:18
本文介绍了如何将单个文件夹从一个 Subversion 存储库移动到另一个存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在名为project"的 Subversion 存储库中有一个docs"文件夹.我得出的结论是,它确实应该保存在一个名为project_docs"的单独 Subversion 存储库中.

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

我想将docs"文件夹(及其所有修订版)移至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?

推荐答案

如果您可以访问存储库本身(不是工作副本),您应该能够转储当前存储库,过滤它以仅包含有关文档的信息文件夹,并将其加载到另一个存储库中.

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.

应该是这样的:

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.

这篇关于如何将单个文件夹从一个 Subversion 存储库移动到另一个存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆