hg notify inter-repo mechanics

John Turner jjturner at energi.com
Sun Jan 4 01:28:48 UTC 2015


On Sat, 03 Jan 2015 09:20:57 -0500, Mads Kiilerich <mads at kiilerich.com>  
wrote:

> On 01/02/2015 07:31 PM, John Turner wrote:
>> 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.
>>>> ..

>>>> .. 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.
>
> Then you have to debug your server side setup.
>
> I don't think you have told us anything about your server side setup so
> any advice will probably be wrong.
>
> /Mads

The the canonical central repo exists on a Windows 2008 R2 box.
The directory owner of the central repo is a shared domain account:  
'companydomain\devadmin'
(this is the account we normally rdp with to work directly in this server)

At the same time, I've added my personal domain account to the server-side  
Administrators group, and I've also added my account as a share on the  
actual server-side repo directory (allowing me to map it on my local  
machine, and generally to perform source control operations between my  
local repo and the server repo without running hgweb).

The directory owner of my local repo is "Administrators" (as opposed to  
the shared domain account referenced above, which I suspect may be part of  
the issue..)

Interestingly, when I enable the notify hook on my local machine, and push  
 from the rdp-connected server (with server-side notify disabled), it DOES  
send the email - and returns the changegroup hook when I run 'hg  
showconfig hooks' from the server's CLI.

However, the converse is not true - 'hg showconfig hooks' run on my local  
machine CLI with notify locally disabled, and server-side notify enabled  
yields nothing.  At the same time 'hg showconfig hooks' run on the  
server-side CLI via rdp returns the changegroup hook reference.

So I'm 3 for 4:
- local notify enabled and local push to central sends email
- central notify enabled and central push to local sends email
- local notify enabled and central push to local sends email

..and trying to solve for central notify enabled and local push to central.

Hope that gives enough background for anyone and isn't too confusing.

Cheers,
John








More information about the Mercurial mailing list