[users at bb.net] Looking for help on creating Mercurial repo change hook with Buildbot

Alvaro Erickson aerickson at xkl.com
Thu Apr 13 20:51:16 UTC 2017


Hi Pierre and all,

So, I was able to get the base change hook enabled. And verified it 
using the post_build_request.py which I found in the following directory:

master/contrib/

Unfortunately, when I try to setup the change hook for a Mercurial 
repository, nothing is sent to Buildbot. And I see no record of the 
change hook in the Buildbot's twisted.log.

Following the directions and documentation in the following:

* In the Buildbot manual about how to setup a Mercurial Change hook:
http://docs.buildbot.net/current/manual/cfg-wwwhooks.html

* Also, using the inline documentation in the post_build_request.py

I did the following:

1) Copied the post_build_request.py into the .hg folder of the repo I 
wanted to notify Buildbot of any changes

2) Modified the repo's hgrc by adding the following to it:

[hooks]
changegroup.buildbot = python:.hg/hgbuildbot.py:hook

[hgbuildbot]
venv = /srv/home/.virtualenv/lib/python2.7/site-packages
master = http://<ip address of Buildbot>:8020/change_hook/base
branch = default
project = my-project-name

Note: I tried removing the 'branch' and 'project' parameters to no 
effect. Also, I tried setting the master to the following by removing 
the "http://":

master = <ip address of Buildbot>:8020/change_hook/base

3) Ensured that hgbuilder.py had the executable permission.

And nothing got to Buildbot as far as I could tell when I:

a) Did a commit of a change

b) Then a push of the change

Any help or advice would be appreciated.

Regards,

Alvaro


On 04/11/2017 04:39 PM, Alvaro Erickson wrote:
> Hi Pierre,
>
> Apologies for not replying earlier, thanks for the help and advice on
> modifying the c['www']. I found the second line where it was being
> modified. And I added the change_hook_dialects line there.
>
> Regards,
>
> Alvaro
>
> On 04/08/2017 02:26 AM, Pierre Tardy wrote:
>>
>>
>> On Fri, Apr 7, 2017 at 6:58 PM Alvaro Erickson <aerickson at xkl.com
>> <mailto:aerickson at xkl.com>> wrote:
>>
>>     Greetings,
>>
>>     I am using Buildbot version 0.9.1.
>>
>> Please upgrade. There has been a lot of important fixes since 0.9.1 (not
>> that I know for your specific problem, though)
>>
>>
>>     And I am trying to use a Mercurial
>>     change hook to notify Buildbot of when there is a change in a
>> Mercurial
>>     meta repository. So, I followed what is written in the Buildbot
>> manual
>>     for change hooks (URL:
>>     http://docs.buildbot.net/current/manual/cfg-wwwhooks.html) and the
>> help
>>     documentation in the hgbuildbot.py script documentation. And here are
>>     the steps I performed for setting up the change hook (Note: I changed
>>     the IP address info to protect my project):
>>
>>     1. Enabling the base dialect in Buildbot's master.cfg by adding the
>>     following code:
>>
>>     c['www'] = dict(change_hook_dialects={'base': True})
>>
>>
>> Don't you have another line in your master.cfg which configures c['www']?
>> This would explain 'base' is not configured messages.
>>
>> Regards,
>> Pierre



The information contained in this e-mail message may be privileged, confidential and protected from disclosure.
 If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited.
 If you think that you have received this e-mail message in error, please e-mail the sender at the above e-mail address.



More information about the users mailing list