[Buildbot-commits] buildbot/buildbot/slave registry.py,1.1,1.2 bot.py,1.8,1.9 commands.py,1.20,1.21

Brian Warner warner at users.sourceforge.net
Mon Apr 11 19:30:32 UTC 2005


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

Modified Files:
	registry.py bot.py commands.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-32
Creator:  Brian Warner <warner at monolith.lothar.com>

merge epydoc work from org.apestaart at thomas/buildbot--doc--0--patch-3

* general: merge org.apestaart at thomas/buildbot--doc--0--patch-3,
adding epydoc-format docstrings to many classes. Thanks to Thomas
Vander Stichele for the patches.
* docs/epyrun, docs/gen-reference: add epydoc-generating tools
* buildbot/status/mail.py, buildbot/process/step_twisted.py: same
* buildbot/slave/bot.py, commands.py, registry.py: same


Index: bot.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/bot.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- bot.py	6 Apr 2005 00:48:28 -0000	1.8
+++ bot.py	11 Apr 2005 19:30:28 -0000	1.9
@@ -224,6 +224,7 @@
         
         
 class Bot(pb.Referenceable, service.MultiService):
+    """I represent the slave-side bot."""
     usePTY = None
     name = "bot"
 

Index: commands.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- commands.py	6 Apr 2005 00:48:28 -0000	1.20
+++ commands.py	11 Apr 2005 19:30:28 -0000	1.21
@@ -377,22 +377,22 @@
     """This is a Command which runs a shell command. The args dict contains
     the following keys:
 
-     ['command'] (required): a shell command to run. If this is a string,
-      it will be run with /bin/sh (['/bin/sh', '-c', command]). If it is a
-      list (preferred), it will be used directly.
-     ['workdir'] (required): subdirectory in which the command will be run,
-      relative to the builder dir
-     ['env']: a dict of environment variables to augment/replace os.environ
-     ['want_stdout']: 0 if stdout should be thrown away
-     ['want_stderr']: 0 if stderr should be thrown away
-     ['not_really']: 1 to skip execution and return rc=0
-     ['timeout']: seconds of silence to tolerate before killing command
+        - ['command'] (required): a shell command to run. If this is a string,
+          it will be run with /bin/sh (['/bin/sh', '-c', command]). If it is a
+          list (preferred), it will be used directly.
+        - ['workdir'] (required): subdirectory in which the command will be run,
+          relative to the builder dir
+        - ['env']: a dict of environment variables to augment/replace os.environ
+        - ['want_stdout']: 0 if stdout should be thrown away
+        - ['want_stderr']: 0 if stderr should be thrown away
+        - ['not_really']: 1 to skip execution and return rc=0
+        - ['timeout']: seconds of silence to tolerate before killing command
 
     ShellCommand creates the following status messages:
-     {'stdout': data} : when stdout data is available
-     {'stderr': data} : when stderr data is available
-     {'header': data} : when headers (command start/stop) are available
-     {'rc': rc} : when the process has terminated
+        - {'stdout': data} : when stdout data is available
+        - {'stderr': data} : when stderr data is available
+        - {'header': data} : when headers (command start/stop) are available
+        - {'rc': rc} : when the process has terminated
     """
 
     def start(self):
@@ -458,26 +458,29 @@
     and update). This class extracts the following arguments from the
     dictionary received from the master:
 
-    ['workdir'] (required): the subdirectory where the buildable sources
-     should be placed
-
-    ['mode']: one of update/copy/clobber/export, defaults to 'update'
+        - ['workdir']:  (required) the subdirectory where the buildable sources
+                        should be placed
 
-    ['revision']: If not None, this is an int or string which indicates
-     which sources (along a time-like axis) should be used. It is the thing
-     you provide as the CVS -r or -D argument.
+        - ['mode']:     one of update/copy/clobber/export, defaults to 'update'
 
-    ['patch']: If not None, this is a tuple of (striplevel, patch) which
-     contains a patch that should be applied after the checkout has
-     occurred. Once applied, the tree is no longer eligible for use with
-     mode='update', and it only makes sense to use this in conjunction with
-     a ['revision'] argument. striplevel is an int, and patch is a string in
-     standard unified diff format. The patch will be applied with 'patch
-     -p%d <PATCH', with STRIPLEVEL substituted as %d. The command will fail
-     if the patch process fails (rejected hunks).
+        - ['revision']: If not None, this is an int or string which indicates
+                        which sources (along a time-like axis) should be used.
+                        It is the thing you provide as the CVS -r or -D
+                        argument.
 
-    ['timeout']: seconds of silence tolerated before we kill of the command
+        - ['patch']:    If not None, this is a tuple of (striplevel, patch)
+                        which contains a patch that should be applied after the
+                        checkout has occurred. Once applied, the tree is no
+                        longer eligible for use with mode='update', and it only
+                        makes sense to use this in conjunction with a
+                        ['revision'] argument. striplevel is an int, and patch
+                        is a string in standard unified diff format. The patch
+                        will be applied with 'patch -p%d <PATCH', with
+                        STRIPLEVEL substituted as %d. The command will fail if
+                        the patch process fails (rejected hunks).
 
+        - ['timeout']:  seconds of silence tolerated before we kill of the
+                        command
     """
 
     def setup(self, args):

Index: registry.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/registry.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- registry.py	26 Aug 2004 08:59:53 -0000	1.1
+++ registry.py	11 Apr 2005 19:30:28 -0000	1.2
@@ -3,5 +3,16 @@
 commandRegistry = {}
 
 def registerSlaveCommand(name, factory, version):
+    """
+    Register a slave command with the registry, making it available in slaves.
+
+    @type  name:    string
+    @param name:    name under which the slave command will be registered; used
+                    for L{buildbot.slave.bot.SlaveBuilder.remote_startCommand}
+                    
+    @type  factory: L{buildbot.slave.commands.Command}
+    @type  version: string
+    @param version: version string of the factory code
+    """
     assert not commandRegistry.has_key(name)
     commandRegistry[name] = (factory, version)





More information about the Commits mailing list