Email notification when pushing back via http

Peter Teoh htmldeveloper at gmail.com
Thu Dec 6 10:39:13 UTC 2012


in order for SMTP to work the hg server need to connect out - could this be
a source of problem?   (ie, for many server/webhosting setup, connect out
is always disallowed, banned by firewall, it is called the DMZ.   or u have
to use their customized SMTP to deliver outside, not talking direct to any
SMTP server you may want.   this is to enhance the server security, as only
one port to a specific server is opened?

On Thu, Dec 6, 2012 at 6:16 PM, x <wasedaxiao at gmail.com> wrote:

> Thank you for quick response.
>
> I have already seen these pages but it did not work if I push via http
> protocol.
>
> I suspect I need to more configs.
>
> Regards,
> xj
>
> On Thu, Dec 6, 2012 at 6:22 PM, Peter Teoh <htmldeveloper at gmail.com>wrote:
>
>> how about this:
>>
>> http://stackoverflow.com/questions/2762695/mercurial-hgrc-notify-hook
>>
>> http://mercurial.selenic.com/wiki/Hook
>>
>>
>> http://morecode.wordpress.com/2007/08/03/setting-up-mercurial-to-e-mail-on-a-commit/
>>
>> http://mercurial.selenic.com/wiki/NotifyExtension
>>
>> not sure if meet your expectation?
>>
>> On Thu, Dec 6, 2012 at 4:45 PM, x <wasedaxiao at gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I want to set an email notification if I push my local changes back to
>>> main repository which is locate at web.
>>>
>>> e.g.
>>> hg push http://mycompany.com/hg/test-repo/
>>>
>>> The config in hgrc are shown below. It worked when I "hg push
>>> /absolute/path" but I could not get any email when I use "hg push
>>> http://mycompany.com/hg/test-repo/".
>>> How to configure email notification when pushing is based on http
>>> protocol. Do I need configure something in hgweb.cgi/hgweb.config side?
>>>
>>> ---
>>> [paths]
>>> default = /ws/hg-master/scripts
>>>
>>> [web]
>>> allow_push = *
>>> push_ssl = false
>>> baseurl=http://mycompany.com/hg/test-repo/
>>>
>>>
>>> [extensions]
>>> hgext.notify =
>>>
>>> [hooks]
>>> changegroup.notify=python:hgext.notify.hook
>>>
>>> [email]
>>> from= mymail at mycompany.com
>>> method = /usr/sbin/sendmail
>>>
>>> [smtp]
>>> host=localhost
>>>
>>> strip = 4
>>> [notify]
>>> test=false
>>> config = /ws/hg-master/scripts/.hg/notify.conf
>>>
>>> sources = push
>>>
>>> template= Subject: {webroot} {desc|firstline|strip}\n
>>>   changeset {node|short} in {root}
>>>   \nDetails:
>>>   {baseurl}/rev/{node|short}\n
>>>   Description: {desc|tabindent|strip}\n
>>>
>>> diffstat=false
>>> ---
>>>
>>> Regards,
>>> xj
>>>
>>> _______________________________________________
>>> Mercurial mailing list
>>> Mercurial at selenic.com
>>> http://selenic.com/mailman/listinfo/mercurial
>>>
>>>
>>
>>
>> --
>> Regards,
>> Peter Teoh
>>
>
>


-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20121206/6e829add/attachment-0002.html>


More information about the Mercurial mailing list