开发者

Help with svn move'ing multiple directories to trunk?

开发者 https://www.devze.com 2023-01-26 02:53 出处:网络
I forgot to create branches, tags and trunk when I made my repo. So right now my repo looks like this:

I forgot to create branches, tags and trunk when I made my repo. So right now my repo looks like this:

application
library
开发者_StackOverflow社区public
soap

and those directories all have subdirectories and hundreds of files. I would like to move these 4 directories into trunk.

I am aware of svn move but I really don't want to mess my repo up. How should I use the command in this circumstance?


Just use

svn move svn://path/dir1 svn://path/dir2 [...] svn://path/trunk/

Don't worry about messing anything up, you can always revert the change by just going back to a previous revision.


As an addition to the two good answers you already have:

Commands like svn move work with either URLs into your repository or a paths into your working copy, and you can even mix these. When the target is an URL, everything is done on the repository right away (you might want to pass a commit message then). When the target is a path into your working copy, the operation is only done in your working copy and you will need to commit it to the repository later.

With wc paths, you have room for mistakes, because you can always revert local changes.


You can use svn move and friends pretty much as you would expect:

svn mkdir http://example.com/svn/someproject/trunk -m "created trunk folder"
svn move http://example.com/svn/someproject/application http://example.com/svn/someproject/trunk -m "moved application folder to trunk"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号