Alex Rivera | Logout

Change depth in existing SVN working copy without redownloading

Asked 2011-08-28T19:26:45.610
40

I have a working copy of an entire SVN repository, but I want to change it into a sparse working copy because of disk space issues.

One way to do this would be:

svn up --set-depth immediates projects
svn up --set-depth infinity projects/project1
svn up --set-depth infinity projects/project2

However, that would first delete project1 and project2, then redownload them. This is really inconvenient, because they're very large and the server's upload speed is very low. I tried this (with another, smaller, part of the repo, as an experiment):

svn up --set-depth infinity projects/project1
svn up --set-depth infinity projects/project2
svn up --set-depth immediates projects

But then the last command just undoes the first 2.

How can I set the depth of a working copy without it immediately updating/changing it, so I can have the chance to correctly configure subdirectories first?

Or is there another way to accomplish what I want, e.g. by copying project1 and project2 to a safe location first?

Edit
Report

1 Answer

3

I ended up hacking it:

  • Manually edit the depth setting to "immediates" for projects *.
  • Hard delete (not SVN delete) all children of projects except project1 and project2
  • svn up projects

[*] To do this, open up projects/.svn/entries in a text editor and change

b125e325-6f7c-4931-9942-d1ea1ea1441a
X

into

b125e325-6f7c-4931-9942-d1ea1ea1441a







immediates
X

Note: That UUID-looking line is probably different per repo, and X is actually hex value 0x0C which I can't get displayed here on SO.

answered 2011-08-28T20:05:37.213

Your Answer