简体   繁体   English

Zend Framework和svn:externals

[英]Zend Framework and svn:externals

I have been using svn:externals to bring the Zend Framework files into my project. 我一直在使用svn:externals将Zend Framework文件带入我的项目中。 This is what my svn:externals looks like: 这就是我的svn:externals看起来像:

-r 22731 http://framework.zend.com/svn/framework/standard/trunk/library/Zend/ Zend
-r 22731 http://framework.zend.com/svn/framework/extras/trunk/library/ZendX/ ZendX

I have it tied to revision 22731 which is the the revision of this repository path: http://framework.zend.com/svn/framework/standard/tags/release-1.10.7 我把它绑定到修订版22731,这是该存储库路径的修订版: http ://framework.zend.com/svn/framework/standard/tags/release-1.10.7

I thought this was the preferred way to use externals, but when I look at the Zend_Version class I notice that it says const VERSION = '1.11.0dev'; 我认为这是使用外部的首选方法,但是当我查看Zend_Version类时,我注意到它表示const VERSION = '1.11.0dev'; . Should I be doing svn:externals like this instead? 我应该做svn:这样的外部吗?

http://framework.zend.com/svn/framework/standard/tags/release-1.10.7/library/Zend/ Zend
http://framework.zend.com/svn/framework/standard/tags/release-1.10.7/extras/library/ZendX/ ZendX

I do it the latter way, linking to a tagged version and it works great. 我是后一种方式,链接到标记版本,它很好用。

In fact, I believe Matthew Weier O'Phinney had a blog post recommending this approach. 事实上,我相信Matthew Weier O'Phinney有一篇博客文章推荐这种方法。 I'll look around for it and edit the answer if I find it. 如果我找到它,我会环顾四周并编辑答案。

UPDATE: Here's the MWOP post I mentioned. 更新:这是我提到的MWOP帖子 Interestingly, I remembered it incorrectly. 有趣的是,我记得错了。 In the comments, he identifies your method - point to a specific revision - as the absolutely foolproof method, noting that that it is possible, though extremely rare, for a tagged version to change. 在评论中,他确定了您的方法 - 指向特定修订 - 作为绝对万无一失的方法,并指出标记版本可能会发生变化,尽管极为罕见。

The correct revision of the 1.10.7-Tag is 22830 and not 22731 . 1.10.7-Tag的正确版本是22830而不是22731 Just check your link. 只需检查您的链接。

I prefer to checkout my externals tagged. 我更喜欢检查我的外部标签。 It is much more convenient to have a release version number than a long revisionnumber. 发布版本号比长版本号更方便。
If I use tags I know it's a released (stable-)version. 如果我使用标签,我知道它是一个已发布的(稳定版)版本。

Based on the feedback, a hybrid of the two seems like the best option: 根据反馈,两者的混合似乎是最好的选择:

-r 22731 http://framework.zend.com/svn/framework/standard/tags/release-1.10.7/library/Zend/ Zend
-r 22731 http://framework.zend.com/svn/framework/standard/tags/release-1.10.7/extras/library/ZendX/ ZendX

Here is my reasoning: 这是我的推理:

  1. Tags are designed for this purpose 标签是为此目的而设计的
  2. Released tags may have build-time changes not in the trunk 发布的标签可能不会在主干中进行构建时更改
  3. Specifying the revision protects against changes introduced to the tag after code has been tested against it 指定修订版可以防止在对代码进行测试后引入标记的更改

You definetly SHOULD use the tag to checkout externals. 你肯定应该使用标签来检查外部。 There is no need to look for specific revision. 没有必要寻找具体的修订版。 That's what are tags made for ;) 这就是为标签制作的;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM