Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: How do I checkout entire source tree with trunks only?

Tags:

Two-parter, really:

  1. How do I checkout an entire source tree but only get the trunks of everything, ignoring all branches and tags?

  2. Assuming #1 is doable, is there a way to have there not be any "trunk" directories, and just have the files reside in a folder with the name of the repository?

like image 745
Michael Stein Avatar asked Jan 14 '10 13:01

Michael Stein


2 Answers

Most SVN repostiories are structured something like this:

/ |-- /branches |-- /tags `-- /trunk     |-- foo     `-- bar 

So if the root of the repository is at http://www.example.com/svn, you can run

svn co http://www.example.com/svn/trunk 

to check out just the trunk. If you want to name the checked-out folder after the project, just add the project name to the command line:

svn co http://www.example.com/svn/trunk myproject 

This command should produce a directory structure like:

myproject/ |-- foo `-- bar 
like image 188
Nick Meyer Avatar answered Oct 21 '22 20:10

Nick Meyer


No, it's not possible. What you can do is to create a new project add define external links from it to every other projects trunks. External link works like softlink.

You can then chekout everything in one step.

http://svnbook.red-bean.com/en/1.0/ch07s03.html

like image 45
nanda Avatar answered Oct 21 '22 20:10

nanda