Updated PHP SVN Client

I’ve been working on a frontend for multiple SVN repositories (I’ll write more about this later) and have been using the the Sixdegrees PHP SVN Client library.Since I’ve made some changes to the library, I thought I’d share them here. The changes/fixes I’ve put in mostly relate to the commit logs (I haven’t really used the other features), but will hopefully be of use to others

Changes:

- Added support for non-standard port numbers (rewrote cleanURL)
- getFileLogs will now include an array of files, if multiple files have been modified
- added setRepository method, to fix mis-spelling of old setRespository method
- various bugfixes (out by one error on getFileLogs)

Download Updated PHP SVN Client (zip, 22kb)

You might want to check the original package page for more information When investigating the SVN/WebDAV procotol, the following links were useful (documented here so I don’t have to find them again)

Update 23/06/08: This project is being actively developed by a few people (including myself). The new project homepage is at http://phpsvnclient.googlecode.com

6 Responses to “Updated PHP SVN Client”

  1. César Rodas Says:

    Hello,

    I want to know If can put all your changes to the project page?.

    Thank you for fix those things, and for share your changes. I hope others copy yours actions.

    best regards.

  2. ethan Says:

    Hi Cesar,

    Absolutely — add it to the project page. Thanks for the great library 🙂

    Ethan

  3. Joomlajohn Says:

    Hi, wondering if your library supports a username and password, Thanks,

    John

  4. ethan Says:

    John, Yes, this version definitely supports usernames and passwords. In fact, my test repositories are all password protected

  5. Deadpan110 Says:

    Hiya,

    I have just started using this class after using the original from the original source

    I had problems with the original and thought it was due to its author and a few mistakes I couldn’t seem to track down. I found this page and uploaded the files to my server – the same errors were occurring.

    I have now found out that my errors are nothing to do with the class (but could probably be rectified within the class), it seems that this class works with most SVN servers and my problems arose while trying to use the Assembla SVN service.

    (I will have to change my average rating on the original authors PHPClasses page)

    I like the fact that you have put the new updated class and dependencies in a nice convenient package – how about using SVN for it (Google code would be a good idea – and i am sure the original author won’t mind as long as the license and perhaps has access to the SVN).

    I would like to see one improvement/enhancement and one minor bug fix (not sure if incompatibility with Assembla is a bug tho).

    Improvement/enhancement would be to return an extra value when using getDirectoryFiles to distinguish between a file or directory, class users could code their way around this – but adding that would make it easier to traverse directories.

    Until PHP’s SVN support is compiled in to every web host, this is a very needed class…

    Thanks heaps!!

  6. Deadpan110 Says:

    Ok, an update on what I have been up to…

    Found a bug where getDirectoryFiles fails to return all results (it seems to miss 1 result (1st?) and if its the only result then an empty array is returned)… not sure if its this version or just inherited from the Generic XML parser class and as such, I have replaced the class for this function with something i found on the php.net website (the same code could probably be used to drop the Generic XML parser class completely).

    The getDirectoryFiles function now returns ‘type’ which is one of ‘file’ or ‘directory’, this will allow a new public function to be added to enable traversing the SVN directory tree and return paths for all the sub directories within the given directory (could be called getDirectoryTree).

    As I am already a fan of PHP and SVN and could do with this class for many of my projects, I have taken it upon myself to add the project to Google Code (with Analylitics) following the BSD license the current class is bound by.

    If you would still like to work/participate on this class, then please find my email address from within your blogs admin pages and I will happily add you to its Google codes admin/owners list (I will be contacting Cesar D. Rodas tomorrow regarding his thoughts – the license is very open but I do feel its polite to ask). 🙂

Leave a Reply