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

RE: Re: symbolic linking

From: Ian Brockbank <Ian.Brockbank_at_wolfsonmicro.com>
Date: 2004-07-02 11:39:46 CEST

Hi Jeff,

> Toby Johnson wrote (quoting Jeff Fisher):
>
> >this might seem like a completely stupid question, but here goes...
> >
> >so basically i've decided i hate vss, and i'm trying to find
> out whether or not i want to use
> >subversion as a replacement. after using it for a while
> though, i haven't been able to find a way
> >to create links so i could have one working copy and have it
> exist in multiple projects in the
> >repository database. does subversion handle this or am i being dumb?
> >
> >
> I assume you're talking about something like shared files in VSS? The
> closest thing in Subversion are "externals" (via the svn:externals
> repository property). Those work on the directory level
> instead of the
> file level. Basically you're telling one directory that it
> should always
> pull in an "external" directory (which can be in the same
> repository or
> a different one) during checkouts or exports.

We use svn:externals in our work, and they do the trick. There are a
few gotchas to be aware of:

 - they only work on directories, not on individual files
 - they are not updated by svn copy, so if you do a branch or a tag,
   the svn:externals will still point at their original location.
   I posted a perl script to this list a few days ago which addresses
   this issue - you can find it at
   http://subversion.tigris.org/issues/show_bug.cgi?id=1258
 - recursive commits which include svn:externals directories are
   not atomic - the commit to the svn:external happens as a separate
   transaction
 - svn diff doesn't understand svn:externals, so you need to diff
   the external directories separately
 - there is a possibility, if you have nested svn:externals, that
   the lower-level directories are created before the parent
   directories. This will be fixed in svn 1.1 (the fix has just
   been checked in).
 - Neither ViewCVS nor Subclipse will show externals when browsing
   the repository (although Subclipse is happy to work with them
   once they're checked out into a WC, and since svn checkout
   understands them, Subclipse will check them out quite happily).
   Not sure about other tools - those are the ones I use on a
   day-to-day basis.

Having said all that, we wouldn't be without Subversion, and
svn:externals do what we need (now we've got the perl script as well).

Cheers,

Ian Brockbank
Senior Applications Software Engineer
e: ian.brockbank@wolfsonmicro.com / apps@wolfsonmicro.com
scd: ian@scottishdance.net
t: +44 131 272 7145
f: +44 131 272 7001

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 2 11:40:49 2004

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