subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Burato <>
Subject Shared/Common files in SVN
Date Wed, 23 Feb 2011 13:04:15 GMT

i'd like to propose a new feature/improvement to SVN.
Some users have projects that share some files, usually the layout would 
be something like this:

When working on a project, the developer needs to checkout the Project 
directory and also the Common directory,
which contains the files shared between the projects.

This can't be directly handled by SVN in a single checkout, there are 
workarounds but they have limitations:

1) Double checkout
Using this method the developer have to checkout the Project dir and the 
Common dir separately.
This means that they also have to ensure they're checking out the same 
revision from both, and they also need to handle commit/updates
between them. In other words they must do everything manually with the 
risk of doing something wrong with revisions.

2) Files / library copy
This consists on making copy of the shared files in the project dir, or 
make a library for them and copy it to the project directory
The library approach seems to be the the best solution but there are 
situations in which this can't be done, for example if a shared file is 
an header. Also, if the shared files must be edited this means the 
developer have to checkout the Common dir any way and edit the project 
to use it while testing, and finally to rebuild the library and copy it 
to the project.

3) Externals
The externals method is near the solution, it consists in adding an 
external directory inside the project which points to the Common dir.
The main problem is that externals are not in sync with the main 
checkout, they refer to HEAD revision by default, or a specific revision.
To checkout a past revision of the project the only solution is to use a 
specific revision in externals. This means that after committing a 
change to the common files the externals revision in the project must be 
manually updated.

Possible solutions:

1) Improved sparse directories
Sparse directories would be a solution, but they only work varying the 
depth of the checkout. If we could add a property or something to 
specify which directories must be included in the checkout than it would 
work as needed.

2) Improved externals
Externals problem is that they don't follow the revision of their 
parent. By specifying an option like -r BASE in the svn:externals 
property it would be possible to do so, solving the problem.

I'd like to hear some considerations by experienced users, to understand 
if there are other solutions or some drawbacks in the proposed ones.


Marco Burato

View raw message