Skip to content

Commit

Permalink
Merge branch 'master' into nine
Browse files Browse the repository at this point in the history
* master:
  Pass '' for codebase in trigger.py - Refs buildbot#2289.
  Don't cache json build status objects; they are never cleaned up.
  docs fixes
  fix docs typos
  • Loading branch information
djmitche committed May 2, 2012
2 parents 3a40c2a + 2e77303 commit 7879b86
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 21 deletions.
12 changes: 1 addition & 11 deletions master/buildbot/status/web/status_json.py
Expand Up @@ -446,17 +446,7 @@ def getChild(self, path, request):
if isinstance(path, int) or _IS_INT.match(path):
build_status = self.builder_status.getBuild(int(path))
if build_status:
build_status_number = str(build_status.getNumber())
# Happens with negative numbers.
child = self.children.get(build_status_number)
if child:
return child
# Create it on-demand.
child = BuildJsonResource(self.status, build_status)
# Cache it. Never cache negative numbers.
# TODO(maruel): Cleanup the cache once it's too heavy!
self.putChild(build_status_number, child)
return child
return BuildJsonResource(self.status, build_status)
return JsonResource.getChild(self, path, request)

def asDict(self, request):
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/steps/trigger.py
Expand Up @@ -126,7 +126,7 @@ def add_sourcestamp_to_set(ss_setid, sourceStamp):
elif self.alwaysUseLatest:
d = defer.succeed(None)
else:
ss = self.build.getSourceStamp()
ss = self.build.getSourceStamp('')
if self.updateSourceStamp:
got = properties.getProperty('got_revision')
if got:
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/test/unit/test_steps_trigger.py
Expand Up @@ -110,7 +110,7 @@ def allSchedulers():
])

# the build has a getSourceStamp method
def getSourceStamp():
def getSourceStamp(codebase):
return FakeSourceStamp(self.THIS_SSID, self.THIS_SS_SETID)
self.build.getSourceStamp = getSourceStamp

Expand Down
9 changes: 4 additions & 5 deletions master/docs/developer/database.rst
Expand Up @@ -471,8 +471,11 @@ changes

.. py:method:: getRecentChanges(count)
:param count: maximum number of instances to return
:returns: list of dictionaries via Deferred, ordered by changeid

Get a list of the ``count`` most recent changes, represented as
dictionaies; returns fewer if that many do not exist.
dictionaries; returns fewer if that many do not exist.

.. note::
For this function, "recent" is determined by the order of the
Expand All @@ -481,10 +484,6 @@ changes
earlier than the time at which it is merged into a repository
monitored by Buildbot.

@param count: maximum number of instances to return

@returns: list of dictionaries via Deferred, ordered by changeid

.. py:method:: getLatestChangeid()
:returns: changeid via Deferred
Expand Down
6 changes: 3 additions & 3 deletions master/docs/manual/configuration.rst
Expand Up @@ -8,10 +8,10 @@ components. The information available here is sufficient to create basic
build and test configurations, and does not assume great familiarity with
Python.

More advanced Buildbot configurations, Buildbot acts as a framework for a
In more advanced Buildbot configurations, Buildbot acts as a framework for a
continuous-integration application. The next section, :doc:`customization`,
describes this approach, with frequent references into Buildbot's
:ref:`Buildbot Development`.
describes this approach, with frequent references into the
:ref:`development documentation <Buildbot Development>`.

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit 7879b86

Please sign in to comment.