[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Newbie ?: sharing code between projects

From: Bill Comisky <bcomisky_at_pobox.com>
Date: 2003-05-29 23:16:54 CEST

I'm new to Subversion and fairly new to version control period. I've been
poring over the Subversion book and the mailing list, but I still have
some questions.

I have multiple projects that have large sections of code in common.
Prior to version control, I was using symbolic links to link
subdirectories or files from one project tree to another. I've had a few
ideas of how to handle the situation now under Subversion, and I wanted to
get some feedback to see what others would do in the same situation. The
options I've thought of so far are:

option 1
--------
Store the common code in one of the project trees (projA). For the other
project (projB), build the working directory carefully using 'svn
checkout' or 'svn switch' where appropriate so that the working directory
contains a mix of repository locations.

The drawback here is that you can't checkout projB and get everything.
You have to copy the working directory and update, or rebuild the working
directory as above. On a side note, is it ok to copy the working
directory (say syncing a laptop/desktop) and expect svn operations to work
normally on the copy?

option 2
--------
Use the svn:externals property to handle the multiple checkouts of project
specific and common code. This has the advantage of everyone being able
to checkout the entire project structure without having to manually build
the working copy.

However, from what I've read, the svn:externals code isn't quite ready.
Do 'commit'/'status' functions work? Another killer is that the revision
number of the external is fixed to some tag or revision number (using -r),
or to HEAD by default. Since my common code will frequently be updated
from the working directory of either project, I'd have to constantly
modify the svn:external revision number manually (I think).

option 3
--------
Keep using symbolic links and store those in the repository. This doesn't
look like it will be a feature until after v1.0.

So far it looks like option 1 is my only real choice. Please point out a
better solution, or any facts I got wrong!

bill

-- 
Bill Comisky
bcomisky@pobox.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 29 23:17:46 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.