[GUIDE] Using the Development Version (SVN)

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

[GUIDE] Using the Development Version (SVN)

Post by Chris Corbyn »

NOTE: Swift has only been in SVN as of 20th November 2006 and at version 2.1.17 so older code can only be found in the FTP respository.

----------------------------------------------------------------------------------------------------------------

For those who already know how to use subversion

PHP5 Tree `svn co https://swiftmailer.svn.sourceforge.net ... trunk/php5 swift'
PHP4 Tree `svn co https://swiftmailer.svn.sourceforge.net ... trunk/php4 swift'

----------------------------------------------------------------------------------------------------------------

Swift Mailer's source tree can be found under version control at SourceForge using Subversion.

To access the subversion repository you will first need to install the subversion client. You can download that from the makers at:

http://subversion.tigris.org/

Once you have subversion installed you are ready grab the latest copy of Swift, but first you need to know about the structure of the repository to avoid downloading hundreds of megabytes covering various branches.

Subversion repositories are typically set up with the following directories:

project/trunk
project/tags
project/branches

The "trunk" directory is where the current working version is generally stored and for the most part you may happily check this out and assume it will be safe to use. You CANNOT bank on this being as stable as a packaged tarball or zip though.

However, because I maintain a PHP4 branch, and a PHP5 branch I have decided to split my trunk into two directories like so:

swiftmailer/trunk/php5
swiftmailer/trunk/php4

Make sure you remember which one you want to access otherwise you'll finish up with two copies.

For example check out the current working version of Swift for PHP5 simply run the following in a console window:

svn co https://swiftmailer.svn.sourceforge.net ... trunk/php5 swiftmailer

That will download all the source code into a foler called "swiftmailer". Make sure you are in the directory you want the source code in before you do the checkout. You may replace "svn co" with "svn checkout" if you prefer. It means exactly the same thing but is a little clearer.

I also keep a copy of each release in the tags directory. Like the trunk, tags is also split two ways:

swiftmailer/tags/php5
swiftmailer/tags/php4

If you wanted to download Swift as it was at packaged release "2.1.17" for PHP5 you would execute:

svn co https://swiftmailer.svn.sourceforge.net ... hp5/2.1.17 Swift-2.1.17

Under the "branches" directory you will find unstable/unfinished code which I'm working on. If you check this out it should be purely for your own browsing, never use anything in production which you find sitting in the branches directory unless I've specifically pointed it out ;)

To update your checked out source to the latest version, simply open up a command line and changing your working directory to the Swift directory and then execute:

svn update

Any problems just post here :)
Last edited by Chris Corbyn on Wed Feb 21, 2007 1:17 am, edited 1 time in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Just a quick note to say that if you are currently using the trunk in production DO NOT check out or update the contents of the trunk after 1st December 2006. [ EDIT - This obviously no longer applies ]

Version 3 is on the way and at some point within 2 weeks after 1st December it will be in the trunk. Code written for version 2 will not "just work" with version 3 unless you follow some simple instructions for using a facade. You have been warned ;)
Post Reply