Can I ignore a folder on svn checkout? I need to ignore DOCs folder on checkout at my build server.
edit: Ignore externals isn't an option. I have some externals that I need.
Can I ignore a folder on svn checkout? I need to ignore DOCs folder on checkout at my build server.
edit: Ignore externals isn't an option. I have some externals that I need.
No, ignore is only for adding files.
You can use sparse checkouts (if you use svn 1.5)
Yes, Subversion 1.5 has a feature called Sparse checkouts that can do exactly this sort of thing.
You could put the docs folder in an external repository and then use svn checkout --ignore-externals
.
As a few others have mentioned, you can just use svn:externals properties and then the --ignore-externals option when you checkout. One thing to note, however, is that svn:externals does not necessarily need to refer to another repository. It can be a reference to some other folder in the same repo.
You can't directly ignore folders on a checkout, but you can use sparse checkouts in svn 1.5. For example:
$ svn co http://subversion/project/trunk my_checkout --depth immediates
This will check files and directories from your project trunk into 'my_checkout', but not recurse into those directories. Eg:
$ cd my_checkout && ls
bar/ baz foo xyzzy/
Then to get the contents of 'bar' down:
$ cd bar && svn update --set-depth infinity
With versions prior to 1.5 I have found that if you checkout only the top most folder and then selectively update, from then on updates only effect what you have checked out. Ie.
svn co -N foo
cd foo
svn up -N bar
svn up
The -N flag makes the operation non-recursive. The above will not check out anything else at the foo level, eg. say there is a folder lala
, the final svn up will not check out that folder, but it will update bar
.
But at a later time you can svn up lala
and thus, add it to the checkout.
Presumably this also works with 1.5.