[Buildbot-devel] got_revision Build Property

Oz chris at santacruzgames.com
Wed Mar 14 16:18:28 UTC 2007

Hello list,

I'm attempting to implement a step in my build process that copies the 
entire project's output directory over onto a network drive for general 
developer consumption. Naturally, I'd like to dynamically name this 
directory r3456 (or whatever my SVN repository version may be). I am 
using the 'got_revision' build properties to fetch this number in the 
build step since that should work with build triggered by 
PBChangeSource, Nightly schedulers, and forced builds.

The relevant sections of my master.cfg are as follows:

# Custom build step for copying a directory on Windows
class CopyDirectory(ShellCommand):
   name = 'directory copy'
   haltOnFailure = 0
   description = ['copying directory']
   descriptionDone = ['directory copied']

   def __init__(self, source, dest, **kwargs):
     ShellCommand.__init__(self, **kwargs)
     self.command = ['MKDIR', dest, '&&', 'COPY', '%s\\*.*'%source, dest]

builder['factory'].addStep(CopyDirectory, source = 'bin\\ds\\cw\\fin',
   dest = WithProperties('\\\\server\\project_x\\BUILDS\\Auto\\r%d\\', 

Occasionally when I restart my buildmaster and re-create buildslaves 
from scratch, this approach will work. However, the vast majority of the 
time, 'got_revision' (using SVN) is interpolated to an empty string, 
which of course, causes a TypeError exception when it tries to shove an 
empty string into a %d format string.

I was under the impression from the docs that 'got_revision' would 
always return an integer for SVN repositories.

Any ideas what's going on here?

Thank you.


More information about the devel mailing list