[Buildbot-commits] buildbot/buildbot/process step.py,1.67,1.68

Brian Warner warner at users.sourceforge.net
Mon Aug 8 21:39:48 UTC 2005


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

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

deliver large addCompleteLog() files correctly

Twisted's NetstringReceiver imposes a cap of 100k on the chunks of a
LogFile, which causes problems when addCompleteLog() is used to create
large LogFiles.

	* buildbot/process/step.py (BuildStep.addCompleteLog): break the
	logfile up into chunks, both to avoid NetstringReceiver.MAX_LENGTH
	and to improve memory usage when streaming the file out to a web
	browser.
	* buildbot/status/builder.py (LogFile.addEntry): change > to >= to
	make this work cleanly

--This line, and those below, will be ignored--
Files to commit:
   <can't compute list>

This list might be incomplete or outdated if editing the log
message was not invoked from an up-to-date changes buffer!


Index: step.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- step.py	19 Jul 2005 23:11:57 -0000	1.67
+++ step.py	8 Aug 2005 21:39:45 -0000	1.68
@@ -621,7 +621,9 @@
     def addCompleteLog(self, name, text):
         log.msg("addCompleteLog(%s)" % name)
         loog = self.step_status.addLog(name)
-        loog.addStdout(text)
+        size = loog.chunkSize
+        for start in range(0, len(text), size):
+            loog.addStdout(text[start:start+size])
         loog.finish()
 
     def addHTMLLog(self, name, html):





More information about the Commits mailing list