[Buildbot-devel] Problems getting svnpoller.py to work

Mark Pauley mpauley at apple.com
Sat Dec 16 00:01:24 UTC 2006


It seems like the easy fix would have been to say branch="trunk".

Is the issue that you would like the bot to build on all branches?
Wouldn't the SVN process task break on that anyhow, because the branch  
value doesn't get passed to the slave?

_Mark

On Dec 15, 2006, at 3:38 PM, Robert Mecklenburg wrote:

> I'm new to buildbot and I'm having trouble configuring it.  My set up
> is ubuntu/edgy my master and slave on the same host (using different
> accounts).  I've got them setup so a forced build works, but when I
> try to get buildbot to initiate a build triggerred by an svn checkin
> I'm having problems.
>
> Here is the relevant part of the master.cfg file:
>
> c['sources'].append(PBChangeSource(prefix="/trunk/s5w/"))
> c['schedulers'].append(Scheduler(name="trunk", branch=None,
>                                  treeStableTimer=10,
>                                  builderNames=["s5-full"]))
>
> I'm using using svnpoller.py run from cron to invoke sendchange.  When
> the poller sees a change it seems to run correctly and I see this in
> the twistd.log file:
>
>  2006/12/15 13:03 MST [Broker,1,127.0.0.1] perspective_addChange  
> called
>  2006/12/15 13:03 MST [Broker,1,127.0.0.1] adding change, who  
> mecklen, 1 files, rev=2342, branch=trunk, comments Explain the catch  
> block.
> 	
>  2006/12/15 13:03 MST [Broker,1,127.0.0.1] <Scheduler 'all' at  
> -1216969460> ignoring off-branch <buildbot.changes.changes.Change  
> instance at 0xb75232cc>
>
> It seems the scheduler is ignoring the change request due to a bad
> branch comparison.  On further investigation it seems that in
> scheduler.py Scheduler.addChange the line
>
> 	if change.branch != branch:
>             log.msg("%s ignoring off-branch %s" % (self, change))
>             return
>
> is true causing the ignore.  The value self.branch is None and
> change.branch is "trunk".  So I changed the if to:
>
>         if self.branch is not None and change.branch != self.branch:
>
> There was a post on July 21 from Charles Hardin (wasn't that Buddy
> Holly's real name?) with the same patch in it.  When I ran the new
> code, I then got errors on the checkout:
>
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/buildbot/process/step.py",  
> line 654, in startStep
>     d.addCallback(self._startStep_2)
>   File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",  
> line 191, in addCallback
>     callbackKeywords=kw)
>   File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",  
> line 182, in addCallbacks
>     self._runCallbacks()
>   File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",  
> line 307, in _runCallbacks
>     self.result = callback(self.result, *args, **kw)
> --- <exception caught here> ---
>   File "/usr/lib/python2.4/site-packages/buildbot/process/step.py",  
> line 677, in _startStep_2
>     skip = self.start()
>   File "/usr/lib/python2.4/site-packages/buildbot/process/step.py",  
> line 1444, in start
>     self.startVC(branch, revision, patch)
>   File "/usr/lib/python2.4/site-packages/buildbot/process/step.py",  
> line 1721, in startVC
>     assert not branch # we need baseURL= to use branches
> exceptions.AssertionError:
>
> The error occurs in an asser in step.py SVN.startVC contains:
>
>         if self.svnurl:
>             assert not branch # we need baseURL= to use branches
>             self.args['svnurl'] = self.svnurl
>
> The assert is tripping with
>   2006/12/15 15:12 MST [Broker,0,127.0.0.1] svnurl = svn://svn/svn/ 
> s5w/trunk/s5w
>   2006/12/15 15:12 MST [Broker,0,127.0.0.1] baseURL = None
>   2006/12/15 15:12 MST [Broker,0,127.0.0.1] branch = trunk
>
> So I changed the assert to:
>
>         if self.svnurl:
>             assert branch == "trunk" or not branch # we need  
> baseURL= to use branches
>             self.args['svnurl'] = self.svnurl
>
> Now the system works and correctly responds to svn checkins.  But I'm
> having trouble believing I did the Right Thing (tm).
>
> Comments?
>
> Robert Mecklenburg
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel





More information about the devel mailing list