1

We are in the process of building a component library which will host many utility components that can be reused by multiple applications. These are not third party libraries, but will be custom built internally.

What is the best way organize them in SVN? Should we create one repository for each of the component or should we create one global repository that hosts all the components?

The main requirement we have is that we should be able to version the components individually, so that the client applications can pick and choose whichever version they want.

For example, let's say we have two components - authentication & routing_engine. We should be package them seperately as authentication_1.0, authentication_2.0, routing_engine_1.0, routing_engine_1.1 etc.

The objective here is to ensure one client applications to select any version of any components.

Thanks.

2 Answers 2

2

From my experience I can say that single repository is better. I don't know about disadvantages, but an advantage is that you can move files between components while preserving history or create some kind of shared functionality.

Of course, this is just a potential advantage, but I can't even think of a potential advantage of multiple repositories.

Sign up to request clarification or add additional context in comments.

Comments

1

The 2 possibilities are:

  • A single large repository
  • Several smaller repositories possibly linked by extern where necessary.

The pros for a single large repository:

  • Simple to manage.
  • Cross use of common components is easy.
  • Move/Rename can preserve history.

The Cons:

  • Everybody has access to everything
  • No clear separation of components and common elements
  • Every change updates the revision number of everything.

For the multiple repository the pros and cons will mostly be the reverse of those above. The extern facility is made to order for sharing common elements between the various items.

A lot of the decision comes down to personal preferences and scale - if a single person or very small number of people are going to be working on it then a single repository is probably the best option if over time more than X people will be working on it then it is probably better to split it.

Personal experience suggests:

Developers - Best Option

1-4 - Single repository

5-9 - Probably best to split

10+ - SPLIT IT!

5 Comments

Why everybody has access to everything? You can control access for subdirectories: svnbook.red-bean.com/en/1.7/…
If I have a single repository, how do we maintain the releases (version updates) of individual components? Should we just TAG all the files that belong to that particular component? Wouldn't it be complex and error prone? Thanks
If components are developed separately, it makes sense to have separate trunk/branches/tags structure for every component.
@cdoe that is a part of the cons of a single repository.
@maxim1000 controlling individual directory access is probably harder work than harder work than multiple repos on the other hand if it is 2-3 devs and a related group of utils...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.