[Buildbot-devel] using buildbot with mercurial branches

Eli Laucoin eli.laucoin at gmail.com
Fri Jul 31 10:38:04 UTC 2009


Hello everyone !

I apologise if my post seems awkward, but I'm brand new to builbot...

I use Mercurial as VCS, and I would like to ensure that my project's
trunk always pass all the tests.
To do so, my trunk is read-only, except for a particular user that
will pull changes that pass all the tests.
In order to automate the tests, I use the following workflow :

 1-  I clone the trunk in a local repo
 2-  After committing, I clone my local repo into a sandbox.

This sandbox is a directory writeable via SSH, and I hacked the
creation of mercurial repositories in this sandbox so that they
trigger a builbot hook on incoming changes.

I would like my buildbot configuration to clone the trunk, pull
changes from the sandbox repository, and run tests.
I tried to configure my builder with the following code in the master.cfg :

  from buildbot.process import factory
  from buildbot.steps.source import Mercurial
  from buildbot.steps.shell import ShellCommand

  sandbox_factory = factory.BuildFactory()

  sandbox_factory.addStep(Mercurial(repourl    = "SSH PATH TO MY TRUNK"
                                    branchType = 'inrepo',
                                    clobberOnBranchChange=True))

  sandbox_factory.addStep(Mercurial(baseURL = "SSH PATH TO MY SANDBOX
DIRECTORY",
                                    defaultBranch = "mainline/unstable"))

  sandbox_builder = { 'name' : 'sandbox-builder',
                      'slavename' : 'SLAVENAME',
                      'builddir'  : 'sandbox_build',
                      'factory'   : sandbox_factory,
                    }

  c['builders'] = [sandbox_builder]


My problem is that obviously, the revision specified by the Change in
the hook cannot be found in the trunk, and the fist build step always
crashes.

I also tried to clone the trunk by hand via a ShellCommand step, but I
didn't manage to merge my new developments into this clone.

Could anyone help me to have this working ?

Thanks in advance !

Eli




More information about the devel mailing list