多个 SVN 存储库或单个公司存储库

编程入门 行业动态 更新时间:2024-10-26 00:27:57
本文介绍了多个 SVN 存储库或单个公司存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们应该为所有公司拥有一个包含许多开发项目的存储库,还是每个项目一个存储库?关于经验/最佳实践的任何想法?

Should we have one single repository for all the company, which contains many development projects, or a repository per project? Any ideas on experience / best practice?

推荐答案

就我个人而言,我肯定更喜欢每个项目单独的存储库.有几个原因:

Personally I would definitely prefer separate repository per project. There are several reasons:

  • 修订号.每个项目存储库都有单独的修订序列.

  • Revision numbers. Each project repository will have separate revisions sequence.

    粒度.对于每个项目的存储库,您无法提交到具有相同修订号的不同项目.我更多地认为这是优势,而有人会说这是一个缺陷.

    Granularity. With repository per project you just can't make a commit into different projects having the same revision number. I assume this more as advantage, while someone would say that it is a flaw.

    存储库大小.你的项目有多大?它有源代码控制下的二进制文件吗?我敢打赌它有.因此,大小很重要 - 二进制文件的每次修订都会增加存储库的大小.最终它变得笨拙并且难以支持.应支持二进制文件存储的细粒度策略,并提供额外的管理.至于我,我仍然找不到如何从存储库中完全删除二进制文件(由一些愚蠢的用户提交)及其内容历史记录.使用每个项目的存储库会更容易.

    Repository size. How large is your project? Does it have binaries under source control? I bet it has. Therefore, size is important - each revision of binary file increases size of the repository. Eventually it becomes clumsy and it's hard to support. Fine-grained policy of binary files storage should be supported, and additional administration provided. As for me, I still can't find how could I completely delete binary file (committed by some stupid user) and its contents history from repository. With repository per project it would be easier.

    内部存储库组织.我更喜欢细粒度、非常有组织、自包含、结构化的存储库.有一个图表说明了存储库维护过程的一般(理想)方法.我想您会同意,不可能在一个仓库中使用所有项目"的方法.例如,我的仓库初始结构(每个项目仓库都应该有)是:

    Inner repository organization. I prefer fine-grained, very organized, self contained, structured repositories. There is a diagram illustrating general (ideal) approach of repository maintenance process. I think you would agree that it is just NOT POSSIBLE to use 'all projects in one repo' approach. For example, my initial structure of repository (every project repository should have) is:

    /project /trunk /tags /builds /PA /A /B /releases /AR /BR /RC /ST /branches /experimental /maintenance /versions /platforms /releases

  • 回购管理.每个项目的存储库"在用户访问配置中有更多的可能性.虽然它更复杂.但也有一个有用的功能:您可以配置存储库以使用相同的配置文件

  • Repo administration. 'Repository per project' has more possibilities in users access configuration. It is more complex though. But there is also helpful feature: you can configure repositories to use the same config file

    回购支持.我更喜欢单独备份存储库.有人说,在这种情况下,不可能将一个 repo 中的信息合并到另一个 repo 中.你到底为什么需要那个?需要这种合并的情况表明源代码控制的初始方法是错误的.项目的演变假设后续项目分离为子模块,而不是相反.我知道有办法做到这一点.

    Repo Support. I prefer backing up repositories separately. Somebody says that in this case it is not possible to merge info from one repo into the other. Why on earth you would need that? The case when such merge is required shows that initial approach to source control is wrong. Evolution of the project assumes subsequent project separation into submodules, not the other way. And I know that there is approach to do that.

    svn:externals.每个项目的存储库"方法鼓励使用 svn:externals.当项目和子模块之间的依赖关系通过软链接建立时,这是一种健康的情况,即 svn:externals.

    svn:externals. 'Repository per project' approach encourages svn:externals usage. That is a healthy situation when dependencies between project and submodules is established via soft links, which svn:externals is.

    结论.如果您想保持源代码控制简单,请使用 one 存储库.如果你想使软件配置管理正确:

    Conclusion. If you want to keep source control simple, use one repository. If you want to make software configuration management RIGHT:

  • 使用'repository per project' 方法
  • 引入单独的软件配置经理角色并为其分配团队成员
  • 聘请优秀的管理员,可以应付所有颠覆技巧:)
  • 附注.顺便说一下,尽管我一直在使用 SVN 并且我喜欢它,每个项目的存储库"方法是我认为 DCVS 系统从存储库组织的角度来看更具吸引力的原因.默认情况下,DCVS repo 是项目.甚至没有单对多"可能的问题,这只是胡说八道.

    PS. By the way, in spite I work with SVN all the time and I like it, 'repository per project' approach is why I see DCVS systems more attractive from the repository organization point of view. In DCVS repo is the project by default. There is even no question 'single vs multiple' possible, it would be just nonsense.

    更多推荐

    多个 SVN 存储库或单个公司存储库

    本文发布于:2023-11-03 06:45:55,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1554483.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:多个   公司   SVN

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!