一个 SVN 存储库还是多个? [英] One SVN repository or many?

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

问题描述

如果您有多个不相关的项目,将它们放在同一个存储库中是个好主意吗?

If you have multiple, unrelated projects, is it a good idea to put them in the same repository?

myRepo/projectA/trunk
myRepo/projectA/tags
myRepo/projectA/branches
myRepo/projectB/trunk
myRepo/projectB/tags
myRepo/projectB/branches

或者你会为每个创建新的存储库?

or would you create new repositories for each?

myRepoA/trunk
myRepoA/tags
myRepoA/branches
myRepoB/trunk
myRepoB/tags
myRepoB/branches

各自的优缺点是什么?我目前能想到的就是你得到混合的修订号(那又怎样?),并且你不能使用 svn:externals 除非存储库实际上是外部的.(我觉得?)

What are the pros and cons of each? All that I can currently think of is that you get mixed revision numbers (so what?), and that you can't use svn:externals unless the repository is actually external. (i think?)

我之所以这么问是因为我正在考虑将我的多个 repos 合并为一个,因为我的 SVN 主机已经开始按每个 repo 收费.

The reason I ask is because I'm considering consolidating my multiple repos into one, since my SVN host has started charging per repo.

推荐答案

单个与多个问题归结为个人或组织偏好.

The single vs. multiple issue comes down to personal or organizational preference.

多人与单人的管理主要归结为访问控制和维护.

Management of multiple vs. single mainly comes down to access control and maintenance.

单个存储库的访问控制可以包含在单个文件中;多个存储库可能需要多个文件.维护也有类似的问题 - 一个大备份,或者很多小备份.

Access control for a single repository can be contained in a single file; Multiple repositories are may require multiple files. Maintenance has similar issues - one big backup, or a lot of little backups.

我自己管理.有一个存储库,多个项目,每个项目都有自己的标签、主干和分支.如果一个代码库太大,或者我需要物理隔离客户的代码以方便他们使用,我可以快速轻松地创建一个新代码库.

I manage my own. There's one repository, multiple projects, each with its own tags, trunk and branches. If one gets too big or I need to physically isolate a customer's code for their comfort, I can quickly and easily create a new repository.

我最近咨询了一家相对较大的公司,将多个源代码控制系统迁移到 Subversion.他们有大约 50 个项目,从非常小的到企业应用程序和他们的公司网站.他们的计划?从单个存储库开始,必要时迁移到多个存储库.迁移已接近完成,它们仍位于单个存储库中,由于它是单个存储库,因此没有报告任何投诉或问题.

I recently consulted with a relatively large firm on migrating multiple source code control systems to Subversion. They have ~50 projects, ranging from very small to enterprise applications and their corporate website. Their plan? Start with a single repository, migrate to multiple if necessary. The migration is almost complete and they're still on a single repository, no complaints or issues reported due to it being a single repository.

这不是二进制的黑色 &白色问题.

This isn't a binary, black & white issue.

做对你有用的事情 - 如果我在你的位置上,我会尽可能快地将项目合并到一个存储库中,因为我可以输入命令,因为成本将是我(非常非常小的)公司的主要考虑因素.

Do what works for you - were I in your position, I'd combine projects into a single repository as fast as I could type the commands, because the cost would be a major consideration in my (very, very small) company.

JFTR:

修订号 在存储库之外确实没有任何意义.如果您需要为修订版提供有意义的名称,请创建一个 TAG

提交消息可以通过存储库中的路径轻松过滤,因此仅阅读与特定项目相关的消息是一项微不足道的练习.

Commit messages are easily filtered by path in the repository, so reading only those related to a particular project is a trivial exercise.

请参阅 Blade 的回复,了解有关对 SVN 使用单一授权/身份验证配置的详细信息.

See Blade's response for details on using a single authorization/authentication configuration for SVN.

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

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