Permalink
Browse files

Merge branch 'master' of https://github.com/buildbot/buildbot

  • Loading branch information...
2 parents 131355d + 9aec55b commit ab2cfe7452071bbbad69d33ff35a8a750dfd46fa @sa1 committed Apr 21, 2012
Showing with 237 additions and 64 deletions.
  1. +2 −2 MAINTAINERS.txt
  2. +9 −2 master/buildbot/status/status_push.py
  3. +224 −58 master/contrib/buildbot_json.py
  4. +2 −2 slave/buildslave/commands/repo.py
View
@@ -69,9 +69,9 @@ Mercurial VC
Repo VC
S: Maintained
- M: Chris Soyars <ctsoyars@gmail.com>
+ M: Chris Soyars <ctsoyars@gmail.com> (github:ctso)
M: Piotr Sikora <piotr.sikora@frickle.com> (irc:PiotrSikora)
- M: Pierre Tardy <tardyp@gmail.com>
+ M: Pierre Tardy <tardyp@gmail.com> (github:tardyp)
U: http://trac.buildbot.net/wiki/repovc
Monotone VC
@@ -31,6 +31,7 @@
except ImportError:
import json
+from buildbot import config
from buildbot.status.base import StatusReceiverMultiService
from buildbot.status.persistent_queue import DiskQueue, IndexedQueue, \
MemoryQueue, PersistentQueue
@@ -327,7 +328,7 @@ class HttpStatusPush(StatusPush):
def __init__(self, serverUrl, debug=None, maxMemoryItems=None,
maxDiskItems=None, chunkSize=200, maxHttpRequestSize=2**20,
- **kwargs):
+ extra_post_params=None, **kwargs):
"""
@serverUrl: Base URL to be used to push events notifications.
@maxMemoryItems: Maximum number of items to keep queued in memory.
@@ -338,8 +339,12 @@ def __init__(self, serverUrl, debug=None, maxMemoryItems=None,
@maxHttpRequestSize: limits the size of encoded data for AE, the default
is 1MB.
"""
+ if not serverUrl:
+ raise config.ConfigErrors(['HttpStatusPush requires a serverUrl'])
+
# Parameters.
self.serverUrl = serverUrl
+ self.extra_post_params = extra_post_params or {}
self.debug = debug
self.chunkSize = chunkSize
self.lastPushWasSuccessful = True
@@ -377,7 +382,9 @@ def popChunk(self):
packets = json.dumps(items, indent=2, sort_keys=True)
else:
packets = json.dumps(items, separators=(',',':'))
- data = urllib.urlencode({'packets': packets})
+ params = {'packets': packets}
+ params.update(self.extra_post_params)
+ data = urllib.urlencode(params)
if (not self.maxHttpRequestSize or
len(data) < self.maxHttpRequestSize):
return (data, items)
Oops, something went wrong.

0 comments on commit ab2cfe7

Please sign in to comment.