[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