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.
If you want to ignore all CVS folders, just add CVS to the ignore list. There is no need to specify CVS */CVS as you did in earlier versions. If you want to ignore all tmp folders when they exist within a prog folder but not within a doc folder you should use the svn:ignore property instead.
To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target . svn propedit svn:ignore .
If you are using TortoiseSVN, right-click on a file and then select TortoiseSVN / Add to ignore list. This will add the file/wildcard to the svn:ignore property. You can find this list in the context menu at TortoiseSVN / Properties.
Use TortoiseSVN → Delete to remove files or folders from Subversion. When you TortoiseSVN → Delete a file or folder, it is removed from your working copy immediately as well as being marked for deletion in the repository on next commit.
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
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.
svn checkout http://www.example.com/project cd project svn update --set-depth=exclude docs rm -fr docs
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With