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

RE: externals question/suggestion

From: Gale, David <David.Gale_at_Hypertherm.com>
Date: 2006-09-14 14:19:04 CEST

Anders Norman wrote:
> In my company, we're developing a common framework and two projects
> which use this common framework. I wanted to set up the repository
> structure as follows:
>
> /framework
> /trunk
> /tags
> /branches
> /project_a
> /trunk
> /tags
> /branches
> /project_b
> /trunk
> /tags
> /branches
>
> Both project_a/trunk and project_b/trunk have the property
> externals:
> framework svn://svn/repos/framework/trunk
>
> and this seems to work fine, except when I want to update to an old
> revision. The framework in my working copy is updated to the HEAD
> revision.
>
> I'm aware that this is indeed the intended behavior, and that one
> could use the -r option in the externals property. This would work
> just fine if the framework had reached its first stable release (or
> even its first alpha) but in my case, the framework is just as
> immature as both project_a and project_b so make as many commits to
> the framework as the projects. This would require me to manually
> update the externals property on every commit to the two projects.
>
> It would be nice if I could set the externals property to something
> like:
> externals:
> framework -r%REVISION% svn://svn/repos/framework/trunk
>
> to make the external reference actually fetch the same revision as the
> project it's being used by. This would of course require that the
> external and the 'externee' reside in the same repository.

Another option would be to add an empty framework directory to
project_a/trunk and project_b/trunk, and then svn switch it to point to
the framework/trunk directory after checkout. At that point, you have
the structure you want, with no externals definitions at all; updating
to a specific revision will hit all directories, including the framework
one.

Yes, it takes an extra step or two to set up, but once you do,
everything works transparently.

-David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 14 14:18:20 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.