Search code examples
svntortoisesvn

SVN checkout only trunk from multiple directories


My question is similar to this question, but I am not using git.

I too am working on a huge legacy project, and I need to check out several projects.

I want to do a checkout of the parent directory for all the projects. When I do though, it pulls the branches and tags as well as the trunk for each directory. I only want the trunk for each project.

How can I check out the single parent directory for multiple projects WITHOUT pulling the branches and tags?


Solution

  • Use Subversion's Sparse Directories feature to get the basic directory structure, then update the depth of the trunk directories to flesh them out.

    svn checkout --depth immediates URL_TO_COMMON_PARENT LOCAL_DIR
    svn update --set-depth infinity project1/trunk
    svn update --set-depth infinity project2/trunk
    

    Lather, rinse, repeat for each project.

    I'm away from an svn repository at the moment so I haven't verified that this is 100% right, but I think it is.