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

RE: partial checkout of a repository

From: Giovanni Moretti <Giovanni_at_reflections.co.nz>
Date: 2004-05-21 16:16:09 CEST

> Is it somehow possible to only partially checkout a repository
> Just think of a repository layout that looks like this
>
> /A/B/X
> /C
> /D
> /E/Y
>
> from which I only need the branches /A/B/* and /A/D/* for now.

Matthias

Here's a reply I posted (to the developer mailing list) to a question about
omitting directories, but it's what I'm using to do something very similar
to what you're after:
===============================================================
> Our scenario is as follows: we have a repository with a
> number of files and directories at the top level. One of the
> directories contains large binary content files (7GB, which
> doubles to 14GB when duplicated by svn to create clean local
> copies). Many developers would like to omit this directory
> when they do checkouts (to avoid having to buy new disk drives!).

I've had the same problem and used "externals" linking back into the
***same*** repository as a workaround. Not ideal but (for me) it avoids
having to download 1GB over 128K ADSL line.

The repository looks like:
   repo/Trunk/Dir1
             /Dir2
             /Dir3 <- HUGE

       /Workspace/ <--- empty except for metaproperties
                          specifying
                              externals: Dir1 reppPath/trunk/Dir1
                              externals: Dir2 repoPath/trunk/Dir2

When I check out "/Workspace" it downloads Dir1 & Dir2 as intended and
committing "Workspace" correctly pushes changes in the Dir1 & Dir2
working copies back into their correct locations in /Trunk.

Been using it for several weeks - works well.

Important - make sure that /Workspace is parallel to /Trunk NOT part of
it. Initially, I had /Workspace at the same level as /Dir1,2 & 3. This
worked well UNTIL I tried to check out all of /Trunk. With workspace in
/Trunk/workspace, checking out /Trunk ended up with two copies of Dir1 &
Dir2 being checked out, the correct ones at the top level, and
duplicates as /Trunk/Workspace/Dir1 (same for Dir2).

I have a complete checked out MasterCopy (all of /Trunk) which is
occassionally updated, just so (for the truly paranoid) not all the data
is in an inaccessible MySQL format.

My /Workspace actually moves directories about a bit to "make visible"
(at the top level of /Workspace) the particular directories I need at
the moment, so the /Workspace tree can be a subset or a reorganised set
of the folders in /Trunk.
===============================================================
Matthias' mail continues
========================
> Under CVS I would do something like the following ...
>
> > cvs checkout -l A
> > cd A
> > cvs update -d B
> > cvs update -d D
>
> Using this scheme I am able to both do a global update on my 'partial
> tree' and also further add other branches to my working copy later on.

Using commit or update on the /workspace directory does update or commit
just the folders that are currently defined as "externals", so it would seem
to do what you want.

If you're using Windows, the TortoiseSVN client makes it extremely easy to
set metaproperties - took me a while to find this. Just right click on a
subversion managed folder and select "Properties" from the popup menu. In
addition to the usuals folder properties, TortoiseSVN will have added a
"Subversion" Tab, and it has the meta-properties predefined. Just click on
the one you want, add things to the bottom box and click "Set" - it's quick
and easy.

Hope this helps
Cheers
Giovanni

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 21 16:16:45 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.