lallafa reports a good method, based on something called sparse directories:
svn update --set-depth exclude <folder-to-delete>
not good if:
- I guess won't help you avoid checking out GBs of data you have (although you could try this.)
- doesn't work on switched directories (may or may not with a little work, not tested)
- on large directories, not a very good idea. od_m3 says that on a 190 GB working copy, with
svn 1.6
this method tooks 1 hours, but on svn 1.7
it tooks more than 50 hours. This was in 2011.
added from source:
if you later want to use that directory again, you can do
svn update --set-depth=infinity <folder-to-delete>
I wish I knew how can I list directories already "excluded" this way, because st
won't show them. :D
another method from same source by someone called 'Mike5' (or jed/jeds) that works on directories:
for every directory you want to avoid updating, do
svn switch --ignore-ancestry http://dummy/exists/but/empty_folder some_folder
- replace
some_folder
with the folder you want to ignore.
- also replace
http://dummy/exists/but/empty_folder
with an existing path in your repository which is an empty directory, will never be updated nor deleted - supposedly created and dedicated for this purpose.
By this, you will achieve:
- switched directories not updating any more in the working copy
- no changes to the actual repository
You will not achieve:
- anything on files
- the directory won't disappear/be deleted (from file listing)
- getting rid of initial checking out of these directories, unless you do a checkout for 'immediates' with
--depth
, first, do this, and then continue the checkout (not tested).
- I guess you cannot get rid of downloading GBs of data you already have (not tested).
It is also a good idea to use svn propset svn:ignore "*" empty_folder
on the dedicated empty directory, so noone can commit anything to it.