Recent Entries

Rss Feed

Related Entries

pysvn - Turning source control into programming

Friday, September 1st, 2006

OK. So I spent the day today working with the coolest python module: pysvn. The SVN command line is already great for doing every day tasks like checking out and committing from the console (cygwin for us windows geeks), but sometimes you need more. Well that more is pysvn.

Python itself is a glorious language. I’m a system programmer in C, and I’ll swear by C until my dying day. But, python owns all the rest when it comes to scripting. Python integrates with any language, is easy to learn, can be typed on the fly from a console for debugging purposes, and has libraries for all of your favorite products, like Mysql and Subversion.

What else? No memory management hassles, easy installation, built in packaging functions to use for your own build scripts, objects, dictionaries, lists on the fly….etc. I could talk all day about how sweet python is, but what’s important for now is pysvn.

Pysvn is exactly what you’d expect a near-perfect library to be: it converts the SVN APIs into python classes, functions, and data structures. Ever use the mysql libraries for PHP or Python? They both look exactly like the C libraries. That’s what makes a good interface.

In just a couple hours and 200 lines of code, I’ve created an automated script to branch/tag from one branch to a release branch, generate and fully-format all of the release notes from the SVN logs, switch to the new branch, and launch the compiler/linker to build the project from source code.

I’m definitely going to modify this script to read the Joomla installer’s .xml file and automatically create release .zips and release notes, ending the tedium forever. I’ll let you Joomlanders know when I do.

2 Responses to “pysvn - Turning source control into programming”

  1. Andrew Robert Says:

    If you do not mind, I would really be interested in seeing this script. We are looking at a similar use.

    If you could send me a copy to andrew.arobert@gmail.com, it would be greatly appreciated.

  2. Brent Says:

    I can’t give you the script because it contains proprietary information. I can certainly rewrite the parts that do sometime and get them to you. The alternative would be just helping you if you have problems.

    Brent

Leave a Reply