Next: , Previous: Configuring Change Sources, Up: Change Sources


4.6.3 CVSToys - PBService

The CVSToys package provides a server which runs on the machine that hosts the CVS repository it watches. It has a variety of ways to distribute commit notifications, and offers a flexible regexp-based way to filter out uninteresting changes. One of the notification options is named PBService and works by listening on a TCP port for clients. These clients subscribe to hear about commit notifications.

The buildmaster has a CVSToys-compatible PBService client built in. There are two versions of it, one for old versions of CVSToys (1.0.9 and earlier, FreshCVSSourceOldcred) which used the oldcred authentication framework, and one for newer versions (1.0.10 and later) which use newcred. Both are classes in the buildbot.changes.freshcvs package.

FreshCVSSource objects are created with the following parameters:

host and port
these specify where the CVSToys server can be reached
user and passwd
these specify the login information for the CVSToys server (freshcvs). These must match the server's values, which are defined in the freshCfg configuration file (which lives in the CVSROOT directory of the repository).
prefix
this is the prefix to be found and stripped from filenames delivered by the CVSToys server. Most projects live in sub-directories of the main repository, as siblings of the CVSROOT sub-directory, so typically this prefix is set to that top sub-directory name.

Example

To set up the freshCVS server, add a statement like the following to your freshCfg file:

     pb = ConfigurationSet([
         (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
         ])

This will announce all changes to a client which connects to port 4519 using a username of 'foo' and a password of 'bar'.

Then add a clause like this to your buildmaster's master.cfg:

     c['change_source'] = FreshCVSSource("cvs.example.com", 4519,
                                         "foo", "bar",
                                         prefix="glib/")

where "cvs.example.com" is the host that is running the FreshCVS daemon, and "glib" is the top-level directory (relative to the repository's root) where all your source code lives. Most projects keep one or more projects in the same repository (along with CVSROOT/ to hold admin files like loginfo and freshCfg); the prefix= argument tells the buildmaster to ignore everything outside that directory, and to strip that common prefix from all pathnames it handles.