mercurial: 3 new changesets
Thomas Arendsen Hein
thomas at intevation.de
Fri Dec 16 17:57:50 UTC 2005
* Mercurial Commits <hg at intevation.org> [20051216 18:43]:
> 3 new changesets in mercurial:
With mpm's permission I'll send these commit messages when there are
new changesets in the main repository, but at most hourly.
The shell script which I use for this is attached. If you want to
use it, add the following changegroup hook to your .hg/hgrc:
[hooks]
changegroup = hg-changegroup-mailhook "repo name" "http://hg.example.com/path/to/repo" "Recipient1 Name <recipient1 at example.com>" "Recipient2 Name <recipient2 at example.com>" -- -F "Sender Name" -f "sender at example.com"
The second line is very long, you may want to put in a separate
shell script and call.
Because this is a changegroup hook, only push/pull into the repo is
accounted. I haven't tested this, but the script may work with the
commit hook, too.
Thomas
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
-------------- next part --------------
#!/bin/sh
#
# Copyright (C) 2005 by Intevation GmbH
# Authors:
# Thomas Arendsen Hein <thomas at intevation.de>
#
# This program is free software under the GPL (>=v2)
# Read the file COPYING coming with the software for details.
PATH=$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games; export PATH
PYTHONPATH="$HOME/lib/python/"; export PYTHONPATH
CHANGESETS=`hg log -q -r "$NODE:"|wc -l`
if [ $CHANGESETS -gt 1 ]; then
SUBJECT="$1: $CHANGESETS new changesets"
INTRO="$CHANGESETS new changesets in $1:"
else
SUBJECT="$1: new changeset"
INTRO="New changeset in $1:"
fi
BASEURL="$2"
shift
shift
{
echo "$INTRO"
echo
hg log -q -r "$NODE:" | while IFS=":" read rev node; do
echo "$BASEURL?cs=$node"
hg log -r "$rev"
done
echo "-- "
echo "Repository URL: $BASEURL"
} | mail -s "$SUBJECT" "$@"
exit 0
More information about the Mercurial
mailing list