The Artima Developer Community
Sponsored Link

Python Buzz Forum
[Minimal] pure PHP Subversion client

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Phillip Pearson

Posts: 1083
Nickname: myelin
Registered: Aug, 2003

Phillip Pearson is a Python hacker from New Zealand
[Minimal] pure PHP Subversion client Posted: Feb 6, 2009 4:05 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Phillip Pearson.
Original Post: [Minimal] pure PHP Subversion client
Feed Title: Second p0st
Feed URL: http://www.myelin.co.nz/post/rss.xml
Feed Description: Tech notes and web hackery from the guy that brought you bzero, Python Community Server, the Blogging Ecosystem and the Internet Topic Exchange
Latest Python Buzz Posts
Latest Python Buzz Posts by Phillip Pearson
Latest Posts From Second p0st

Advertisement

Something interesting I did back in 2006 was write a pure PHP parser for the Subversion REPORT XML format, which is what a Subversion server sends in response to a checkout or update request. The code could check out a fresh copy of a repository, and also handle the XML well enough to update from revision to revision. I did this to implement the auto-update process for PeopleAggregator, for Broadband Mechanics.

It's worked pretty well, and I'm pretty proud of the code... not its beauty, because it's fairly inscrutable, but in that it worked at all, and that it was as reliable as it was. I think it took a few days to write, and after a couple of minor bugs found over the next week or two, we didn't find anything wrong with it until much later, when we shipped an update which deleted a file, which was a case I hadn't considered when writing it. After fixing that it worked just fine from then on.

Anyway, Marc gave me permission to release this as open source under the MIT license (like CC-BY: fairly unrestricted use, with attribution) a year or two back, and people have asked me about it from time to time, but I've never actually put up an official copy with the MIT license on it. So, here you go:

pure-php-subversion on GitHub.

I never spent the time to properly extricate it from PeopleAggregator, so you'll need to hack PAStateStore.php into something that fits your own database, and figure out the schema. If someone wants to write a pure-PHP handler for .svn directories, or even a generic state store which stores hashes like PAStateStore (but maybe in a flat file rather than a database), that would be brilliant. Fork and enjoy!

Comment

Read: [Minimal] pure PHP Subversion client

Topic: This is Python: context managers and their use Previous Topic   Next Topic Topic: Screencast: manage content with Plone, develop front end web app with your favorite Python framework

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use