Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ svn co http://subversion/project/trunk my_checkout --depth immediates
- $ cd my_checkout && ls
- bar/ baz foo xyzzy/
- $ cd bar && svn update --set-depth infinity
- svn co -N foo
- cd foo
- svn up -N bar
- svn up
- # Path to the svn repository to be checked out
- rpath=https://svn-repo.company.com/sw/trunk/ &&
- # This files are to be excluded (folders are ending with '/')
- # this is a regex pattern with OR ('|') between enties to be excluded
- excludep='docs_folder/tests_folder/|huge_folder/|file1|file2' &&
- # Get list of the files/folders right under the repository path
- filtered=`svn ls $rpath | egrep -v $excludep` &&
- # Get list of files out of filtered - they need to be 'uped'
- files=`echo $filtered | sed 's| |n|g' | egrep '^.*[^/]$'` &&
- # Get list of folders out of filtered - they need to be 'coed'
- folders=`echo $filtered | sed 's| |n|g' | egrep '^.*[/]$'` &&
- # Initial nonrecursive checkout of repository - just empty
- # to the current (./) working directory
- svn co $rpath ./ --depth empty &&
- # Update the files
- svn up $files &&
- # Check out the all other folders finally.
- svn co `echo $folders | sed "s|<|$ubrpath|g"`
Add Comment
Please, Sign In to add comment