颠覆-svn:externals应该从哪里来? [英] Subversion - where should the svn:externals come from?

查看:118
本文介绍了颠覆-svn:externals应该从哪里来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在这里建立一个工作规则,所有svn:externals引用都应来自另一个项目的标签之一,而不应来自其主干或任何分支.这是一个合理的规则,还是您看到这种方法的问题?我试图建立一个稳定的开发环境,但我想知道这条规则是否会使开发速度变慢或变得更加困难.

I am about to establish a rule at work here that all svn:externals references should come from the one of the other project's tag, never from its trunk or from any of its branches. Is this a reasonable rule or do you see problems / issues with this approach? I am trying to achieve a stable development environment and I wonder if this rule would make development slower or more difficult.

推荐答案

您担心的是,带有"svn:externals"的项目可以更改,而无需对该项目进行任何提交.这是一个问题,因为很难发现突破性的更改或回滚到一个好的版本.

Your concern is that a project with "svn:externals" can change without any commits to that project. That's a problem because it's hard to discover the breaking change or to roll back to a good version.

所以是的,要求svn:external引用是稳定的是一个好规则.仅允许引用标签是实现此目的的一种方法.另一种方法是使用-r语法将外部固定到固定修订版.范例来自颠覆书:

So yes, demanding that svn:external references are stable is a good rule. Only allowing references to tags is one way to achieve that. Another way is to use the -r syntax to pin the external to a fixed revision. Example from the subversion book:

third-party/skins -r148 http://svn.example.com/skinproj

这还将保护您免受标签更改的影响,这是一种比我更常见的不良做法.

This will also protect you against changes in tags, a bad practice which is more common than I like.

话虽这么说,但在稳定性和持续集成之间仍然存在权衡.无论如何,您通常经常需要外部依赖项中的更改和错误修复.在这种情况下,您希望CI服务器尽快通知您依赖项的某些更改使您的项目中断,以便可以尽快解决问题.大多数连续集成服务器都支持检查外部.

That being said, there still is a trade-off between stability and continuous integration. Often you need the changes and bug-fixes in the external dependencies anyway. In that case you want to be notified by your CI server as quickly as possible that some change in the dependencies broke your project, so that the problem can be fixed ASAP. Most continuous integration servers have support for checking externals.

由于这个原因,我认为可以保持外部干线跟踪依赖项的干线HEAD(如果有CI服务器).标记和创建稳定的维护分支时,只需将外部设备固定在固定的版本上即可.

For this reason I think it's OK to keep the externals in trunk tracking the trunk HEAD of your dependencies (if you have a CI server). Just pin your externals to fixed revisions when tagging and when creating stable maintenance branches.

这篇关于颠覆-svn:externals应该从哪里来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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