Mere Code

Diverse Topics of General Interest to the Practicing Programmer

Getting set up with Twisted development

I haven’t contributed much to Twisted recently, but today I’d really like to get my new Deferred documentation ready for review.

To my knowledge, the only sensible way to actually work on Twisted code is using Combinator. With it, I can make branches, commit to those branches, merge in updates from trunk and when my branch is approved, actually land it. All of this is described more fully in Twisted’s pioneering Ultimate Quality Development System.

Combinator works by convention, so its source must live within a Divmod/trunk directory. Since I have the divmod.org code in a colocated Bazaar branch in ~/src/divmod.org, I created a new directory under ~/src/ called Divmod and symlinked trunk to it, approximating the instructions on the Combinator page.

  $ cd src
  $ mkdir Divmod
  $ cd Divmod
  $ ln -s ~/src/divmod.org trunk

Trying to actually use Combinator only got me stack traces and warnings though, so I poked around in the source code and now have a shell script in ~/src/combinator.sh that does this:


  export COMBINATOR_PROJECTS=/home/jml/src
  eval `python ~/src/Divmod/trunk/Combinator/environment.py`

Sourcing that script works:

  $ .  ~/src/combinator.sh

After that, I blew away my checkout of Twisted and made a newer, Combinator-friendly one:

  $ rm -rf ~/src/Twisted
  $ chbranch Twisted trunk \
      svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk

All a little bit of a hassle, but worth it to get back into the swing of contributing to Twisted.

Comments

Jonathan Lange on 2012-12-18 09:08
Thanks. This is largely written so I can refer to it later.
glyph on 2012-12-18 07:09
Thanks for posting the refresher. I hope we can make it less necessary for people to jump through this hoop in the future, but until we do that it's nice to have people making these ad-hoc updates to the docs!