views:

20

answers:

0

Suppose you have a subversion repository with a directory /trunk/huge that is huge (thousands of files > 1G) and doesn't change very often.

You check it out sparsely avoiding /trunk/huge, e.g.

svn co --depth immediates ^/trunk trunk
for f in trunk/*; do 
  if [ "$f" != "trunk/huge" ]; 
  then 
    svn up --set-depth infinity $f; 
  fi; 
done

On a later day you suddenly need the files under ^/trunk/huge.
The standard way to get it would be to change it's "depth"

svn up --set-depth invinity trunk/huge

This works, but

  1. Has to transfer a lot of data over the network
  2. Put more load on the subverion server
  3. Takes a real long time

Suppose I had checked out ^/trunk/huge before and made a .tar.gz of it. Now I want to put that .tar.gz on my local working copy. If I simply put it there, subverion will think it is "unknown", e.g:

svn st
?       trunk/huge

If I try and set-depth to infinity, trunk/huge get updated, but svn still considers it as unknown.

svn up --set-depth infinity trunk/huge
At revision 8655.
svn st
?       trunk/huge

How do I tell subversion that this "unknown" directory is now the "non-sparse" checkout of the real thing?