有没有一种干净的方式将/移动到/trunk? [英] Is there a clean way to move / to /trunk?
问题描述
我错误地创建了一个没有通常的 trunk
、branches
和 tags
目录的 Subversion 存储库.即项目的根目录映射到存储库的根目录.现在我想创建一个功能分支,但是没有好地方放它.我想做的是将 /
移动到 /trunk
,保留其属性和历史.我不走运吗?
I made the mistake of creating a Subversion repository without the usual trunk
, branches
, and tags
directories. That is, the root directory of the project maps to the root directory of the repository. Now I want to create a feature branch, but there's no good place to put it. What I'd like to do is move /
to /trunk
, preserving its properties and history. Am I out of luck?
推荐答案
干净的方法是使用 svnadmin
使用
The clean way to do this is using svnadmin
to dump out the whole repository using
svnadmin dump
然后以trunk目录为根目录创建一个新的仓库,并用
Then create a new repository with the trunk directory at the root, and reload the dump with
如果您执行 svn move ,那么如果您在移动前更新回修订版,那将会把事情搞砸,因为文件将移回以前的位置,这可能不是您想要的.
If you do an svn move then that will mess things up if you ever update back to a revision before the move, since the files will move back to their previous location, which is probably not what you want.
这篇关于有没有一种干净的方式将/移动到/trunk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!