在所有项目中共享组件,是否有比svn:externals更好的替代方案? [英] Shared components throughout all projects, is there a better alternative than svn:externals?

查看:168
本文介绍了在所有项目中共享组件,是否有比svn:externals更好的替代方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的情况:我有几个组件,有时会对它们进行更改,并且在许多不同的项目中共享.每个项目将它们放在一个名为/depends的子文件夹中. Depends为我们所有的通用组件都提供了一堆svn外部组件.

My situation: I have several components, which sometimes have changes to them, and are shared across a lot of different projects. Each project puts these in a subfolder called /depends. The depends holds a bunch of svn externals for all of our common components.

svn:外部因素给我造成了很多时间和痛苦.

svn:externals is causing me a lot of time and pain.

  • 在项目根文件夹上显示日志不会显示svn:external文件夹的更改(但有趣的是,提交和更新将对svn:externals起作用)
  • 分支时,svn:externals不会分支.
  • 由于svn:externals上没有分支,因此任何更改通常都会破坏主干.
  • 标签不会冻结其外部.这确实违背了标记的目的.

请记住,我有几个项目(假设本次讨论中的10个项目使用相同的外部环境),因此为每个项目保留正常的提交目录将花费我很多合并时间.

Remember that I have several projects (Let's say 10 for this discussion each using the same externals), so keeping normal committed directories for each project would cost me a lot of merging time.

我的情况是否有更好的选择?

Is there a better alternative for my situation?

推荐答案

我认为部分问题是共享组件的发布周期不一定与项目的发布周期匹配.

I believe part of the problem is that the release cycles for the shared components don't necessarily match the release cycles for the projects.

此处所述的共享组件具有自己的发布周期.换句话说,每个人都可以作为一个单独的项目进行管理(或者可以将它们的集合作为一个单独的项目进行管理),并具有自己的发行/版本号.

Shared components as described here have their own release cycle. In other words each one could be managed as a separate project (or perhaps the collection of them managed as a separate project) with a release/version number all its own.

请注意,svn:externals定义可以包含特定修订版.

Note that the svn:externals definition can include a specific revision.

这允许使用共享组件的每个特定项目(或共享组件的集合)针对特定版本的发布/修订来开发每个使用共享组件的项目,从而提供一组稳定的项目的依赖关系.更改组件不会破坏项目,因为每个项目都在查看组件的特定版本,而不一定是trunk上的HEAD.

This allows each of the projects that makes use of a shared component to be developed against a specific release/revision of that shared component (or the collection of shared components), providing a stable set of dependencies for the project. Changes to the components won't break the projects because each project is looking at a specific revision of the components that isn't necessarily the HEAD on the trunk.

虽然这似乎需要更多工作,但从长远来看,我相信这种做法可以为这种情况提供更好的变更管理流程.

While this may seem like more work up front, I believe in the long run this practice provides a better change management process for this type of situation.

这篇关于在所有项目中共享组件,是否有比svn:externals更好的替代方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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