[Buildbot-devel] Access the source stamp from a shell command

Brian Warner warner-buildbot at lothar.com
Tue Sep 20 17:35:12 UTC 2005


> Unfortunately, neither revision not changes is ever non-empty!
> 
> Is there another way for me to get at this information?
> 
> I'm using the buildbot in CVS, and perforce.

That's the correct way to get at the SourceStamp. The attributes you're
looking at will depend upon how the build was started in the first place. How
are you getting changes out of Perforce? Is it possible that the tool you're
using is setting both .revision and .changes at the same time? (note that I
haven't examined the P4Poller class closely.. maybe something needs updating)

What do .revision and .changes have in them? Do they seem correct?

The idea is that the SourceStamp will be in one of two (well, really three)
modes:

 1: .revision is None, but .changes has a list of Change objects

 2: .changes is empty, but .revision has a specific revision to build

 2a: .changes is empty, .revision is None, which means "build HEAD"

Note that it may not be trivial to convert a list of Changes into a revision
specification when you're ready to do the actual checkout. Each VC system is
responsible for doing this on its own.. the code for, e.g., Subversion is in
buildbot.process.step.SVN.computeSourceRevision .

cheers,
 -Brian




More information about the devel mailing list