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

Re: Using svn:externals in place of CVS module alias

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-01-24 21:43:52 CET

Let's see...

On Jan 23, 2007, at 22:39, Janine Sisk wrote:

> I'm working on switching over from CVS to Subversion and this is
> one thing I haven't been able to figure out.
>
> My project uses module aliases in CVS as an assist when checking
> out. It's much faster to check out "core" than it is to check out
> 15 different directories.
>
> My best guess from reading the available documentation is that in
> order to duplicate this I would do something like this: create an
> alias directory at the same level as trunk, branches and tags, and
> then create a directory called core within that. Then use
> svn:externals to define what checking out "/aliases/core" should
> really do.

I'm not sure how your "core" is supposed to be set up, but for the
sake of an example, let's say that you want to check out /aliases/
core, and when you do this, you want to get a directory that contains
foo, bar, and baz, which are all elsewhere in your repository. Let's
assume $REPO is the repository URL. To achieve this:

svn mkdir $REPO/aliases -m "make aliases dir"
svn mkdir $REPO/aliases/core -m "make core dir"
svn co $REPO/aliases/core
cd core
echo "foo $REPO/path/to/foo/trunk" > externals.tmp
echo "bar $REPO/path/to/bar/trunk" >> externals.tmp
echo "baz $REPO/path/to/baz/trunk" >> externals.tmp
svn propset svn:externals -F externals.tmp .
rm -f externals.tmp
svn ci -m "setting externals on core"
svn up

Now the core directory will contain directories foo, bar and baz
which are taken from the trunks of those respective projects within
your repository. And it should be noted that the above was just
initial set-up that only had to be done once; now, any time you check
out core, it will automatically pull in foo, bar and baz because of
the externals definition.

> My question (besides "do I have that right?") is about the warnings
> in the docs about how this creates a fragmented working copy that
> doesn't behave quite like a cohesive whole. Does this caveat still
> apply when all the checked out files are actually from the same
> local (ie, non-external) repository?

Yes, any changes you make to foo, bar and baz within the core working
copy will have to be committed separately of one another. Yes, that
applies even though they're in the same working copy.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 24 21:44:28 2007

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.