[Buildbot-devel] Switching from SVN to Mercurial
Bob Hood
bhood2 at comcast.net
Tue Feb 21 16:38:32 UTC 2012
I have just upgraded our Buildbot from 0.7.12 to 0.8.5, and at the same time,
we have migrated from Subversion to Mercurial. The Mercurial<->Buildbot
interaction seems a bit brain damaged compared to Subversion<->Buildbot. I'm
sure it's just my lack of understanding of Mercurial's peculiarities, and I'd
appreciate some help.
We currently have a single repository, with named ("inrepo") branches. Our
main sandbox is "default", and each developer has their own named branches
within the same repository. I have enabled the Mercurial "changegroup" hook
in the "trunk/.hg/hgrc" file with the following settings:
[hooks]
changegroup.buildbot = python:buildbot.changes.hgbuildbot.hook
[hgbuildbot]
master = localhost:9911
auth = xxxxx:xxxxx
This is working (Buildbot is properly getting change notifications). However,
it is not properly filtering the changes. With a ChangeFilter() in my
master.cfg that looks like this:
default_filter = ChangeFilter(repository="hg/trunk", branch=None)
is not filtering named branch modifications from those in the "default"
branch. All changes are causing the automated build to re-purpose the local
clone on the slave to the modified branch, and build it. Not what I want. I
want a filter for the "default" branch, and filters for each of the
developer's named branches, each going into their one dedicated clone folders
on the slave.
I also tried using:
default_filter = ChangeFilter(repository="hg/trunk", branch="default")
But this won't actually trigger builds for that branch for some reason.
I know there's a "branch =" value setting for the Mercurial "hgbuildbot"
section, but that seems to be a hard-coded branch name value that just gets
passed verbatim to Buildbot. This hardly seems useful, when I need to
distinguish between individual in-repo branches.
I also tried defining a branch-change function:
def default_branch_func(branch):
return ('default' in branch)
default_filter = ChangeFilter(branch_fn=default_branch_func)
But the value of the 'branch' argument always seems to come in as None instead
of an actual string value (or whatever value I set in the "branch =" value of
the "changegroup" hook).
I'm having a hard time wrapping my head around the Mercurial way of doing
things (Subversion was much easier). Any pointers to a master.cfg that does
this very thing, or some feedback on this problem, would be appreciated.
Render me gone, |||
Bob ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
I'm not so good with advice...can I interest you in a sarcastic comment?
More information about the devel
mailing list