需要存储库布局参考

发布于 2024-10-08 08:58:10 字数 313 浏览 0 评论 0原文

我期待着一场关于 Subversion 存储库的战斗:目前我们有一个 Web 应用程序,它被签入为 3 个主要项目和 2 个报告项目(当我 6 个月前开始时),现在已达到 7 个项目,并且预计会进一步增长。

对我来说,显然这是不对,如果您想合理使用版本控制系统,编译后的可执行文件不能跨越版本控制边界。对单个功能进行一次签入是不可能的,这对我来说似乎很重要。

但当我试图解释这一点时,我感觉自己在挥手。有没有人有任何关于 Subversion 或一般情况的参考资料,阐述了这一原则并在其背后拥有一定的权威?我做了一些搜索,但没有找到我需要的东西。

I am anticipating a battle over Subversion repositories: currently we have a single web application that was checked in as 3 main projects and 2 reports projects (when I started 6 months ago), is now up to 7 projects, and is expected to grow further.

It is obvious to me that this is just not right, that a compiled executable cannot cross a version-control boundary if you want to make reasonable use of the version-control system. It's impossible to have a single checkin for a single feature, and that seems essential to me.

But I feel like I'm hand-waving when I try to explain this. Does anyone have any references, for Subversion or in general, that lays out this principle and has some authority behind it? I've done some searching and am just not coming up with what I need.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如日中天 2024-10-15 08:58:10

Subversion 中有很多选项可以帮助您构建存储库。请参阅存储库布局的讨论 在文档中。

我通常会遵循以下规则:

  • 是否是不同的项目,没有重叠,不是相同的用户或组?
    ==>您可以使用不同的存储库(但不是强制的)。
  • 是否有独立的部分将被相互独立地跟踪和构建?==> 使用所谓的“多项目布局”(见下文)。
  • 您是否开发单个应用程序,并在不同的团队中工作,使用所谓的“单项目布局”,

区别如下:

  • 单个项目布局:

     回购我的项目:
     树干/
       爪哇/
         源代码/
       红宝石/
       文档/
       ...
     标签/
       rel1.0/
         java(引用修订版xxx的java副本)
         ruby(引用修订版 xxx 的 ruby​​ 副本)
         ...
       rel1.1/
         ...
     分支机构/
       特征_x/
         java(引用修订版 yyy 的 java 副本)
         ...
    
  • 多项目布局:

     仓库 MyProjectBundle:
     项目1/
       树干/
         爪哇/
           源代码/
       标签/
         rel1.0/
           java(引用修订版xxx的java副本)
           ...
         rel1.1/
           ...
       分支机构/
         特征_x/
           ...
     项目2/
       树干/
       标签/
       分支机构/
     ...  
    

主要区别如下:

  • 在多项目布局中,对所有项目进行标记和分支非常困难,通常只标记一个项目。
  • 它是一个单一的项目布局,您可以随意分支和标记,通常是整个主干。然后,您可以更改您想要更改的内容,在一个修订中提交所有内容,然后一步将其合并回来。

作为参考,我只有引用的SVN红皮书,当然还有stackoverflow中的众多答案之一: Subversion Repository布局

There are a lot of options in Subversion how to structure your repository. See the discussion of repository layout in the documentation.

I would normally follow these rules:

  • Is something a different project, no overlap, not the same users or groups?
    ==> You may use different repositories (but are not forced to.
  • Are there independent parts that will be tracked and built independent to each other? ==> Use the so called "multi-project-layout" (see below).
  • Do you develop a single application, and have there in different teams working, use the so called "single-project-layout".

The difference is the following:

  • Single project layout:

     Repo MyProject:
     trunk/
       java/
         src/
       ruby/
       doc/
       ...
     tags/
       rel1.0/
         java (references the copy of java of revision xxx)
         ruby (references the copy of ruby of revision xxx)
         ...
       rel1.1/
         ...
     branches/
       feature_x/
         java (references the copy of java of revision yyy)
         ...
    
  • Multi project layout:

     Repo MyProjectBundle:
     proj1/
       trunk/
         java/
           src/
       tags/
         rel1.0/
           java (references the copy of java of revision xxx)
           ...
         rel1.1/
           ...
       branches/
         feature_x/
           ...
     proj2/
       trunk/
       tags/
       branches/
     ...  
    

So the main differences are the following:

  • In multi project layout, it is pretty difficult to tag and branch over all projects, only one project is normally tagged there.
  • It a single project layout, you may branch and tag at will, and normally with the whole trunk. You may then change what you want to change, commit everything in one revision, and merge that back in one step.

As a reference, I only have the quoted SVN red book, and of course one of the many answers in stackoverflow: Subversion Repository Layout

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文