The poller recipe
******************

Supported options
=================

The recipe supports the following options:

    Lists the projects the buildbot deal with (one project=one column) The
    values must be a section name in the configuration file.  Then each of this
    section must contain:
    
``vcs``

  The version control system. Defaults to ``svn``. Currently only
  Subversion repositories are supported.

``repositories``

  A sequence of newline separated full URLs to the branches in the
  code repository containing the project code.

``splitter``

  A regexp used to parse paths analyzed by the poller. The regexp must return 2
  groups. The only important one is the project name to match in a builder
  repository. (Default
  ``'(?P<project>\S+\/trunk|\S+\/branches\/[^\/]+)/(?P<relative>.*)'``)

``hist-max``

  Number of history lines to look at (Default 100).

``user``

  A svn user (Default None).

``password``

  A valid svn password for the user (Default None).

``poll-interval``

  Interval in seconds to check for changes.

``svn-binary``

  Path to the ``svn`` binary. Defaults to ``svn`` which should work if
  you have in your ``PATH``.

Example usage
=============

We can define a poller to make our buildbot aware of commits:: 

    >>> write('buildout.cfg',
    ... """
    ... [buildout]
    ... parts = svnpoller
    ... 
    ... [svnpoller]
    ... recipe = collective.buildbot:poller
    ... repositories = http://example.com/svn/buildout/trunk
    ... user = h4x0r
    ... password = passwd
    ... """)

    >>> print system(buildout)
    Installing svnpoller.
    Generated config '/sample-buildout/parts/pollers/svnpoller.cfg'.

Poller generation. You can see here all the available options::

    >>> cat(join('parts', 'pollers', 'svnpoller.cfg'))
    [poller]
    hist-max = 100
    repository = http://example.com/svn/buildout/trunk
    vcs = svn
    user = h4x0r
    svn-binary = svn
    password = passwd
    poll-interval = 60
    <BLANKLINE>

You can also have the poller to observe multiple repositories.

    >>> write('buildout.cfg',
    ... """
    ... [buildout]
    ... parts = svnpoller
    ... 
    ... [svnpoller]
    ... recipe = collective.buildbot:poller
    ... repositories =
    ...     http://example.com/svn/buildout/trunk
    ...     http://example.com/svn/some.project/branches/foobar
    ...     http://other.server.com/svn/foo.bar/tags/1.0
    ... user = h4x0r
    ... password = passwd
    ... """)

    >>> print system(buildout)
    Uninstalling svnpoller.
    Installing svnpoller.
    Generated config '/sample-buildout/parts/pollers/svnpoller_0.cfg'.
    Generated config '/sample-buildout/parts/pollers/svnpoller_1.cfg'.
    Generated config '/sample-buildout/parts/pollers/svnpoller_2.cfg'.
    <BLANKLINE>

The pollers recipe
*******************

The ``collective.buildbot:pollers`` recipe is deprecated. To get the
same functionality simply provide multiple repository URLs to the
``collective.buildbot:poller`` recipe.
  
