views:

394

answers:

5

I am hashing out our structure for Subversion and have the standard structure that I think most people use which is using one repository and multiple folders for each project:

MainRepository
    Project1
       branches
       trunk
       tags
    Project2
       branches
       trunk
       tags
..and so on

My question is, do I need a trunk, branches, and tags folder for the root MainRepository? Why would you if you're checking out from the trunk of lets say Project1. I don't know if I need one or why you'd need a trunk folder or others in the actual root of the repo.

MainRepository
    Project1
       branches
       trunk
       tags
    Project2
       branches
       trunk
       tags
    ...
trunk
branches
tags
+2  A: 

The SVN book recommends putting trunk/tags/branches either in root directory or in projects subdirectories... but not both at the same time.

But... this is actually only a convenction. SVN simply treats them as simple tree structure with no assigned meaning. If you think you need them, use them.

liori
+3  A: 

You actually don't 'need' it. It's up to you (and your projects) what you need. A trunk folder in the root makes sense when you use a repo for each project instead of one repo for many projects, in which case you don't need a trunk folder in the root folder.

dkson
A: 

Up to you. We use separate repos for each project as the extra isolation this gives us is useful: prevents rookie mistakes of checking out every project rather than the project they need.

Chris J
A: 

Trunk/Branches/Tags in the root of the repository might make sense if you have some code or collateral that is common to all of your projects. For example, some shared libraries or perhaps specs/PDFs/.DOCs, etc. that don't neatly fit into one of your other projects.

Other than that, I don't see a reason to have Trunk/Branches/Tags in the root.

William Leara
A: 

Not sure about the trunk, but you may want a tags and branches. Let's say you are working on a defect that spans multiple projects. You would want a single branch that has the state of all the projects. Also, you may want to tag all of the Projects for major (and minor) releases if they interact.

Robert