# svn - trunk in all the wrong places



## dvl@ (Jan 20, 2014)

Hi,

I converted a cvs repo to svn a few months back. It looks like this


```
project
  www
    branches
    tag
    trunk
  config
    branches
    tag
    trunk
...etc
```

The problem? Checking out the repo is a multi-step process.


```
svn co project/www/trunk
svn co project/config/trunk
```

What I want to do is:

`svn co project/trunk`

I'm thinking about `svn merge` and maybe `svn cp`.  Preserving history is a good thing.

I could create a new project, and then `svn cp` the above.

NOTE: there are no branches which need to be preserved.



Ideas?  Suggestions?  Any suggestions as to how to get to that point?


----------



## trh411 (Jan 22, 2014)

It seems a structure like:

```
projects
    project1
        trunk
            config
            www
        branches
        tags
    project2
        etc.
```
would better suite your needs. With this structure you could easily checkout project1/trunk and get all the code associated with that project in a single working copy, which I think is what you want.

You can easily restructure your existing repository using the `svn mkdir`. `svn mv`, and `svn delete` commands. Or as an alternative, you could create a whole new projects-new with the correct structure and move your existing stuff accordingly, and then just rename it when you're done.


----------



## dpejesh (Jan 22, 2014)

Have a look at http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html.  It might suit your needs depending on how your projects are setup.  In short, you could setup an external in your www project which will automatically checkout your config project into it.


----------



## dvl@ (Jan 23, 2014)

I have used external before, but someone else had set them. I was able to figure out how to do that with this URL: http://beerpla.net/2009/06/20/how-to-pr ... mand-line/ (I had searched for: defining svn externals

I'll see how this goes.  I have some work backlogged, so I should get to this soon.


----------



## dvl@ (Jan 23, 2014)

Initial impressions:

- you have to be in the external dir to do a commit (that is, you can't just commit everything in one go)
- that can mean several cd dir; svn ci; cd ../dir2; svn ci


----------

