[Buildbot-commits] buildbot/buildbot/status builder.py,1.75,1.76
Brian Warner
warner at users.sourceforge.net
Mon Mar 13 08:21:45 UTC 2006
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8744/buildbot/status
Modified Files:
builder.py
Log Message:
* buildbot/status/builder.py (LogFile.merge): don't write chunks
larger than chunkSize. Fixes SF#1349253.
* buildbot/test/test_status.py (Log.testLargeSummary): test it
(Log.testConsumer): update to match new internal chunking behavior
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- builder.py 23 Jan 2006 23:03:26 -0000 1.75
+++ builder.py 13 Mar 2006 08:21:43 -0000 1.76
@@ -367,9 +367,13 @@
assert channel < 10
f = self.openfile
f.seek(0, 2)
- f.write("%d:%d" % (1 + len(text), channel))
- f.write(text)
- f.write(",")
+ offset = 0
+ while offset < len(text):
+ size = min(len(text)-offset, self.chunkSize)
+ f.write("%d:%d" % (1 + size, channel))
+ f.write(text[offset:offset+size])
+ f.write(",")
+ offset += size
self.runEntries = []
self.runLength = 0
More information about the Commits
mailing list