一个SVN存储库中多个项目的文件夹结构? [英] Folder structure for many projects in one SVN repository?

查看:48
本文介绍了一个SVN存储库中多个项目的文件夹结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个 Google 代码 SVN 存储库,用于存储我的学校项目和作业,并允许轻松传输在学校和家之间.

I just created a Google Code SVN repository for storing my school projects and homework, and to allow easy transferring between school and home.

它创建的默认目录是:

https://simucal-projects.googlecode.com/svn/trunk/
https://simucal-projects.googlecode.com/svn/tags/
https://simucal-projects.googlecode.com/svn/branches/>

我从来没有为多个项目使用过仓库,但在阅读了以下内容后:一个 svn 存储库还是多个?我决定为我的所有随机学校项目创建一个存储库.

I've never used a repository for more than one project, but after reading: One svn repository or many? I've decided to have a single repository for all of my random school projects.

我是否应该只复制上面的文件夹结构,但对于每个项目?

Should I just replicate the folder structure above, but for each project?

https://simucal-projects.googlecode.com/svn/projectA/trunk/
https://simucal-projects.googlecode.com/svn/projectA/tags/
https://simucal-projects.googlecode.com/svn/projectA/branches/

https://simucal-projects.googlecode.com/svn/projectB/trunk/
https://simucal-projects.googlecode.com/svn/projectB/tags/
https://simucal-projects.googlecode.com/svn/projectB/branches/

这是多项目合一存储库的人所做的吗?

Is this what you multi-project-in-one-repo people do?

推荐答案

对此您有两个选择.您已经提到的那个,那就是为每个项目设置一个主干(选项 1):

You have two options for this. The one you already mentioned, and that is to have a trunk for each project (option 1):

https://simucal-projects.googlecode.com/svn/projectA/trunk/
https://simucal-projects.googlecode.com/svn/projectA/tags/
https://simucal-projects.googlecode.com/svn/projectA/branches/

https://simucal-projects.googlecode.com/svn/projectB/trunk/
https://simucal-projects.googlecode.com/svn/projectB/tags/
https://simucal-projects.googlecode.com/svn/projectB/branches/

选项 2 是有一个主干,每个项目都是主干下的一个子文件夹:

Option 2 would be to have one trunk with each project being a subfolder under trunk:

https://simucal-projects.googlecode.com/svn/trunk/projectA/
https://simucal-projects.googlecode.com/svn/tags/projectA/
https://simucal-projects.googlecode.com/svn/branches/projectA/

https://simucal-projects.googlecode.com/svn/trunk/projectB/
https://simucal-projects.googlecode.com/svn/tags/projectB/
https://simucal-projects.googlecode.com/svn/branches/projectB/

选项 1 的优点是您可以独立地对每个项目进行分支和标记.如果您需要单独部署每个项目,这是可取的.

The advantage of option 1 is that you can branch and tag each project independently. This is desirable if you need to deploy each project seperately.

如果所有项目都部署在一起,则选项 2 是可取的.这是因为您只需在部署时标记存储库一次.

Option 2 is desirable if all the projects are deployed together. This is because you only have to tag the repository once when deploying.

由于您将 Subversion 用于学校项目,您需要问问自己是否需要标记您的工作.您还可以问自己是否需要创建分支(如果您想尝试一下,您可能会想要).您还需要问问自己,您是否愿意将所有工作作为一个整体进行分支,您是否更喜欢独立分支每个项目的灵活性.

Since you are using Subversion for school projects, you need to ask yourself whether you will ever need to tag your work. You can also ask yourself whether you ever need to create branches (you probably would want to if you want to experiment a bit). You will also need to ask yourself whether you are happy to branch ALL your work together as one, of whether you prefer the flexibility of branching each project independently.

我始终遵循的经验法则:将我们一起部署的任何内容集中在一起.

The rule of thumb that I always follow: trunk together whatever we deploy together.

(顺便说一句 - 你可以在同一个仓库中有很多中继 - 这几乎相当于在多个仓库中拥有一个中继,除了每个仓库维护自己的修订计数器并且你不能在仓库之间合并.)

(By the way - you can have many trunks in the same repository - this is almost equivalent to having one trunk in multiple repositories, except that each repository maintains its own revision counter and you cannot merge between repositories.)

这篇关于一个SVN存储库中多个项目的文件夹结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆