mtrichardson


Beautiful Mercurial/hg commit emails with CVSSpam

Entry posted on May 12, 2009.

So we use Mercurial. We like it. This post isn't about why we use it instead of git. It's about making something ugly pretty. Well, prettier.

We have central repositories to which developers push. We all get an email when somebody pushes upstream with a diff of their changes. Unfortunately, the diff emails it sends out on changes are something to be desired - they're pretty ugly and annoying to read. Sure, we're all used to the diff format, but it's better to have something prettier.

In the CVS world, sometime before the first dinosaur walked the earth, CVSSpam was the way to get pretty commits. Check out this example of an email. It's nice and easy to read. It's also something we can hook into Mercurial.

Now, this isn't anything new - we've been having nice html emails with hg for a while now. However, with 1.2, we were hit with a lot of changes that totally destroyed our hacked-together-script-stolen-from-Lord-knows-where. I spent a little while figuring out what happened to get them nice and pretty again. Then I put it all on a bitbucket project for all of you to play with. There's a README in there that's pretty self explanatory.

Keep in mind that this isn't really my work - it's work done by somebody else that I've updated to work with the latest mercurial. If you know who the person is who originally did it (or, better yet, are that person), please get in touch so I give proper kudos and all that.

Go forth and have pretty commit emails!