[Buildbot-commits] buildbot/docs buildbot.texinfo,1.10,1.11

Brian Warner warner at users.sourceforge.net
Wed Jul 20 04:49:09 UTC 2005


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

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

update Locks docs, add listBuilderNames to all Schedulers

	* buildbot/scheduler.py (Dependent.listBuilderNames): oops, add
	utility method to *all* the Schedulers
	(Periodic.listBuilderNames): same

	* docs/buildbot.texinfo (Interlocks): update chapter to match
	reality


Index: buildbot.texinfo
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- buildbot.texinfo	20 Jul 2005 03:27:04 -0000	1.10
+++ buildbot.texinfo	20 Jul 2005 04:49:06 -0000	1.11
@@ -2705,11 +2705,17 @@
 name.
 
 To use a lock, simply include it in the @code{locks=} argument of the
- at code{BuildStep} or @code{Build} object that should obtain the lock
-before it runs. These arguments accept a list of @code{Lock} objects:
-the Step or Build will acquire all of them before it runs. The
- at code{BuildFactory} also accepts @code{locks=}, and simply passes it
-on to the @code{Build} that it creates.
+ at code{BuildStep} object that should obtain the lock before it runs.
+This argument accepts a list of @code{Lock} objects: the Step will
+acquire all of them before it runs.
+
+To claim a lock for the whole Build, add a @code{'locks'} key to the
+builder specification dictionary with the same list of @code{Lock}
+objects. (This is the dictionary that has the @code{'name'},
+ at code{'slavename'}, @code{'builddir'}, and @code{'factory'} keys). The
+ at code{Build} object also accepts a @code{locks=} argument, but unless
+you are writing your own @code{BuildFactory} subclass then it will be
+easier to set the locks in the builder dictionary.
 
 Note that there are no partial-acquire or partial-release semantics:
 this prevents deadlocks caused by two Steps each waiting for a lock
@@ -2760,12 +2766,15 @@
 
 slow_lock = locks.SlaveLock("cpu")
 source = s(step.SVN, svnurl="http://example.org/svn/Trunk")
-f22 = factory.Trial(source, trialpython=["python2.2"], locks=[slow_lock])
-f23 = factory.Trial(source, trialpython=["python2.3"], locks=[slow_lock])
-f24 = factory.Trial(source, trialpython=["python2.4"], locks=[slow_lock])
-b1 = @{'name': 'p22', 'slavename': 'bot-1, builddir='p22', 'factory': f22@}
-b2 = @{'name': 'p23', 'slavename': 'bot-1, builddir='p23', 'factory': f23@}
-b3 = @{'name': 'p24', 'slavename': 'bot-1, builddir='p24', 'factory': f24@}
+f22 = factory.Trial(source, trialpython=["python2.2"])
+f23 = factory.Trial(source, trialpython=["python2.3"])
+f24 = factory.Trial(source, trialpython=["python2.4"])
+b1 = @{'name': 'p22', 'slavename': 'bot-1, builddir='p22', 'factory': f22,
+       'locks': [slow_lock] @}
+b2 = @{'name': 'p23', 'slavename': 'bot-1, builddir='p23', 'factory': f23,
+       'locks': [slow_lock] @}
+b3 = @{'name': 'p24', 'slavename': 'bot-1, builddir='p24', 'factory': f24,
+       'locks': [slow_lock] @}
 c['builders'] = [b1, b2, b3]
 @end example
 





More information about the Commits mailing list