subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Archer <Bob.Arc...@amsi.com>
Subject RE: Parallel branches/tags/trunk directories
Date Thu, 11 Aug 2011 16:13:35 GMT
> (resend as plaintext to fix formatting)
> 
> (I did some searching for an answer here and elsewhere, and didn't find it;
> sorry if I missed it.)
> 
> The project I'm dealing with has the SVN repository arranged like so:
> 
> proj/top1/branches/
> proj/top1/tags/
> proj/top1/trunk/
> proj/top2/common/branches/
> proj/top2/common/tags/
> proj/top2/common/trunk/
> proj/top2/thingA/branches/
> proj/top2/thingA/tags/
> proj/top2/thingA/trunk/
> proj/top2/thingB/branches/
> proj/top2/thingB/tags/
> proj/top2/thingB/trunk/
> proj/top2/deploy/common/branches/
> proj/top2/deploy/common/tags/
> proj/top2/deploy/common/trunk/
> proj/top2/deploy/thingA/env1/branches/
> proj/top2/deploy/thingA/env1/tags/
> proj/top2/deploy/thingA/env1/trunk/
> proj/top2/deploy/thingA/env2/branches/
> proj/top2/deploy/thingA/env2/tags/
> proj/top2/deploy/thingA/env2/trunk/
> proj/top2/deploy/thingB/env1/branches/
> proj/top2/deploy/thingB/env1/tags/
> proj/top2/deploy/thingB/env1/trunk/
> (etc)
> 
> First, I completely agree that this organization has issues.  Changing is isn't an
> option.  I'll spare you the details.  :-/
> 
> My question is:  how to checkout and update at the proj/ level without
> getting the content of all the tags/ and branches/ directories?
> 
> The "Sparse Directories" features of SVN (--depth and --set-depth) sounded
> good:
> http://svnbook.red-bean.com/en/1.5/svn.advanced.sparsedirs.html
> 
> But those features are not sufficient.  In order to do a fresh checkout of the

Not "sufficient" because it takes time and manual work to do? Or, because it doesn't do what
you need? Sparse directories is exactly what you need to use to get what you want.

1.7 added a -parents (I think it is) argument to the update/checkout so that you didn't have
to do

Svn checkout ^/proj --depth empty
Cd proj
Svn checkout ^/proj/top1 --depth empty
Cd top1
Svn checkout ^/proj/top1/trunk 
Etc...

Also, if you are on Windows tortoiseSVN makes the above easier without the need to walking
the path... iirc.

That all said, I don't really see the benefit of having one working copy that you can update
at once. I prefer to check out the branch and/or trunks that I need to work on as needed and
update each one as needed. If you want to update all your working copies with one command
you can create a local batch file which goes through and calls update on each folder.

> above and avoid the massive on-disk redundancy that would occur due to
> the content of tags/ and branches/, each trunk/ directory must be checked
> out individually.  Other than creating a brittle script that lists each trunk/
> directory, I don't see a solution.  Even then, each branches/ and tags/
> directory needs to be marked with --set-depth as well.
> 
> I also discovered that "svn co URL/proj/top1 --depth immediates" can take a
> very long time for a tree with tons of content.  Seems like a bug (using SlikSvn
> 1.6.15).  Similarly, something like "svn update URL/proj/top1/tags -depth
> immediates" would be handy at times to get just the empty subdirectories,
> named after each branch or tag.  Updating just one of those subdirectories
> would allow mass-diffs between the trunk or another branch/tag.  I don't see
> why a depth-limited operation like that should take so much time.

What version of the server are you running? I think if you use Sparse directories with a pre
1.6 server the server sends all the files and the client just throws away what doesn't fit
into your requested depth.

BOb


> 
> I though about using 'svn list http://.../proj/'; and grep'ing the result for
> "/trunk", but that one command takes over 10 minutes - not feasible.  A
> checkout of all the trunk/ directory contents only takes 2.5 minutes.
> 
> So: has anyone found a clean way to handle checkouts and updates when
> branches/tags/trunk directories are strewn all over a tree?  Thanks.

Mime
View raw message