[Buildbot-devel] configuration help

Chris Leishman chris at leishman.org
Thu Nov 24 22:26:41 UTC 2005


On Thu, Nov 24, 2005 at 04:39:07PM -0500, Stefan Seefeld wrote:
<snip> 
> I have an svn repository holding multiple branches (as usual, held in
> subdirectories 'trunk/', and 'branches/...').
> 
> I have copied the svn_buildbot.py script from the source distribution
> into my hooks/ directory, which notifies the master. So far all seems
> to work as expected.
> 
> However, I'm not sure I understand where to plug in my function that
> determines what branches a change-set belongs to.
<snip>

Hi Stefan,

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.

The patch is attached, and if it's useful to Warner I'm happy for him to
include it in a later release.

cheers,
chris
-------------- next part --------------
--- svn_buildbot.py.orig	2005-11-25 09:22:15.000000000 +1100
+++ svn_buildbot.py	2005-11-25 09:22:02.345292824 +1100
@@ -52,6 +52,8 @@
     optParameters = [
         ['repository', 'r', None,
          "The repository that was changed."],
+        ['branch', 'b', None,
+         "The branch that was changed."],
         ['revision', 'v', None,
          "The revision that we want to examine (default: latest)"],
         ['bbserver', 's', 'localhost',
@@ -100,6 +102,7 @@
 def main(opts):
     repo = opts['repository']
     print "Repo:", repo
+    branch = opts['branch']
     rev_arg = ''
     if opts['revision']:
         rev_arg = '-r %s' % (opts['revision'],)
@@ -141,10 +144,12 @@
         print "who", repr(who)
         print "what", repr(changed)
         print "why", repr(message)
+        print "branch", repr(branch)
         print "new revision", repr(revision)
         return persp.callRemote('addChange', {'who': who,
                                               'files': changed,
                                               'comments': message,
+                                              'branch': branch,
                                               'revision': revision})
 
     def quit(*why):


More information about the devel mailing list