Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Structure Subversion Repositories

Tags:

svn

I'm trying to figure out the best way to structure our Subversion Repositories initially.

So is it best practice to create an initial repository then sub repositories for each project underneath?

And which repositories should have a trunk, branch, etc. created?

Also, I hear it's best practice not to create a trunk, branch, and tags folders on the root level repository?

I know when I was on another team, we pulled lets say ProjectA but it did not pull down a trunk, branch folders which was nice but I do not know how this was structured on the server to make that happen like this.

like image 806
PositiveGuy Avatar asked Jul 30 '09 17:07

PositiveGuy


3 Answers

if you want to keep several project in the repository I would go for this structure

/project1
    /trunk
    /branches
    /tags
/project2
    /trunk
    /branches
    /tags 
...

If you want to keep only one project this will do:

/trunk
/branches
/tags
like image 182
RaYell Avatar answered Oct 24 '22 21:10

RaYell


To save yourself future maintenance headaches, unless you have HUGE amounts of code, or envision wanting to completely delete a project with a large amount of code, keep everything in one repository. Then make directories for each project. Then, if you'd like to follow Subversions recommendation, put the "trunk", "branches", and "tags" folders under each project's folder.

like image 25
Nicole Avatar answered Oct 24 '22 21:10

Nicole


I prefer fine-grained, very organized, self contained, structured repositories. There is a diagram illustrating general (ideal) approach of repository maintenance process. For example, my initial structure of repository (every project repository should have) is:

/project
    /trunk
    /tags
        /builds
            /PA
            /A
            /B
        /releases
            /AR
            /BR
            /RC
            /ST
    /branches
        /experimental
        /maintenance
            /versions
            /platforms
        /releases
like image 38
altern Avatar answered Oct 24 '22 23:10

altern