[Buildbot-devel] Unexpected clobbering

Eli Carter eli.carter at commprove.com
Mon Jul 9 21:19:15 UTC 2007


On Monday 09 July 2007, Eli Carter wrote:
> On Wednesday 04 July 2007, Brian Warner wrote:
> > > The .buildbot-sourcedata file appears to be present and correct but I 
> still
> > > get clobbered.
> > > Please could you explain to me every situation under which the CVS step
> > > decides to do an non explicit clobber.
> > 
> > Take a look in buildbot/slave/commands.py at around line 1151
> > (SourceBase.start). There's a clause that says:
> > 
> >         # do we need to clobber anything?
> >         if self.mode in ("copy", "clobber", "export"):
> >             d.addCallback(self.doClobber, self.workdir)
> >         if not (self.sourcedirIsUpdateable() and 
self.sourcedataMatches()):
> >             # the directory cannot be updated, so we have to clobber it.
> >             # Perhaps the master just changed modes from 'export' to
> >             # 'update'.
> >             d.addCallback(self.doClobber, self.srcdir)
> > 
> > Each VC subclass implements sourcedirIsUpdateable() and 
sourcedataMatches() 
> a
> > bit differently, but in general:
> > 
> >  sourcedirIsUpdateable() returns False if the previous build used a patch, 
> or
> >  if the previous build did a 'cvs export' instead of a regular checkout.
> > 
> >  sourcedataMatches() returns False if the current build is using a 
different
> >  branch than the previous build (or a different CVSROOT or CVSMODULE)
> 
> In the case of Subversion, changing between branches can be done with 'svn 
> switch', which is, essentially, a superset of 'svn update'.  For large 
> projects with a number of branches active, the clobber in that case gets to 
> be pretty annoying.

So, after looking a bit at the code, it appears to me that the SVN slave 
command can just use 'svn switch' instead of 'svn update' in all cases, and 
turn the sourcedata matching code into a no-op.

Slightly tested patch (against 0.7.5) attached.

Comments welcome,

Eli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildbot-svn-switch.patch
Type: text/x-diff
Size: 1417 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20070709/8bc15fda/attachment.bin>


More information about the devel mailing list