This isn't, I don't think, a standard svn ignore question.
I have a repository with a huge directory in it that I don't want. Because others using the repository do, I can't just delete it from the tree. BUT, I don't want to redownload this directory every time I do a svn up. I can understand that ignore will prevent directories that I have from being uploaded to svn, but how I can I tell svn that I don't want it to redownload particular directories that are already in the repository.
What I do...
svn up
rm badDirectory
and then future svn up's redownload it. I want to prevent that.
Thanks!
edit: OK. I was hoping that SVN had a built in option that I just hadn't noticed yet. I was hoping to avoid having to "hack" around subversion's inadequacies, but the options below seem like acceptable alternatives.
edit again to address a couple of comments:
Is there particular reason why you cannot check-out that folder and keep it ? no disk space (probably not since you can check-out it) ? security reason ?
I could check out the folder. The entire svn repository is about 291 megs.. 290 of it is in this "bad" directory. Basically, some other people who have control over the repository (and therefore get to decide what goes in there) put a directory in there that really didn't need to be in there. I didn't mean for this to be a question about policy and the "proper & right" ways to use svn. I was just wondering if there was a technical solution.
Can you give a better description of the tree structure of the repository? Are there files at the same level as the bad directory, or only other directories? –
Basic structure:
repository root
- good dir 1
- plenty of subdirs in all of these directories
- good dir 2
- good dir X
- bad dir 1
- bad dir 2
- bad dir X
- good file 1
- good file 2
- good file X
I went with the sparse checkout route similar to what Stefan mentioned. The difference is I excluded a whole directory.
Here's what I did to exclude a whole directory and all its subdirectories. Note: the unwanted directory was already on my disk so I deleted it first.
$ rm -rf unwanted-directory
<- unwanted-directory is not acquired from the repository
$ svn checkout url/to/repo/unwanted-directory unwanted-directory --depth empty
$ cd root/of/my/tree
$ svn update
For reference, we have a 'prototype' directory in our tree with a bunch of experimental code. Since I don't work in this area, I have no interest in having the 1G to sources in my multiple development trees.