Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude some directories from SVN repository during checkout

Tags:

svn

batch-file

I am writing a script to checkout data from an SVN repository. The URL is

http://subversion-practice.sweng.xyz.com/cvn/repos/ps/passport

There is a folder under passport on this non-local URL which I need to exclude from checkout viz. Data_backup (Folder name to be excluded).

SVN checkout command used is

svn checkout --username ab230141 --password Table717 http://subversion-practice.sweng.xyz.com/cvn/repos/ps/passport >> C:/svn_log.log 2>&1

Can someone please help with the commands I could use for this ?

like image 571
ashwin daiwajna Avatar asked Dec 19 '12 10:12

ashwin daiwajna


1 Answers

You can use Sparse Directories. You need svn checkout --depth empty followed by few svn update --set-depth infinity commands for the children. It's pretty well explained in the linked manual. I guess the deeper the excluded folder is in the tree, the more update commands you need.

Alternatively you can first checkout the whole tree and then run svn update --set-depth exclude for the folder you want to ignore.

like image 177
msell Avatar answered Sep 23 '22 12:09

msell