views:

107

answers:

4

I have been using svn:externals to bring the Zend Framework files into my project. This is what my svn:externals looks like:

-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

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';. Should I be doing svn:externals like this instead?

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
+2  A: 

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. I'll look around for it and edit the answer if I find it.

UPDATE: Here's the MWOP post I mentioned. 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.

David Weinraub
It was that blog entry that actually started me on using svn:externals.
Sonny
+1  A: 

The correct revision of the 1.10.7-Tag is 22830 and not 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.

Benjamin Cremer
+1 for the good eye!
David Weinraub
Actually, `22830` was the revision for the entire svn project, NOT the revision of the files in the tagged release. If you browse the folder using the TortoiseSVN Repository Browser, it shows the revisions in the file listing.
Sonny
+1  A: 

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 ;)

Tomáš Fejfar
A: 

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
Sonny