Saturday 22 January 2011

Python development & SVN

My old laptop is an Acer, and of course, it has long suffered from the notion that should it be asked to do any real work (like checkout an SVN repository) it must instantaneously turn off. Heaven forbid should the temperature go above 20 degrees celcius. So I bought a new laptop, a DELL Inspiron 14R, from an online store in China. Of course, it comes with a version of Windows 7 that only has the Chinese language. I could of course walk out the door and round the corner (literally) and "buy an upgrade" for 3$NZ, but.. that's not going to happen.

Anyway, dealing with unintelligible menu options is nothing compared to getting SVN to work, so that I can work on svn.python.org. Normally, I follow the garbled instructions in the python-dev FAQ, and end up with something that is clunky but works. But today, it didn't, so after a few web searches I ended up with an ideal solution..

  1. Download the Putty installer package, and install it. Mostly, this is for putty.exe, but I will also be using pscp.exe. Add it to the PATH environment variable for all users.
  2. Set up a Putty profile like in the FAQ.
  3. Download the TortoiseSVN installer package, and install it.
  4. Test that TortoiseSVN can access successfully over SSH.
  5. Download and install the SVN command line tools.
  6. Add the full installed path to ...\\TortoiseSVN\\bin\\TortoisePlink.exe the SVN_SSH environment variable for all users. The backslashes must be double ones as shown, for this to work correctly. Unlike the standard plink.exe, the Tortoise version does not have the pop up command shell windows.
  7. Open up a command shell and try: svn ls svn+ssh://svn.python.org. You should get prompted for your SSH key password, which is annoying and will require running pageant.exe.

Thanks to this post for the SVN_SSH hint. Now both the command line tools, and TortoiseSVN just work! Excellent.