You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Simon Raess <co...@gmx.ch> on 2004/03/14 23:35:52 UTC

svn:externals and 'svn switch'

hi


I have a project that I've split into several sub-components. Let's say 
my project foo consists of
- foo-lib
- foo-core
- foo-cli

These sub-projects are pretty independent. They have trunk, branches 
and tags directories. Now to build the whole project I'd like to have 
the following directory structure:

foo
foo/lib
foo/core
foo/cli

where lib, core and cli are from the corresponding sub-projects. I know 
that I can achieve exactly that with svn:externals. Let's say I define 
svn:externals as follows:

lib   http://svn.someserver.com/repos/foo-lib/trunk
core  http://svn.someserver.com/repos/foo-core/trunk
cli   http://svn.someserver.com/repos/foo-cli/trunk

That pretty much does what I want. Now let's say I start to work on my 
foo-lib subproject. I create a new branch and switch my working copy 
(the lib folder) to the new branch.

$ cd lib
$ svn cp http://svn.someserver.com/repos/foo-lib/trunk 
http://svn.someserver.com/repos/foo-lib/branches/test
$ svn switch http://svn.someserver.com/repos/foo-lib/branches/test

In the meantime some other developer commits some work on the parent 
project foo. So I want to update my parent project. I do a svn update 
and get his changes.

$ cd ..
$ svn update

But what happens now to my switched foo-lib subproject (the externals 
definition still points to trunk). That's the result of the update.

Fetching external item into 'cli'
svn: Working copy 'cli/src' not locked

When I do an svn status now, I get:

!	cli

Is this way of working with svn:externals and 'svn switch' possible? Do 
I miss something? If it's not possible like this, how could I set up my 
repository?

I want to use maven and it's reactor feature to build the project and 
its sub-projects. Has anybody some experience with this kind of project 
structure?


Any help is appreciated, thanks!
Simon


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