[Buildbot-commits] buildbot/buildbot/scripts runner.py,1.36,1.37

Brian Warner warner at users.sourceforge.net
Fri Oct 21 08:03:41 UTC 2005


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

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

add HTML/IRC control over build-on-branch and build-revision

	* buildbot/status/words.py (IrcStatusBot.command_FORCE): add
	control over --branch and --revision, not that they are always
	legal to provide
	* buildbot/status/html.py (StatusResourceBuilder.force): same
	(StatusResourceBuild.body): display SourceStamp components

	* buildbot/scripts/runner.py (ForceOptions): option parser for the
	IRC 'force' command, so it can be shared with an eventual
	command-line-tool 'buildbot force' mode.
	* buildbot/test/test_runner.py (Options.testForceOptions): test it


Index: runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- runner.py	31 Aug 2005 02:26:21 -0000	1.36
+++ runner.py	21 Oct 2005 08:03:39 -0000	1.37
@@ -563,6 +563,26 @@
     return d
 
 
+class ForceOptions(usage.Options):
+    optParameters = [
+        ["builder", None, None, "which Builder to start"],
+        ["branch", None, None, "which branch to build"],
+        ["revision", None, None, "which revision to build"],
+        ["reason", None, None, "the reason for starting the build"],
+        ]
+
+    def parseArgs(self, *args):
+        args = list(args)
+        if len(args) > 0:
+            if self['builder'] is not None:
+                raise usage.UsageError("--builder provided in two ways")
+            self['builder'] = args.pop(0)
+        if len(args) > 0:
+            if self['reason'] is not None:
+                raise usage.UsageError("--reason provided in two ways")
+            self['reason'] = " ".join(args)
+
+
 class TryOptions(usage.Options):
     optParameters = [
         ["connect", "c", None,
@@ -655,8 +675,9 @@
         ['statusgui', None, StatusClientOptions,
          "Display a small window showing current builder status"],
 
-        ['try', None, TryOptions,
-         "Run a build with your local changes"],
+        #['force', None, ForceOptions, "Run a build"],
+        ['try', None, TryOptions, "Run a build with your local changes"],
+
         ['tryserver', None, TryServerOptions,
          "buildmaster-side 'try' support function, not for users"],
 





More information about the Commits mailing list