cdoe
cdoe

Reputation: 469

Version controlling multiple small utility projects in SVN

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.

Upvotes: 1

Views: 70

Answers (2)

Steve Barnes
Steve Barnes

Reputation: 28370

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!

Upvotes: 1

maxim1000
maxim1000

Reputation: 6365

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.

Upvotes: 2

Related Questions