[Buildbot-devel] avoiding racy svn checkouts against HEAD

Dave Vitek dvitek at grammatech.com
Mon Apr 21 23:05:01 UTC 2014


I'm thinking the got_revision property is already populated with the 
appropriate directory after the first checkout runs.  I'm happy to use 
it.  I tried this:

          f.addStep(source.SVN( mode='update',
                    baseURL='svn+ssh://svn/svn/%%BRANCH%%/foo'))
          shell.SetProperty(command=["echo", 
properties.Property('got_revision')],
                    property="revision")
          f.addStep(source.SVN( mode='update',
                    baseURL='svn+ssh://svn/svn/%%BRANCH%%/bar'))

The SetProperty step reports that the property gets set correctly, and 
the web UI agrees.  However, it seemes to have no effect on the 
parameters passed to the second update.  I still see --revision HEAD.  
If my reading of the code is correct, the revision is derived from the 
source stamp, so setting this property isn't going to help.

I also tried using extra_args=['-r', Property('got_revision')]. This 
resulted in Unpersistable('Unpersistable data: instance of class 
buildbot.process.properties.Property deemed insecure') getting inserted 
into the command line, literally.

How does one tell source.SVN to get its revision from a property?

On 4/16/2014 11:06 PM, Dustin J. Mitchell wrote:
> Better might be to make a step that runs before the source steps which
> uses something like svnversion or svn info to get the current
> revision, then put that in a property and use the property in all of
> the source steps.
>
> Dustin





More information about the devel mailing list