email notification setup

Matt Mackall mpm at selenic.com
Thu Sep 22 11:57:58 CDT 2005


On Thu, Sep 22, 2005 at 06:26:13PM +0200, Zbynek Winkler wrote:
> Matt Mackall wrote:
> 
> >>Does anyone have an email notificator ready for use with mercurial 
> >>changegroup hook?
> >>   
> >>
> >Add this to .hg/hgrc:
> >
> >[hooks]
> >commit = commithook
> >
> >And put this in your path:
> >
> >#!/bin/sh
> >
> >SUBJECT=`hg log -r $NODE | grep "^summary:" | cut -b 14-`
> >hg log -vpr $NODE | mail -s "commit: $SUBJECT" commit-list at example.com
> > 
> >
> Thanks. I replaced 'commit' with 'changegroup' since I want to set this 
> up in a remote repo that nobody commits to.
> 
> Where does $NODE come from? It tells me that

The changegroup hook doesn't get passed a node, good point. What should
really happen is that when you do a push, the remote should call
'changegroup <first new node>' and 'commit <node>' for
each new node.

Ho hum, I'll fix it.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list