SVN 在现有存储库上创建主干目录

编程入门 行业动态 更新时间:2024-10-28 00:24:08
本文介绍了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 在现有存储库上创建主干目录

本文发布于:2023-10-20 12:54:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1511025.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:主干   目录   SVN

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!