Friday, September 10, 2010

Fetching patches from GMail

We are experimenting in Sugar with moving to a patch workflow closer to that of the Linux kernel, until know we have been tracking tickets in trac.

Since I still haven't managed to drop GMail because of how its conversations feature make so efficient to read mailing lists, I had been copy & pasting the unformatted patches, be them inline in the message or as attachments.

There's clearly quite a bit of room for optimization and after being so spoiled by git-bz (thanks Owen!) and failing to find something close enough to what I wanted, I decided to take this script and adapt it to my workflow.

It's working quite well for just fetching patches from GMail and I'm already thinking of adding some features such as suggesting Reviewed-by and Test-by tags, and closing the associated trac ticket. It would be cool as well to automate a bit patch reviews so I can do it from the command line without having to use another full-fledged mail client. I'm also considering dropping libgmail and move to POP and/or IMAP.

Here is the code in case it's of use to anyone else.

Thanks to Ted Kulp for the initial script.

1 comment:

Unknown said...

Sweet! I had similar "scratch" some time ago and wrote similar sort of script intended to fetch/push patches but the "backend" was pastebin ;)