PositiveGuy
PositiveGuy

Reputation: 47763

Trunk folder for Repository?

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

Upvotes: 6

Views: 6643

Answers (5)

liori
liori

Reputation: 42307

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

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

Upvotes: 5

Robert Deml
Robert Deml

Reputation: 12532

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.

Upvotes: 1

William Leara
William Leara

Reputation: 10697

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.

Upvotes: 1

Callie J
Callie J

Reputation: 31306

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.

Upvotes: 1

sloth
sloth

Reputation: 101092

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.

Upvotes: 7

Related Questions