如何将标签/主干/分支添加到已建立的 SVN 存储库?

问题描述:

假设您有一个已建立的 SVN 存储库,其中包含数百个修订版,并且已经存在一年多了.存储库没有顶层的标准标签、主干和分支.相反,它只是直接进入代码.

Lets say you have an established SVN repository with many hundreds of revisions and has been around for upwards of a year. The repository does not have the standard tags, trunk and branches at the top level. Instead it just goes straight into the code.

有没有办法将 tagstrunkbranches 添加到*存储库中,而无需检查整个存储库,改变目录结构然后提交?无论如何要递归添加它,以便如果您想查看一年前曾经在这里的文件:

Is there a way to add in tags, trunk and branches to the repository on the top level without just checking out the entire repository, altering the directory structure and then committing? Is there anyway to add it in recursively so that if you wanted to view a file from a year ago that used to be here:

svn://svn.server.com/myfolder/myfile.txt

相反,你会在这里看到它

instead you would see it here

svn://svn.server.com/trunk/myfolder/myfile.txt

这可能吗?还是我只需要检查所有内容,更改顶部的目录结构并提交整个内容?

Is this possible? Or do I just have to check everything out, alter the dir structure at the top and commit the whole thing?

我相信递归执行此操作的唯一方法是使用 svnadmin 转储,更改转储文件,然后导入到干净的存储库.

I believe the only way to do this recursively would to use svnadmin dump, alter the dump file, then import to a clean repo.