Search code examples
visual-studiosvntortoisesvnvisualsvn-servervisualsvn

Best practice for creating subversion repositories?


Our team (5-10 developers) plans to adopt Subversion for our .NET (Visual Studio) projects/solutions (VisualSVN Server, TortoiseSVN / VisualSVN).

What is the best way to organize a new repository tree? Is it okay to use one big repository or is it better to create different repositories for every solution / product line etc.?

Our projects can be categorized this way (example):

  • Main Product Line
    • Main Web App
      • Library 1
      • Library 2
      • ...
    • Windows Client
    • Another Windows Client
    • Windows Service
  • Tools
    • Tool A
    • Tool B
  • Product Line 2
    • Software 1
    • Software 2
  • Product Line 3
    • App 1
    • App 2

Solution

  • Generally, you want to use a separate repository in any case where you are expecting different access permissions (i.e. some developers should have commit access to one project, but not another, or one project has a public read-only anonymous interface but another doesn't).

    You want everything in one repository if you don't need that level of access control, especially if you need to be able to copy or move files between projects (i.e. projects might share code).

    Put your trunk/tags/branch split at whatever level corresponds to a chunk of code you might release as a single package (i.e. think of where you would tag). This isn't critical to get right at first, since these no different internally from any other folder, so you can just move things around later, though of course it's neater not to have that problem.