Engineer in Tokyo

hg email and gmail

I just set up my e-mail settings with Mercurial so that I can e-mail patches via my Gmail account. I have Debian installed on my machine which has exim installed by default so it was pretty easy to set up. I’m not terribly versed at setting up mailing agents so I basically followed these instructions on the Debian Wiki. After getting that set up it’s easy to set up Mercurial to use exim4 since it’s a drop in replacement for sendmail.

To set up Mercurial to use exim I followed the instructions on the Mercurial Wiki:

email::
...
method;;
    Optional.  Method to use to send email messages.  If value is
    "smtp" (default), use SMTP (see section "[smtp]" for
    configuration).  Otherwise, use as name of program to run that
    acts like sendmail (takes "-f" option for sender, list of
    recipients on command line, message on stdin).  Normally, setting
    this to "sendmail" or "/usr/sbin/sendmail" is enough to use
    sendmail to send messages.

  Email example:

    [email]
    from = Joseph User <joe.user@example.com>
    method = /usr/sbin/sendmail

So here is my very simple ~/.hgrc file:

[ui]
username = Ian Lewis <IanMLewis@gmail.com>
[email]
from = Ian Lewis <IanMLewis@gmail.com>
method = /usr/sbin/exim4

Simple. Now I just enable POP for my gmail and I can use hg email and it will go through my gmail account. Now only if the Mercurial guys would fix this issue so I can send the patch email with the correct encoding.