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

Sparse Directories Usage Questions

From: Rush Manbert <rush_at_manbert.com>
Date: Mon, 15 Sep 2008 13:24:20 -0700

For reasons that I won't go into, I need to be able to do script-
driven platform-specific sparse checkout while also being able to do a
simple "svn co" style checkout that just gets everything in the
project tree.

Since Subversion 1.5 is available, I did some experiments with the new
--depth and --set-depth parameters that support sparse directories.
What I saw raises some questions that I hope can be answered here.

If seems that on svn checkout, use of --depth immediates or empty or
files sets the depth metadata on one or more directories. In the case
of --depth immediates, the top level directory carries
depth=immediates, while its immediate child directories each carry
depth = empty. This seems to be the only command where --depth
actually writes the depth metadata. Other commands use --depth to
limit the scope of the command, while svn up and svn switch both allow
the use of --set-depth to (possibly) modify the depth metadata. Is
this understanding correct?

If a directory has depth=immediates in its metadata and I execute "svn
up --set-depth infinity dirOfInterest", the directory of interest's
depth metadata will be set to "infinity" (or removed, which has he
same effect). In addition, all of its immediate child directories will
get their depth metadata set to "infinity". No other subdirectories in
the tree will be modified. Is this the intended behavior? Will it
always behave this way?

Assume I have the following repository structure under my trunk:


I want to do a checkout on the Mac. In this case, I do not want to
populate either projectA/thirdPartyLibs/installedWin or projectA/
thirdPartyLibs/sources, but I do want to populate projectA/

I want to do the checkout as quickly as possible. I think the way to
do it is as follows:
1) svn co --depth immediates projects/projectA workingDir
2) cd workingDir
3) svn up --set-depth immediates thirdPartyLibs
4) svn up --set-depth immediates thirdPartyLibs/installedWin
5) svn up --set-depth immediates thirdPartyLibs/sources
6) svn up --set-depth infinity thirdPartyLibs
7) svn up --set-depth infinity .

Step 4 checks out thirdPartyLibs/installedWin, marking its metadata
with depth=immediates. It also checks out the libA and libB
subdirectories and marks each of their metadata with depth=empty. Step
5 does the equivalent for the thirdPartyLibs/sources subdirectory.

Step 6 marks thirdPartyLibs metadata with depth=infinity. It also
marks thirdPartyLibs/installedWin and thirdPartyLibs/sources with
depth=infinity, but it does NOT modify the depth=empty metadata on
their children. This step will check out thirdPartyLibs/installedMac
with depth=infinity, and will fully populate the tree.

Step 7 marks workingDir's metadata with depth=infinity It would do the
same to thirdPartyLibs, but we already did that. It also checks out
mySources with depth=infinity and fully populates the tree.

Does this look correct? Is there some other approach that would be


To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-15 22:24:41 CEST

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.