SVN 在现有存储库上创建主干目录 [英] SVN creating trunk directory on existing repository

查看:28
本文介绍了SVN 在现有存储库上创建主干目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个没有主干/分支/标签目录结构的项目 - 即.一切都在 svn 存储库的根目录中.

I am working a project that does not have a trunk / branches / tags directory structure - ie. everything is in the root of the svn repo.

我想在根目录下创建一个trunk目录,并将根目录下的所有东西都移动到新的trunk目录中.

I would like to create a trunk directory and in the root directory, and move everything in the root directory into the new trunk directory.

最好的方法是什么?

我首先考虑的是

svn mkdir trunk
(for each file or directory that is not called trunk: )
svn mv FILEorDIR trunk/

但这会有效地删除每个文件,然后再次添加.有没有更好的办法?

But this effectively deletes every file and then adds it again. Is there a better way?

谢谢.

推荐答案

这与我过去的做法类似.您的解决方案实际上复制每个文件,然后删除原始文件.由于 Subversion 实现副本的方式,每个文件的历史记录都会被保留.

This is similar to the way I've done it in the past. Your solution actually copies each file, then deletes the original. Because of the way Subversion implements copies, the history for every file is preserved.

执行此操作后,您可以使用 svn switch 将现有结帐点指向新位置.

After doing this, you can point existing checkouts at the new location using svn switch.

这篇关于SVN 在现有存储库上创建主干目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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