[Buildbot-devel] helped needed with mercurial integration with buildbot via ssh

fredo at starox.org fredo at starox.org
Wed Jun 27 13:02:11 UTC 2007


I succeded to set up buildbot with mercurial.
We have many project into their own repositories, each can be accessed by
ssh :

ssh://myhguser@my.server.tld/project_foo
ssh://myhguser@my.server.tld/project_bar
ssh://myhguser@my.server.tld/project_xxx

We set up source VC in master.cfg like this :

---
from buildbot.changes.pb import PBChangeSource
c['sources'] = []
c['sources'].append(PBChangeSource() )
---

and, for each mercurial repositories, we add this section in .hg/hgrc :
---
[hooks]
incoming.buildbot = /PATH/TO/hg_buildbot.py MASTER:PORT
---

MASTER is the host wich have the master buidbot.
PORT is the slave port defined in master.cfg.

You can't use different port for source change and slave communication.
It's not yet implemented.

hg_buildbot.py from upstream don't work.
- It doesn't take care of merge without file change.
- It has an obvious bug in it's last line.

To allow all our project managed by a single master.
I add to hg_buildbot.py the branch parameter in the sendChange message.
branch is the name of the repository (project_foo,project_bar,project_xxx).

Then you can define a factory like this in master.cfg :

---
f = factory.GNUAutoconf( s(source.Mercurial,
          baseURL = "ssh://myhguser@my.server.tld/",
          defaultBranch="project_foo",
          mode="copy"))
---


-- 
Frédéric Leroy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg_buildbot.py.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20070627/5b5af681/attachment.bin>


More information about the devel mailing list