svnbranchtrunk

Changing the Directory Structure in Subversion


How do I create a branch in subversion that is deeper' than just the 'branches' directory?

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

Using the standard svn move method, it gives me a folder not found error. I also tried copying it into the branches folder, checked it out, and the 'svn move' it into the tree structure I wanted, but also got a 'working copy admin area is missing' error.

What do I need to do to create this?

For the sake of illustration, let us suppose I want to create a branch to go directly into 'branches/version_1/project/subproject' (which does not exist yet)?


Solution

  • svn copy --parents http://url/to/subproject http://url/to/repository/branches/version_1/project/subproject
    

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