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.
You can't directly ignore folders on a checkout, but you can use sparse checkouts in svn 1.5. For example:
This will check files and directories from your project trunk into 'my_checkout', but not recurse into those directories. Eg:
Then to get the contents of 'bar' down:
Yes you can using SVN 1.6. You will need to do a checkout first then mark the folder for exclusion then delete the unwanted folder.
From now on any updates to the working copy won't repopulate the docs folder.
See http://blogs.collab.net/subversion/2009/03/sparse-directories-now-with-exclusion/ and http://subversion.apache.org/docs/release-notes/1.6.html#sparse-directory-exclusion for more details.
Tom
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.
I found this question looking for a way to check out the WebKit sources while excluding the regression tests. I ended up with the following:
Note you can change the exclusions as you see fit, but .* is recommended to skip the working directory (which is already up to date) and all of the .svn directories.
Yes, Subversion 1.5 has a feature called Sparse checkouts that can do exactly this sort of thing.
I have recently resolved the same task. The idea is to get the immediate list of folder/files under the repository exclude the entries you need, then check out the remaining folders and update the immediate files if any. Here is the solution:
Change to source working directory. Copy the commands. Paste. Change appropriate URL and exclude pattern. Run the command.
Thanks,