Best practice for creating subversion repositories?

前端 未结 8 1834
闹比i
闹比i 2020-12-14 02:05

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

W

相关标签:
8条回答
  • 2020-12-14 02:23

    I am using one repository and many projects as below:

    Projects
       Project Name
          trunk
          branches
          tags
    

    My only concern is the backup and restore. The SVN backup is done at the repository level, so the restore will restore all projects instead of just one.

    Jirong

    0 讨论(0)
  • 2020-12-14 02:26

    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.

    0 讨论(0)
  • 2020-12-14 02:34

    We have a single repo that's structured like that. Anything that is worked on by more than a few people and/or in active development is set up with trunk/ tags/ branch/ under the main folder.

    We would probably put those the trunk-tags-branch folderset under every subfolder you listed, except maybe a library or two that aren't in active development.

    0 讨论(0)
  • 2020-12-14 02:35

    Try to keep regularly accessed material (code, scripts) separate from the 'write-once and commit to backup' stuff. Having to checkout/update thousands of jpegs just to change a few lines of code gets dull very quickly.

    0 讨论(0)
  • 2020-12-14 02:38

    My source of inspiration:

    • Version Control with Subversion
    • Subversion Repository Layout
    • Single Repository or Many
    • Multiple Subversion repositories
    0 讨论(0)
  • 2020-12-14 02:41

    We use one big repository, and just have everything structured in subfolders (/project1, /project2 etc) and that seems to work fine.

    The Apache project has a huge svn repository and it seems to do OK for them! :)

    In terms of organisation, the structure you gave looks quite reasonable. I think anything goes, pretty much, so long as it's rational (i.e. mixing up every single tool with every single project is probably a bad idea etc). So pick something which works for you (tools/, projects/ etc). Subversion has pretty good support for moving things around in the repository, too, so you can always change if necessary.

    0 讨论(0)
提交回复
热议问题