Mercurial > hg > autobot
diff README.txt @ 208:2d5b78d3411c
explain how sources work
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 04 Feb 2011 17:14:46 -0800 |
parents | 3e5d1c1e302d |
children | 98e3594f2928 |
line wrap: on
line diff
--- a/README.txt Fri Feb 04 08:30:53 2011 -0800 +++ b/README.txt Fri Feb 04 17:14:46 2011 -0800 @@ -181,6 +181,40 @@ to see this location). +Sources +------- + +``autobot.process.factory:SourceFactory`` is an abstract base class +for specifying sources. Sources live as a member on the instance, named +(oddly) ``sources``. This is a dict with the key being the source +type and the value being the source to use. Source types are +currently "git" and "hg", though this is easily extensible. + +Internally, an individual source is stored as a 2-tuple with the first +item being the URL of the source and the second item being the +branch. If the branch is ``None`` or not specified, this is assumed +to equate to ``master`` for git or ``default`` for hg. However, you +may also use a string in the form of ``URL#branch``. In addition, you +may specify a whitespace separated source, which ``SourceFactory`` +will split into a list of sources. So all of these translate into the +same source:: + + sources = {'hg': 'http://hg.mozilla.org/automation/logparser'} + + sources = {'hg': ['http://hg.mozilla.org/automation/logparser#default']} + + sources = {'hg': [('http://hg.mozilla.org/automation/logparser', None)] + +The generated ``master.cfg`` polls for changes on the given source, +then uses ``buildbot.schedulers.filter:Changefilter`` in conjunction +with a ``Scheduler`` to trigger the appropriate builds. + +While, in general, the canonical sources should be specified at the +class level, if an appropriate argument (e.g. *hg* or *git*) is passed +in to the ``SourceFactory`` constructor, this will override that +source type. This is useful for testing changes on non-canonical URLs +and/or branches. + Adding a New Project --------------------