Search code examples
svnrepositoryorganization

Is this the correct step-by-step and organization for creating an SVN repo with multiple projects and vendors?


I've read quite a bit of the Red Bean Software SVN Book, and some of the questions here on SO, but I want to make sure I'm going about this in the right way the first time around step-by-step before I begin using it. Is this correct?

  1. Install SVN.
  2. Create SVN repository at /usr/local/svn. Directory structure looks like this:

    -- conf
    -- db
    -- format
    -- hooks
    -- locks
    -- README.txt
    
  3. Create folders through command line for repository organization (including projects and vendors).

    -- conf
    -- db
    -- format
    -- hooks
    -- locks
    -- projects
       -- project_name
          -- vendor
          -- trunk
          -- branches
          -- tags
       -- project_name
          -- vendor
          -- trunk
          -- branches
          -- tags
    -- README.txt
    
  4. Checkout vendor code into vendor folder under the correct project name.

  5. Export vendor code into trunk under the correct project name (no merge necessary, as I have no project trunk files yet).
  6. Create users/permissions in /svnroot/conf/passwd and /svnroot/conf/svnserve.conf.
  7. Make sure that svnserve is running, and on my local SVN client (TortoiseSVN), checkout the trunk for the project that I need.

I don't need to serve this up by public URL, so I'm not configuring for Apache. The server is not in our network, but is a dedicated CentOS box we rent. Thanks for any thoughts and advice.

EDIT:

I guess I'm confused because I don't have code or a project to begin with, so I am starting fresh from the vendor's code. Do I need to create a directory structure somewhere on the server that includes my project_name w/ vendor, trunk, branches and tags subfolders, import that into my repo, and then import the code from the vendor into the vendor folder? The idea is that I can get updates from the vendor, and then merge those updates with any changes I made to my trunk.


Solution

  • Create folders through command line for repository organization (including projects and vendors).

    Do you mean creating the repository structure by making directories inside the subversion intallation directory? That's very wrong.

    You have to create the necessary folders via the svn mkdir command and not via filesystem.

    In /usr/local/svn you have the physical implementation of the Subversion repository, and you must access it only via a client, and never touch it "by hand".

    For example, using the file:// URL scheme

    svn mkdir file:///usr/local/svn/projects -m "Parent dir for projects created"