[Buildbot-devel] configuration help

Chris Leishman chris at leishman.org
Fri Nov 25 00:32:24 UTC 2005

On Thu, Nov 24, 2005 at 06:05:40PM -0500, Stefan Seefeld wrote:
> Hi Chris,
> Chris Leishman wrote:
> >I had much the same problem, and it occured to me that the
> >svn_buildbot.py script has not concept of branches, and there is no
> >easy way I can see in the master configuration to automatically
> >determine the branch.
> >
> >So I've created a patch to svn_buildbot that adds a --branch argument,
> >and passes that as the branch name when sending the change message to
> >buildbot.
> that looks like one possibility. However, as svn_buildbot.py is invoked
> by svn itself (well, via the post-commit shell script), and since svn
> itself doesn't have any 'branch' concept, I would have to preprocess
> the arguments to figure out the branch in a shell script.

Yeah - to get this to work I actually have different invocations of
svn_buildbot.py with different --include arguments for each branch, and
a matching --branch argument.  It's a bit ugly, but there wasn't any
other way to do it that I could see.  eg:

${REPOS}/hooks/svn_buildbot.py --repository "$REPOS" \
	--branch trunk --revision "$REV" \
	--bbserver localhost --bbport 9989 \
	--include project/trunk/ &
${REPOS}/hooks/svn_buildbot.py --repository "$REPOS" \
	--branch branches/release-2 --revision "$REV" \
	--bbserver localhost --bbport 9989 \
	--include branches/release-2/ &

I also did it this way since I don't want to allow building of _any_
branch - just the official release branches.

> I figure such a pattern matching is much simpler to provide as a python
> function, and so I would much prefer a way to write that function
> directly into my master.cfg file, if possible.

Sounds nice to me.


More information about the devel mailing list