hg notify inter-repo mechanics

John Turner jjturner at energi.com
Fri Jan 2 18:31:15 UTC 2015


On Thu, 01 Jan 2015 13:40:13 -0500, Mads Kiilerich <mads at kiilerich.com>  
wrote:

> On 12/29/2014 06:34 PM, John Turner wrote:
>> Greetings,
>>
>> I'm seeking some clarity on the mechanics and/or best-practices for
>> implementation of hg notify, namely, which side of the execution chain
>> should invoke the mail notification, given a local(n) <-->
>> centralized(1) workflow.
>>
>> Seeing as the notify hook in my local mercurial.ini setup invokes
>> email notification during pushes/pulls/etc. as opposed to the
>> centralized mercurial.ini, then it seems each developer would likewise
>> need to setup the same local notify config in order to ensure a
>> consistent notification process across the team.  My initial
>> expectation was that the passive repo (i.e., the central repo) would
>> invoke the mail notification, and thereby obviate the need to define a
>> notify config for each local developer, but it appears that hg notify
>> executes from the active repo only.
>
> Correct, doing it on the central server makes more sense than doing it
> on the "client" side.
>
> The server side hg is however not "passive". The example in the
> beginning of "hg help notify" shows how to use hooks that will be
> invoked on the server side when a client push changes.
>
> /Mads

Thanks for offering your advice on this Mads.

Hmm... so far no matter what I do, my client-side push does nothing to  
invoke the server-side hooks.  But from whichever side I'm working in /  
signed-into *directly* i.e., the active/initiating repo, notify has no  
problem kicking-off the emails from that initiation point.

I'm looking at the example for hg help notify and on either side (client  
or server), I'm using the provided example hook for changegroup:

[hooks]
changegroup.notify = python:hgext.notify.hook

And I'm giving it my email for reposubs:

[reposubs]
* = jjturner at energi.com

Seems I'm missing a trick somewhere...



More information about the Mercurial mailing list