简体   繁体   中英

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM