[project @ 2005-11-26 02:14:31 by warner]
commit2b57887438ba334aae801ee84c50465ebab4589d
authorwarner <warner>
Sat, 26 Nov 2005 07:14:31 +0000 (26 08:14 +0100)
committerwarner <warner>
Sat, 26 Nov 2005 07:14:31 +0000 (26 08:14 +0100)
tree88d9344d3c642895eb53799e2a6b261a49748614
parent111b68933c4c53e47428a16e50b1d9c5bc7b9bfe
[project @ 2005-11-26 02:14:31 by warner]

Revision: arch@buildbot.sf.net--2004/buildbot--dev--0--patch-440
Creator:  Brian Warner <warner@lothar.com>

fix the multiple-equivalent-Lock-instances bug on config-file reload

* buildbot/locks.py: fix the problem in which loading a master.cfg
file that changes some Builders (but not all of them) can result
in having multiple copies of the same Lock. Now, the real Locks
are kept in a table inside the BotMaster, and the Builders/Steps
use "LockIDs", which are still instances of MasterLock and
SlaveLock. The real Locks are instances of the new RealMasterLock
and RealSlaveLock classes.
* buildbot/master.py (BotMaster.getLockByID): new method to
convert LockIDs into real Locks.
* buildbot/process/base.py (Build.startBuild): convert LockIDs
into real Locks before building
* buildbot/process/step.py (BuildStep.startStep): same
* buildbot/test/test_locks.py (Locks.testLock1a): add a test which
exercises the problem
ChangeLog
buildbot/locks.py
buildbot/master.py
buildbot/process/base.py
buildbot/process/step.py
buildbot/test/test_locks.py