You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jamie Risk <ri...@intectus.com> on 2006/09/14 19:59:27 UTC

a question on sharing code between projects

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?

Much obliged,

- Jamie



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

Re: a question on sharing code between projects

Posted by Jamie Risk <ri...@intectus.com>.
>> 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? 
> 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
Ahh, Thanks.  Sorry to all about the long line word wraps.

- Jamie

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

Re: a question on sharing code between projects

Posted by William Nagel <bi...@stagelogic.com>.
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