ashwin daiwajna
ashwin daiwajna

Reputation: 89

How to exclude some directories from SVN repository during checkout

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 ?

Upvotes: 8

Views: 12699

Answers (1)

msell
msell

Reputation: 2208

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.

Upvotes: 15

Related Questions