Julian Foad <julianf...@apache.org> writes:

> I haven't looked further into this, but what I think is the core of
> the problem is there's no way to generate a WC directory with its
> depth set to 'infinity' but sparse inside, without checking out the
> whole tree.

It might be difficult to do automatically, but there is a trick you can
use if a suitable file is available.  Suppose you want all of

  ^/subversion

but with

  ^/subversion/trunk
  ^/subversion/branches
  ^/subversion/tags

empty, then:

svn co --depth empty http://svn.apache.org/repos/asf/subversion wc
svn up --depth empty wc/trunk wc/branches wc/tags
svn sw --ignore-ancestry ^/subversion/README wc/trunk
svn sw --ignore-ancestry ^/subversion/README wc/branches
svn sw --ignore-ancestry ^/subversion/README wc/tags
svn up --set-depth infinity wc
svn sw --ignore-ancestry --set-depth empty ^/subversion/trunk wc/trunk
svn sw --ignore-ancestry --set-depth empty ^/subversion/branches wc/branches
svn sw --ignore-ancestry --set-depth empty ^/subversion/tags wc/tags

The file that allows this trick doesn't need to be in ^/subversion,
using ^/subversion/trunk/subversion/include/svn_version.h would work
just as well.

This isn't a new idea -- it is based on a trick that was used in the
days before the clients supported sparse working copies, see:

https://gcc.gnu.org/wiki/SvnSetup#Optimize_disk_usage

-- 
Philip

Reply via email to