svn_buildbot configuration? (was Re: [Buildbot-devel] configuration help)
chris at leishman.org
Fri Nov 25 02:35:31 UTC 2005
On Thu, Nov 24, 2005 at 03:17:47PM -0800, Brian Warner wrote:
> I haven't personally set up a buildbot that runs builds of non-trunk builds
> yet, so I hadn't gotten around to updating svn_buildbot.py to add a place for
> this "filename->branchname" function. The function must, of course, be
> written specifically for each project, but it would be nice if it were
> obvious where users needed to write that function.
Actually, I think it would be nice to extend svn_buildbot to have a
configuration file (something like svnmailer, svnperms, etc).
It could be something like:
server = localhost:9989
branch = trunk
# match any branch directly in the branches subdir
server = localhost:9988 # override server
branch = $1
This is just a _very_ rough idea. It's basically just a very little
evaluation language, where options can be set or rules evaluated. It
would be evaluated for every file in the change.
The first rule is the 'match', which starts a block (using indentation
like python). The regex following the 'match' keyword must match for
the block to be evaluated. The regex may contain substring match
blocks, which will be available within the indented block as $1..9.
The expression $0 would evaluate to the entire filename.
The 'rewrite' rule is to replace prefix= in master.cfg, only it's more
general and allows the filenames to be rewritten arbitrarily using a
The 'include' and 'exclude' rules works in the same way as the --include
and --exclude command line options currently do. Note that this means
that if no 'include' rule is encounted during processing, then all files
are included by default. The regex will match against the current
filename after any rewrites have occurred.
Note that regular expressions are always delimited, but the delimiter is
arbitrary (in the example I've alternated between / and !). In
addition, it is probably worth adopting the convention that any regex
starting with ^ would be silently replaced with ^/? to avoid people
getting confused when forgetting to include leading directory separators.
At the end of processing the variable 'server' MUST be set, and the
variable 'branch' MAY be set (otherwise the file is considered to be on
the default branch, whatever that is). svn_buildbot would then be
resposible for grouping tuples (file, branch) with identical
'server' variables and sending changesets to those hosts. Question -
should the changesets include all the files in the change, or only those
that are destined for the server the changeset is being sent to?
Obviously this would have to be implemented, and I can probably play
around with it one day (unless someone else volunteers first). But
first, any comments/suggestions?
More information about the devel