Is it possible to revert an SVN working copy to a sparse checkout?
I have a sparse checkout of a very large repository. I ran svn up --set-depth infinity
on one of the subfolders, but this has resulted in checking out many, many files that I do not want. If I could wind back time I would do instead svn up --set-depth immediates
in the subfolder, and then do that recursively only in the subfolders I care about (rather than the whole sub-tree).
I have no changes I need to keep in this sub-tree, so I'm happy to do fairly destructive things to recover it. However I do have changes in a different sub-tree, so I'd rather not just throw away the whole working copy. Is there a way (or a hack) I can just delete the sub-tree and then tell SVN to update only to depth immediates
?
As per @Ben's comment, you can undo this by just running
svn up --set-depth immediates
.Note this can take a long time if the checkout is very large!
[Updated:] After the command has finished, you then need to delete all the extra files that were checked out (
--set-depth
does not delete them).