Changing directory structure in Subversion

How to create a branch in subversion that is deeper than just the branch directory?

I have a standard trunk , tags and branches structure, and I want to create a branch that contains several directories deeper than the 'branch' tag.

Using the standard svn move method, it gives me an error not found . I also tried to copy it to the branches folder, checked it and "svn moved" it to the tree structure that I wanted, but also got the error "administrator workspace".

What do I need to do to create this?

To illustrate, suppose I want to create a branch to go directly to 'branch / version_1 / project / subproject' (which does not exist yet)?

+6
branch svn trunk
source share
5 answers
 svn copy --parents http://url/to/subproject http://url/to/repository/branches/version_1/project/subproject 

This should create the directory in which you want to place the subproject ( --parents means "create intermediate directories for me").

+14
source share

Since subversion does not actually think of branches as anything special than other directories, you can always just create the directory tree you want (using svn mkdir) and then copy the code you want to the location of the tree .

Or just use the -parents flag denoted by @BlairC.

+3
source share

Secondly, using TortoiseSVN, just right-click on the directory and go to TortoiseSVN-> Branch / tag ... to quickly create a branch in the specified directory. Remember to specify the URL that you want it to appear in the "Branch (Tag / Tag)" dialog box that appears.

+2
source share

If you use TortoiseSVN , you can use its repository explorer to do such things. Makes everything pretty pretty WYSIWYG simple.

+1
source share

SVN really does not manage your branches. He just makes a bulk copy. It is up to you how you want to manage it.

+1
source share

All Articles