[Buildbot-commits] buildbot/buildbot locks.py,1.1,1.2

Brian Warner warner at users.sourceforge.net
Wed Jul 20 08:08:26 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21333/buildbot

Modified Files:
	locks.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-262
Creator:  Brian Warner <warner at lothar.com>

python2.2 compatibility, other minor stuff

	* buildbot/locks.py: added temporary id() numbers to Lock
	descriptions, to track down a not-really-sharing-the-Lock bug

	* buildbot/test/runutils.py: must import errno, cut-and-paste bug

	* buildbot/test/test_slavecommand.py (ShellBase.failUnlessIn):
	needed for python2.2 compatibility
	* buildbot/test/test_vc.py: python2.2 compatibility: generators
	are from the __future__


Index: locks.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/locks.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- locks.py	19 Jul 2005 23:11:59 -0000	1.1
+++ locks.py	20 Jul 2005 08:08:24 -0000	1.2
@@ -23,6 +23,7 @@
         log.msg("%s claim(%s)" % (self, owner))
         assert owner is not None
         self.owner = owner
+        log.msg(" %s is claimed" % (self,))
 
     def release(self, owner):
         log.msg("%s release(%s)" % (self, owner))
@@ -50,7 +51,7 @@
     compare_attrs = ['name']
     def __init__(self, name):
         BaseLock.__init__(self, name)
-        self.description = "<MasterLock(%s)>" % (name,)
+        self.description = "<MasterLock(%s) %x>" % (name, id(self))
 
     def getLock(self, slave):
         return self
@@ -65,7 +66,9 @@
         slavename = slavebuilder.slave.slavename
         if not self.locks.has_key(slavename):
             lock = self.locks[slavename] = BaseLock(self.name)
-            lock.description = "<SlaveLock(%s)[%s]>" % (self.name, slavename)
+            lock.description = "<SlaveLock(%s)[%s] %x>" % (self.name,
+                                                            slavename,
+                                                            id(lock))
             self.locks[slavename] = lock
         return self.locks[slavename]
 





More information about the Commits mailing list