When having several related projects (identifiable, stand alone applications, that share libraries), how do you prepare your SVN server directory structure? By branch > project? By project > branch? Something entirely different? Or is it better to have one SVN server for every project? (Take into account that some projects are intimately related)
The standard convention is
- project1
- branches
- tags
- trunk
- project2
- branches
- tags
- trunk
inside a single repo. Since that's the most common convention, some tools just expect your projects to be laid out like that.
Which projects belong in which repo is more of a judgement call. Personally, I'd start with one repo for all projects managed by the same group, e.g., team, division, or company.
I use a folder for each project, then branches within each folder. This way if a different team is working each project, they don't need to see the whole tree, just their branch.
We've setup repositories for each project, thus each can have their own branches/tags etc.
Also, for interdependent projects, you can setup linked repositories so that the files can be shared. This has worked well for us so far and has proven to be quite flexible.
root / trunk / projectfolders
root / branches / projectfolders
That way someone can get all the mainline projects without getting any branches if so desired.
For projects that are intimately related, I recommend:
root > branch > project
This way it's possible to check out a single branch and get all of the code that's current in that branch.
Check out the subversion book, which offers a section on Recommended Repository Layout
This question gets a whole section in the SVN book. I would recommend starting there, and asking about anything it doesn't make clear or is specific to your project.
As someone who maintains large svn repos, let me tell you, DO NOT use a unified trunk. It will make all operations much, much slower. Beyond this, extracting a single project out of a larger repo is not only tedious and touchy, but will result in a space waste when you do eventually want to peel away even one project.
Use separate repos for each project, with a trunk and tags directories under the repos, and have developers needing to tie to other projects use externals, the way they were designed.
Lazy is not an adequate substitute for organized.