多个项目/模块的 SVN 分支模式

SVN Branching pattern for Multiple Projects / Modules

阅读 svnbook I am trying to cleanup the structure of my SVN repository. Chapter 4 - Branching & Merging 后关于使用多个项目的主干、分支和标签布局的讨论。

在我的场景中,我为一系列项目维护了多个模块(库、插件和供应商库)。没有一个项目使用所有模块,但每个模块至少被一个项目使用。

  1. 我可以为引用各个模块版本的每个项目创建一个分支吗?似乎 Complex Tagging 是这个问题的答案...

  2. 如何使用 Complex Tagging 作为项目团队的基准?

  3. 软件工程签出/修改/提交项目的工作流程是什么?例如,来自 Team Rocket 的一名成员想要为 Fred 插件添加一项新功能。 (布局见下文)

  4. 应该在模块或项目的功能分支上进行初始更改吗?

最终我希望看到以下存储库结构:

-Library
| -libFoo
| | -trunk
| | -branch
| | -tags
| |
| -libBar
| | -trunk
| | -branch
| | -tags
| |
| -plugins
|   -pluginFred
|   | -trunk
|   | -branch
|   | -tags
|   | 
|   -pluginBarney
|     -trunk
|     -branch
|     -tags
|
-Projects
  -Galactic
  | -trunk
  | -branch
  | -tags
  |
  -Rocket
    -trunk
    -branch
    -tags

~问候

Can I create a branch for each project that references individual module versions?

是的。

It seems like Complex Tagging is the answer to this

可以回答,但从我的角度来看,这将是肮脏的方式。如果您的任何项目必须作为其树的一部分 一些已知状态 某些模块 也是 SVN 版本,我会更愿意使用SVN externals (directory-type) with externals-sources mapped to needed|wanted version of module. It can be revision-less definition with URL for module's tag|branch (not good but possible for commitable branch, OK for RO tag), or PEG-revision 对于任何模块的 any URL

How could I use Complex Tagging as a baseline for a project team?

我会建议 "nohow"。复杂标签作为临时 hack 很好,但从历史的角度来看很糟糕 - 你将无法重建 "how and from which sources this mixed WC was created before committing",这与(完全 PEG-ged)WC 与外部所有使用的模块相反

What would the workflow be for a software engineering to checkout / modify / commit a project? e.g A member from Team Rocket wanted to add a new feature to the Fred plugin.

好吧,我最初的反应是 "It depends",接下来:"Too broad"。实际上,这更多的是管理和行政问题,而不是技术问题,并且依赖于人类而不是技术(并且有很多变化)。简而言之(在理想的美好世界中):

  • TR Dev分支pluginFred,修改,测试,合并分支到pluginFred的主干,再测试
  • Team Rocket PM 接受这些更改并同意使用修改后的 pluginFred
  • Team Rocket 项目中 pluginFred 的外部定义(在某些修订版中)从 URL@OLDREV 更改为 URL@NEWREV(或从 pluginFred/**/URL1 更改为 pluginFred/**/URL2)
  • 其他团队也通过某种方式通知并切换(或不切换)到新版本

团队(和团队之间)良好(快速且防弹)的沟通是工作中最困难的部分。 WIP 没有通信和无 PEG 外部是导致混乱和开发人员地狱的直接途径

Should initial changes be made on a feature branch of the module or the project?

"It depends"...从习惯、ACL、公司规则、存储库的树和跨存储库项目的分离(对于单个整体存储库,您可以随时从任何位置svn复制到任何位置,交叉存储库转移稍微困难一些,但仍有可能)。但共同点 "What's the difference?",如果您有完整的可追溯历史记录(如果您没有 - 您必须拥有)