by Tim Hunt.
I wrote a blog post explaining (at least some parts of) how we do things at the OU: http://tjhunt.blogspot.co.uk/2014/01/moving-ou-moodle-code-to-moodle-261.html
The approach Andrew describes probably requires a bit more work, but is more disciplined, and probably better in the long run.