Class ChangeMaster
Service
--+
|
MultiService
--+
|
ChangeMaster
This is the master-side service which receives file change
notifications from CVS. It keeps a log of these changes, enough to
provide for the HTML waterfall display, and to tell
temporarily-disconnected bots what they missed while they were
offline.
Change notifications come from two different kinds of sources. The
first is a PB service (servicename='changemaster',
perspectivename='change'), which provides a remote method called
'addChange', which should be called with a dict that has keys 'filename'
and 'comments'.
The second is a list of objects derived from the ChangeSource class.
These are added with .addSource(), which also sets the .changemaster
attribute in the source to point at the ChangeMaster. When the
application begins, these will be started with .start() . At shutdown
time, they will be terminated with .stop() . They must be persistable.
They are expected to call self.changemaster.addChange() with Change
objects.
There are several different variants of the second type of source:
-
buildbot.changes.mail.MaildirSource
watches a maildir for CVS commit mail. It uses DNotify if available,
or polls every 10 seconds if not. It parses incoming mail to
determine what files were changed.
-
buildbot.changes.freshcvs.FreshCVSSource
makes a PB
connection to the CVSToys 'freshcvs' daemon and relays any changes it
announces.
Method Summary |
|
__init__(self)
|
|
__getstate__(self)
|
|
__setstate__(self,
d)
|
|
addChange (self,
change)
Deliver a file change event. |
|
addSource(self,
source)
|
|
eventGenerator(self)
|
|
getChangeNumbered(self,
num)
|
|
pruneChanges(self)
|
|
removeSource(self,
source)
|
|
saveYourself(self)
|
|
stopService(self)
|
Inherited from MultiService |
|
__iter__ (self)
|
|
addService (self,
service)
|
|
getServiceNamed (self,
name)
|
|
privilegedStartService (self)
|
|
removeService (self,
service)
|
|
startService (self)
|
Inherited from Service |
|
disownServiceParent (self)
|
|
setName (self,
name)
|
|
setServiceParent (self,
parent)
|
Class Variable Summary |
bool |
debug = False
|
Inherited from MultiService |
Implements |
__implemented__ = <implementedBy twisted.application.ser...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
Inherited from Service |
ClassProvides |
__providedBy__ = <zope.interface.declarations.ClassProvi...
|
NoneType |
name = None |
NoneType |
parent = None |
int |
running = 0 |
addChange(self,
change)
Deliver a file change event. The event should be a Change object.
This method will timestamp the object as it is received.
-
|