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

Re: Can svn have a project containing other svn projects?

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Mon, 22 Sep 2008 10:07:00 +0200

Note up front: Subversion has no concept of a project, it is just a tool for
versioning files and directories.

On Monday 01 September 2008, Jim wrote:
> At home I have many small collections of related files that are
> essentially libraries (some are, some are just a set of files) that I
> share/use in many of my applications. I'm attempting to place things
> under version control (I chose svn) and I'd like to avoid is a mandatory
> directory layout. For instance, I'd like to get away from a Visual
> Studio project having files at ../../shared/MyLibSrcA. Plus, I don't
> like the idea of re-creating my current directory structure in what I
> believe would have to be a single svn repository. I was planning on
> having multiple repositories, one per Visual Studio project. But, I
> need to share all those collections of files/libs.

I wouldn't create multiple repositories. This makes it harder in particular if
there are dependencies between them. Also, you can not migrate the history
between repositories, so if a module of one project evolves into a separate
library, you can't easily split it off and maintain the history.

> At work, our version control system lets us add other projects as a
> subproject to a project. In other words, a project can have files AND
> other projects. So, you can share projects. That way, you can include
> various projects of files and when you create your "sandbox", all the
> files can be in one directory. Can svn do this? I looked at the add
> and import commands & they appear to be file oriented.

Several options:
1. Using svn:externals, as already suggested.
2. You can provide placeholder files/dirs in a project dir and require them to
be switched to the subproject dir for use.
3. You can simply leave the include paths and library paths open and only
require the library to be installed, i.e. in the compiler's and linker's
paths.
4. You could add a placeholder for includes and libs in the projectfile which
is replaced with an environment variable.

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-22 10:07:27 CEST

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.