← Back to team overview

ffc team mailing list archive

hg commit info

 

I have tried to make hg generate emails to the mailing list whenever a
push occurs to the primary repository, but this does not seem to be
possible (without too much manual intervention). Instead, I have set
up my local repository to generate emails on commits, which seems to
be more in line with the philosophy of hg.

As a result, an email is generated every time I make a commit to my
local repository, but not when I push changes to the public repository
on fenics.org. Note that there may (and perhaps should) be several
commits between each push, so commits that are announced to the
mailing list may not be directly available from the public repository.
If you want to track when changes occur in the public repository,
simply point your browser to http://www.fenics.org/hg/ffc or read the
RSS feed for hg/ffc (available on the same page).

Here's how to set up the automatic emailing (taken from the hg wiki):

In ~/.hgrc, add the following lines and edit appropriately:

[ui]
username = "Anders Logg <logg@xxxxxxxxx>"

In .hg/hgrc in your working repository, add the following lines:

[hooks]
commit = /path/to/script/notify-ffc.sh

and put the following in the script notify-ffc.sh:

#!/bin/sh

SUBJECT=`hg log -r $NODE | grep "^summary:" | cut -b 14-`
hg log -vpr $NODE | mail -s "[HG] $SUBJECT" ffc-dev@xxxxxxxxxx

If you want me to be able to pull changes from your tree and merge
with the official tree, then publish your repository somewhere,
perhaps under ~/hg/ffc on your account on fenics.org (if you should
have one) or publish it on the web.

/Anders



Follow ups