连续集成的Subversion [英] Subversion with Continuous Integration

查看:187
本文介绍了连续集成的Subversion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,如果这个问题的答案已经存在,我还没有找到它们。

Sorry if answers to this question already exist, I did not find them yet.

我是一个网站开发团队的成员,发布管理与Subversion一起使用。这是我在向门户添加新功能时的工作方式:

I'm member of a web development team, we maintain a web portal. Release Management works with Subversion. This is how I work when adding new features to the portal:


  • 通过复制中继线创建新分支

  • 在该分支中开发

  • 定期将来自Trunk的更新合并到该分支中(我想知道Framework-更改在转到UAT /集成之前是否会中断我的代码,例如)

  • 将分行重新集成到中继线中,以便让分支机构生效

  • Create a new Branch by copying the Trunk
  • Develop in that Branch
  • Periodically merge updates from the Trunk into that Branch (I want to know if Framework-Changes break my code, before it goes to UAT / Integration, e.g.)
  • Re-Integrate the Branch into the Trunk in order to let it go live

现在我们有持续集成的问题:

Now we have a problem with Continuous Integration:


  • 每X周定期上线

  • 存在计划在不同日期上线的分支

  • Integration Server每天每X小时执行一次Trunk检查,并将所有分支(应显式转到集成系统)合并到其中

  • 已合并到每个分支中的Trunk更新(见上文)现在会生成树状冲突

  • Periodical Go-Live every X weeks
  • Several Branches exist which are planned to go-live on different dates
  • Every X hours a day, Integration Server does a Trunk checkout and merges all Branches (which should explicitly go to Integration System) into it
  • The Trunk updates which have been merged into each Branch (see above) now generate Tree Conflicts

什么是最佳实践?重新集成不能合并多个分支,因为只要一个分支被集成,工作副本就不再干净了。但是,持续集成必须以某种方式...

What is the Best Practice for that? Re-Integrating doesn't work for merging multiple Branches, because as soon as one Branch is integrates, the working copy isn't clean anymore. However, Continuous Integration must be possible somehow...

如果将Trank更改合并到每个分支中,将创建不同的修订版本。但文件应该有相同的内容和平等。是否有合并选项,如果两个新/更改的文件相同,则忽略冲突?

If Trank changes are merged into each Branch, different revisions are created. But the files should have the same content and be equal. Isn't there a merge-option saying "ignore a conflict if the two new/changed files are identical"?

感谢任何帮助。

推荐答案

您描述的是不连续集成,因为有以下要求:

What you described is not continuous integration because of the following requirement:


每天每X小时,Integration Server执行Trunk检出,
将所有分支(应明确转到集成系统)
合并到

Every X hours a day, Integration Server does a Trunk checkout and merges all Branches (which should explicitly go to Integration System) into it

真实持续集成包括以下步骤:


  • 一个特定分支( trunk )更新源代码。

  • 构建可以执行或部署的构建工件的源代码。有时这一阶段还包括运行单元测试和检查。

  • 显示构建状态,无论它是否成功:绿色或红色。

  • Updating source code from one specific branch (trunk, for example).
  • Building source code producing build artifact which could be either executed or deployed. Sometimes this phase includes also running unit-tests and inspections.
  • Shows build status, whether it was successful or not: green or red.

如果您有多个分支,则意味着您需要为多个分支配置多个构建计划,以便为每个分支执行持续集成分开。

If you have several branches, it means that you need to configure several build plans for several branches in order to perform continuous integration for each branch separately.

因此,对于您描述的内容,可能没有最佳做法,因为合并应始终手动执行。这是由于合并冲突。它们经常发生,只能手动解决。持续集成不会有帮助。

Therefore, there could be no best practice for what you described because merges should always be performed manually. This is due to the merging conflicts. They happen quite often and can be resolved only manually. Continuous integration won't help.

如果你只是混淆了术语,并想执行你所描述的内容,我会说你的开发过程有点有缺陷。可能,您不需要同时从多个分支执行合并。您最常提供的所有开发应集中在一个分支。

If you just confused with terms and want to perform what you described anyway, I would say that your development process is little bit flawed. Probably, you do not need to perform merging from several branches simultaneously. All development you deliver most often should be concentrated in one branch. Most often such 'one' branch would be trunk.

在你的情况下,似乎有价值的开发分散在几个分支之间。那是不对的。一旦你决定一些功能应该被包含到即将到来的版本中,它应该被集成到一个(可能是父)分支,并保持作为代码库的一部分。尝试减少您拥有的分支数。

In your case it seems that valuable development is dispersed between several branches. That's not right. Once you decide that some functionality should be included into upcoming release, it should be integrated into one (probably parent) branch and stay there as a part of the codebase. Try to reduce number of branches you have.

总而言之,


  1. 排除
  2. $ $ b $ b
  3. 如果您确定需要始终拥有分支,请分别为每个分支配置持续集成。

  4. 否则(你不需要一直保持分支,并且一旦开发完成,他们很容易重新集成到父分支中)将分支数减少到最小

  1. Exclude merge all branches step from your process (this is not to be done automatically).
  2. Do merging manually instead.
  3. In case you sure you need to have branches all the time, configure continuous integration for such each branch separately.
  4. Otherwise (you do not need to keep branches all the time, and they can be easily reintegrated into parent branch once the development is finished) reduce number of branches to a minimum.

祝你好运!

这篇关于连续集成的Subversion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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