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

Re: a question on sharing code between projects

From: William Nagel <bill_at_stagelogic.com>
Date: 2006-09-14 22:00:30 CEST

On Sep 14, 2006, at 3:59 PM, Jamie Risk wrote:

> Is it possible to share common code across multiple projects and to
> have check outs/updates of the separate projects automatically
> retrieve the latest common code?
>
> In general I'm new to VC tools, and particularly new to
> Subversion. So without a formal understanding behind the rational
> of how-things-are-done and after thumbing much of the svn-book.pdf
> and reading a fare bit of Nagel's "Subversion Version Control" I'm
> left to wonder the above.
>
> My guess would be to keep the common code a separate project: When
> tagging a release for a project using the common code, the
> repository version number would be able to tell me which of the
> tagged releases of the common code was used for linking. This
> seems to make checking out a project a multistep process. I guess
> I'm trying to figure out if there is a better way.
>
> Consider, for example, the common code is an ANSI C implementation
> of "printf" in a single file. The API is well documented, so any
> changes to the printf implementation wouldn't break dependent
> projects compilation or linking. Each of the non-common code
> projects releases would of course, require knowing which
> implementation of printf file was used, but for each projects'
> development branch how would I check out/update the latest release
> of the printf file?

Read up on externals in the SVN book. They'll do pretty much what
you want (although you'll have to organize your code so that the
common code resides in its own directory.

-Bill

>
> Much obliged,
>
> - Jamie
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 14 22:01:09 2006

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

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