[Buildbot-commits] buildbot/buildbot master.py,1.65,1.66
Brian Warner
warner at users.sourceforge.net
Wed Apr 27 11:46:17 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23292/buildbot
Modified Files:
master.py
Log Message:
* buildbot/master.py (BuildMaster.loadChanges): fix change_svc
setup, it was completely broken for new buildmasters (those which
did not have a 'change.pck' already saved. Thanks to Paul Warren
for catching this (embarrassing!) bug.
(Dispatcher.__getstate__): don't save our registered avatar
factories, since they'll be re-populated when the config file is
re-read.
(BuildMaster.__init__): add a dummy ChangeMaster, used only by
tests (since the real mktap-generated BuildMaster doesn't save
this attribute).
(BuildMaster.__getstate__): don't save any service children,
they'll all be re-populated when the config file is re-read.
* buildbot/test/test_config.py (Save.testSave): test for this
Index: master.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- master.py 27 Apr 2005 10:35:27 -0000 1.65
+++ master.py 27 Apr 2005 11:46:14 -0000 1.66
@@ -524,6 +524,11 @@
def upgradeToVersion2(self):
self.names = {}
+ def __getstate__(self):
+ state = styles.Versioned.__getstate__(self)
+ state['names'] = {}
+ return state
+
def register(self, name, afactory):
self.names[name] = afactory
def unregister(self, name):
@@ -611,6 +616,10 @@
self.statusTargets = []
self.bots = []
+ # this ChangeMaster is a dummy, only used by tests. In the real
+ # buildmaster, where the BuildMaster instance is created by mktap,
+ # this attribute is not saved in the buildbot.tap file.
+ self.useChanges(ChangeMaster())
self.readConfig = False
@@ -619,6 +628,8 @@
state = styles.Versioned.__getstate__(self, state)
if state.has_key('change_svc'):
del state['change_svc']
+ state['services'] = []
+ state['namedServices'] = {}
return state
def upgradeToVersion1(self):
More information about the Commits
mailing list