开发者

SVN: Create a new repo for each projects or put all projects into trunk?

We have two projects basically, each of 2 these main projects have sub projects which they are comprised of. What we have in SVN is currently 1 repo like this:

/SVN-REPO1/MainProj1/
    -trunk
    -branches
    -tags

Should I create a completely new repository altogether and just put MainProj2 inside of its own? Or should I put MainPro开发者_如何转开发j2 inside of SVNREPO1?


Either way works, but I find that when working within a corporate development team it is easier to use the second approach (put MainProj2 inside SVNREPO1). I say this because it is easier to tell new hires where things are at and everybody only has to go to one place to get the source. The only drawback may be that your repo could become very large and your initial download of it could take quite awhile. Nothing saying that you have to download the whole thing at once, but if you aren't going to do that you might as well have separate repos.

/SVN-REPO1
   /MainProj1/
      /trunk
      /branches
      /tags
   /MainProj2/
      /trunk
      /branches
      /tags


I think it depends on the relation between MainProj1 and MainProj2. If they are very related, then use the same repo.

Creating a different repo for each project is handy for tracking history, merging and branching independently. You can still do it if both projects are in the same repo, but having them on different repos just makes it simpler.

Think of maintainability too. Maintaining this repository, with two main projects with sub projects, could become more complex as the projects grow.

Unless both projects were very related to each other, I would go for separate repositories.


You need to now that if you use the same repository, the revision number will increase for all the projects. This makes harder to quickly know if there are new commits in your project by just following the latest revision number.

If you give access rights to your single repository you need to ensure that you limit by subfolder (each project) this is error prone.

This is why I create one repository per project. For the links between projects, it is easy to setup externals which are going to show the relationship.

Smaller units well interconnected are often easier to manage. If you have a good project management software, the creation of the repositories and the management of the access rights is easy. Check Svn Access Manager or Indefero, they do it well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜