Re: Advice on code sharing
From: BRM <bm_witness_at_yahoo.com>
Date: Tue, 20 Jan 2009 15:03:31 -0800 (PST)
I've got a similar situation where I've broken things out into shared libraries.
I basically solved it by using a script to pull down the shared library into a special folder. This way the shared library can live wherever and it doesn't bother the project. The script is knowledgeable enough to do checks and exports, and to know the difference between a release tag and the trunk. (It's specific to my repo, so while there is some stuff that would be helpful, there wouldn't be a lot).
So my project exists on its own, without the dependencies checked in under its repo path. It knows about the dependencies through a special file (e.g. dependencies.list.txt) that is read by the script which then pulls the dependencies down to a special folder (e.g. dependencies), and then compiles them as appropriate each then puts its output file (e.g. shared.lib) in a special parallel folder (e.g. dependencies/debug). The project can then link against them by using the special parallel folder in its linker path.
In the past, I have also done this directly in Makefiles for a CVS repository - where the Makefile would checkout a folder if it didn't exist. Not quite as robust, but also worked very well.
- Do something similar with a script. The SVN command-line utilities provide a great interface for scripts that is easy to parse and figure things out. I only used 'svn export/checkout/update/status' and 'svnversion' to do everything SVN related.
Once you work out those, it won't be hard, and it is well worth it.
We are trying to handle a situation where we have two simulation packages -- call them SIM1 and SIM2. Each of these are set up as separate projects in a svn repository
It turns out that SIM1 and SIM2 today have much code that is common or share functionality and we are attempting to create a common code share in a new project
We know that you can use the externals property to set up a checkout of SHARE as
One problem is the procedure needed to enable the handling of share. I have the following questions:
I figure someone must have dealt with similar problems before, but I was not able to find information beyond use of the externals property. I appreciate any help from folks.
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
This is an archived mail posted to the Subversion Users mailing list.