views:

56

answers:

2

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?

+4  A: 

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
Nick Meyer
+1  A: 

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

nanda
Hallo downvoter... please share your comment.
nanda
I don't understand the downvote; care to explain?
John Weldon
I downvoted this answer because it is not correct. What the questioner is asking for is certainly possible, by doing what is described in Nick Meyer's answer or by creating multiple working copies. I also think the suggestion to use `svn:externals` is not a good workaround.
Michael Hackner
Since the original questioner did not provide details of what he/she is trying to accomplish, I think it is worthwhile to suggest the svn:externals solution. In certain situations, it might be the best solution.
RjOllos