0

I have the following directory structure in the svn repository

Parent Directory/  
    - BranchFolder1/  
        * Stuff for BranchFolder1/  
    - BranchFolder2/  
        * Stuff for BranchFolder2/  
    - BranchFolder3/  
        * Stuff for BranchFolder3/  

On disk I want to have this structure:

Parent Directory/   
    - Stuff for BranchFolder1/

If I cd into the Parent Directory and do an svn update there, it checks out all the branches and their respective contents, which I dont want. How can I get it to only check out/update stuff from inside one of the branches?

Zoe
  • 27,060
  • 21
  • 118
  • 148
halfwaythru
  • 177
  • 3
  • 12
  • Is this what you want?: `svn checkout "http://path/to/Parent Directory/BranchFolder1" "Stuff for BranchFolder1"` – ninjalj Feb 15 '13 at 20:12

1 Answers1

1

You need to use sparse checkout feature (available since SVN 1.5):

svn checkout --depth empty "http://path/to/Parent Directory
svn up BranchFolder1/

The first command will set the working copy depth to empty, so you have only this directory. By issuing the second command Subversion will update only BranchFolder1 to workingCopy depth "infinity". All other directories will stay the same for subsequently used

svn up .
Peter Parker
  • 29,093
  • 5
  • 52
  • 80