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

Re: Repository layout question

From: Eric Wilhelm <ewilhelm_at_sbcglobal.net>
Date: 2004-09-28 17:59:51 CEST

# The following was supposedly scribed by
# Patrick Kelsey
# on Monday 27 September 2004 11:14 pm:

>I would like there to be only one instance on the trunk of each
>library (meaning I shouldn't have to merge changes in a given
> library to different instances of that ilbrary on the trunk), and I
> would like to be able to branch and tag these working copies.  This
> is something I can arrange in cvs using the 'modules'
> administrative file, or in vss by applying the concept of 'sharing'
> that vss has.

I've established a way of working which solves a similar problem.
Unfortunately, I don't see any way to setup the repository with this
scheme "hard-coded" into its layout.

Take a look at my repository for some ideas:

Particularly, the write-up of what is what:

My scheme is somewhat specific to Perl scripts and modules (also works
with python) and Linux, where my goal was to install code as "live"
from the checked-out directories.

So, assuming that you are on a system which is capable of using
symlinks, you would do something like the following:

mkdir svn_hop
mkdir projects/proj1/lib1 -p
mkdir projects/proj1/lib5
cd svn_hop
svn co http://server/svn/proj1
svn co http://server/svn/lib1
svn co http://server/svn/lib5
hop_to_links proj1/ ../projects/proj1
hop_to_links lib1/ ../projects/proj1/lib1
hop_to_links lib5/ ../projects/proj1/lib5
cd ../projects/proj1
# ...whatever

You only have to do the linking stuff the first time you checkout the
project (maybe write this into a svn_setup script under each project
tree.) This establishes a tree where every file (not directory) is
symlinked into the corresponding location in one or more source
trees. If you move files around, you need to do it in the svn trees
and re-create the linked directories.

You can then do your "svn status", "svn update", "svn commit" and etc.
from the svn_hop/ directory (or use the linked_svn script to run
directly from the linked tree.)

I don't have any windows boxen, so I can't help you there. Patches
and suggestions are welcome though.

With your situation, something much simpler might be possible. For
one, you could just checkout proj1/, then checkout lib1/, etc. to
inside of it (be sure to set svn:ignore.)

svn co http://server/proj1
svn co http://server/lib1/ proj1/lib1

Alternatively, use the symlink scheme, but only on directories (no
special tools needed.)

ln -s ${PWD}/proj1/ ../projects/proj1
ln -s ${PWD}/lib1/ ../projects/proj1/lib1/
ln -s ${PWD}/lib5/ ../projects/proj1/lib5/


A counterintuitive sansevieria trifasciata was once literalized 
                                 --Product of Artificial Intelligence
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 28 18:00:08 2004

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.