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

Re: Shared files between projects

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: Mon, 7 Jan 2008 12:31:33 +0100

On 1/7/08, Ulrich Eckhardt <eckhardt_at_satorlaser.com> wrote:
> On Monday 07 January 2008, Roth, Pierre wrote:
> > Is there ( current 1.4.6 release ) or is planned ( next 1.5 svn release
> > ) to have a "shared file" functionality with svn ?
> > i.e sharing files between projects (without using the svn:externals
> > property). One change to a file in one project would then be
> > automatically seen from other projects.
> >
> > Does not seem to exist on 1.4.6... But perhaps in 1.5 ?
> The request for such things is pretty old and has not had enough of a lobby
> yet, so it's unlikely to suddenly go in. Especially some people coming from
> SourceSafe (VSS) sometimes miss this.
> Alternatives:
> - svn:external (only complete dirs)
> - symlinks (not all platforms)
> - using libraries/buildscripts/whatever to distribute the files to the
> projects
> - manually updating per-project copies
> - automatically updating per-project copies

- Have both projects in the same repository
- create a third project for the shared files
- Create placeholder-files in the 2 other projects
- After checkout, 'svn switch' the placeholders to the real files in
the shared files project

After you did that, the files are integral part of your tree, meaning
that changes to them will be committed with all other changes. Updates
will be received in normal updates.

I like to posit however that most 'shared files' scenarios (especially
with source files) indicate problems with the library split. Many
times, the shared files actually belong in a separate project with its
own (stable) API.

> Note that I personally consider the VSS style shared sources a bad idea,
> because it is not at all visible which projects you are modifying with
> your "local" modifications. If a file is in a "common" folder or comes from a
> library that is more explicit and doesn't bear the danger of breaking.

Right. I can only confirm that.



To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-07 12:31:58 CET

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.