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

查看:96
本文介绍了如何将单个文件夹从一个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?

推荐答案

如果您可以访问存储库本身(而不是工作副本),则应该能够转储当前存储库,对其进行过滤以仅包含有关docs文件夹的信息,然后将其加载到其他存储库中。

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天全站免登陆