SVN Repository Structure

There are discussions about how to arrange the structure of your SVN repository (or your repository in other version control systems for that matter).

The two main options are:

(1) To have projects below branch categories, e.g.

  • http://repository_path/
    • trunk/
      • project/
    • branches/
      • project/
        • feature/
        • v_1.0/
    • tags/
      • project/
        • v_0.9.5/
        • v_1.0.0/

(2) To have branch categories below projects, e.g.

  • http://repository_path/
    • project/
      • trunk/
      • branches
        • feature/
        • v_1.0/
      • tags/
        • v_0.9.5/
        • v_1.0.0/

Each has advantages and disadvantages. With (1), it is perhaps simpler to associate related projects in a single branch. In (2) tags ‘closer’ to the trunk. A fuller discussion of this may be found elsewhere.

In either case, projects have the following main branch categories:

  • trunk/
  • branches/
  • tags/

In my opinion, it is helpful to create a finer structure than this. For example:

  • trunk/
  • branches/
    • private/
      • developer_name/
        • experimental_feature/
        • shelved_work/
    • public/
      • features/
        • prototype_feature/
      • releases/
        • v_1.0/
  • tags/
    • v_1.0.0/
      • alphas/
      • betas/
      • candidates/
        • v_1.0.0_cand1/

This is helpful because it makes browsing the repository structure more manageable, and getting an overview of a project’s release history more straightforward.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: