From warner at users.sourceforge.net Sun Mar 12 08:21:04 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 08:21:04 +0000 Subject: [Buildbot-commits] site buildbot.png,NONE,1.1 home.png,NONE,1.1 ChangeLog,1.25,1.26 source-Arch.html,1.7,1.8 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8496 Modified Files: ChangeLog source-Arch.html Added Files: buildbot.png home.png Log Message: updated Darcs mirror, adding icons Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ChangeLog 17 Feb 2006 08:35:30 -0000 1.25 +++ ChangeLog 12 Mar 2006 08:21:01 -0000 1.26 @@ -1,3 +1,11 @@ +2006-03-12 Brian Warner + + * source-Arch.html: updated the Darcs mirror with a new version of + tailor, so there is no longer the spurious extra buildbot/ + directory + * buildbot.png: added an icon + * home.png: another one + 2006-02-17 Brian Warner * buildbot/__init__.py (version): Releasing buildbot-0.7.2 --- NEW FILE: buildbot.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: home.png --- (This appears to be a binary file; contents omitted.) Index: source-Arch.html =================================================================== RCS file: /cvsroot/buildbot/site/source-Arch.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- source-Arch.html 25 Dec 2005 22:37:43 -0000 1.7 +++ source-Arch.html 12 Mar 2006 08:21:01 -0000 1.8 @@ -135,14 +135,6 @@ darcs get http://buildbot.sf.net/darcs-repos/trunk -

This particular archive has the buildbot source code in a subdirectory of -the checked out tree, rather than at the top-level. This is an artifact of -the current version of the Tailor script that I'm using -to do the mirror. When a new version of Tailor is available that makes it -possible to have the sources in the top-level directory, I'll move to that -and regenerate the archive.

-


@@ -154,5 +146,5 @@ Brian Warner <warner @ lothar.com> -Last modified: Tue Sep 27 16:52:35 PDT 2005 +Last modified: Sat Mar 11 22:42:03 PST 2006 From warner at users.sourceforge.net Sun Mar 12 09:13:07 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 09:13:07 +0000 Subject: [Buildbot-commits] site index.html,1.55,1.56 ChangeLog,1.26,1.27 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6942 Modified Files: index.html ChangeLog Log Message: table+CSS-ify the Success Stories portion Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- ChangeLog 12 Mar 2006 08:21:01 -0000 1.26 +++ ChangeLog 12 Mar 2006 09:13:03 -0000 1.27 @@ -1,5 +1,8 @@ 2006-03-12 Brian Warner + * index.html (Success Stories): turn it into a table, with a light + touch of CSS to make it less ugly + * source-Arch.html: updated the Darcs mirror with a new version of tailor, so there is no longer the spurious extra buildbot/ directory Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- index.html 17 Feb 2006 08:35:30 -0000 1.55 +++ index.html 12 Mar 2006 09:13:03 -0000 1.56 @@ -3,6 +3,19 @@ The BuildBot + @@ -78,128 +91,365 @@

Success Stories

-
    -
  • twistedmatrix.com: - The original publically-visible Buildbot installation runs the Twisted unit test suite.
  • + -
  • TTimo (at Id software) is using a Buildbot for testing Wolfenstein: - Enemy Territory Linux.
  • + + + + + + -
  • Christopher Armstrong (radix) has set up a Buildbot to do web testing - (using MaxQ) for one of his clients, as well as internally at Nunatak to - run python unit tests.
  • + + + + + + -
  • 'nbm' reports that the first-or-second-largest media company - in South Africa uses buildbot, testing PHP code.
  • + + + + + + -
  • Thomas Vander Stichele at Fluendo - is using a Buildbot to run - multi-distribution tests for their GStreamer-based streaming - multimedia framework.
  • + + + + + + -
  • Dave Peticolas at Industrial Light & Magic is using a Buildbot - internally to test lots of python code.
  • + + + + + + -
  • The Free Geek project has a buildbot for the diagnostic - tools they use to test donated hardware.
  • + + + + + + -
  • Cory Dodt has created a BuildStep which allows Buildbots to drive PBP tests. PBP is a web testing tool that - (as I understand it) behaves as an HTTP client and makes sure a web - application responds to queries correctly. With this BuildStep, you can - incorporate PBP tests into your compile/build/test cycle.
  • + + + + + + -
  • According to Fawad Halim, the Mono project has a buildbot running to test the HEAD - and release branches of the main project on several architectures.
  • + + + + + + -
  • Justin Mason reports that the SpamAssassin project is running a buildbot too.
  • + + + + + + -
  • Rene Rivera says that the well-known Boost C++ project is moving all their - testing to run under a buildbot, but it does - not currently (aug 2005) appear to be online yet.
  • + + + + + + -
  • The Monotone version - control system is using a buildbot to - run unit tests. Their buildbot has been extended to handle Monotone's - somewhat-unique VC scheme by Nathaniel Smith, and hopefully the patches - will be merged into the main release soon.
  • + + + + + + -
  • Mark Dillavou reports that he's installed a Buildbot in the Enabling Technology Laboratory - at the University of Alabama, Birmingham, to maintain their visualization - and virtual-environment projects. +
  • + + + + + -
  • Stephen Thorne says that his company, Netbox Blue, uses a buildbot to build and - test their network security appliance.
  • + + + + + + -
  • Ulf Lamping reports that the Ethereal project, a well-known packet - sniffer, uses a buildbot for - their cross-platform compatibility testing.
  • + + + + + + -
  • Cl?ment Stenac writes in to say that the VideoLAN Project has a Buildbot to do their - continuous-integration and nightly builds.
  • + + + + + + -
  • Stefane Fermigier reports that Nuxeo - SAS is running this buildbot - to test their ECM project named CPS.
  • + + + + + + -
  • The Zope project (a large and well-known - application server for building web Content Management Systems and the - like) is using a buildbot to track - the status of Zope3.
  • + + + + + + -
  • Kevin Turner reports that JanRain, Inc. is using a buildbot for their - multi-language OpenID - libraries.
  • + + + + + + -
  • Python, the language that the - Buildbot is written in, has recently set up its own Buildbot. Guido van Rossum - mentioned it in his blog.
  • + + + + + + -
  • The KDE - Project has a buildbot, working on their unstable code branch.
  • + + + + + + -
  • The OpenDarwin WebKit component - (which includes the HTML renderer used by the Safari browser in OS-X) has a - buildbot too.
  • + + + + + + -
  • install a Buildbot today and get your name added here!
  • - + + + + + + + + + + + + + +
    Twisted + Buildbot + + home page + + The original publically-visible Buildbot installation runs the + Twisted unit test suite. +
    Id Software + + + TTimo (at Id software) is using a Buildbot for testing Wolfenstein: + Enemy Territory Linux. +
    Nunatek + + + Christopher Armstrong (radix) has set up a Buildbot to do web testing + (using MaxQ) for one of his clients, as well as internally at Nunatak + to run python unit tests. +
    ? + + + 'nbm' reports that the first-or-second-largest media company + in South Africa uses buildbot, testing PHP code. +
    GStreamer + Buildbot + + home page + + Thomas Vander Stichele at Fluendo + is using a Buildbot to run multi-distribution tests for their + GStreamer-based streaming multimedia framework. +
    ILM + + Dave Peticolas at Industrial Light & Magic is using a Buildbot + internally to test lots of python code +
    Free Geek + Buildbot + + + The Free Geek project has a buildbot for the diagnostic tools they use + to test donated hardware. +
    PBP + + home page + + Cory Dodt has created a BuildStep which allows Buildbots to drive + tests. PBP is a web testing tool that (as I understand it) behaves as + an HTTP client and makes sure a web application responds to queries + correctly. With this BuildStep, you can incorporate PBP tests into your + compile/build/test cycle. +
    Mono + Buildbot + + home page + + According to Fawad Halim, the Mono project has a buildbot running to + test the HEAD and release branches of the main project on several + architectures. +
    SpamAssassin + Buildbot + + home page + + Justin Mason reports that the SpamAssassin project is running a + buildbot too. +
    Boost + Buildbot + + home page + + Rene Rivera says that the well-known Boost C++ project is moving all + their testing to run under a buildbot, but it does not currently (aug + 2005) appear to be online yet. +
    Monotone + Buildbot + + home page + + The Monotone version control system is using a buildbot to run unit + tests. Their buildbot has been extended to handle Monotone's + somewhat-unique VC scheme by Nathaniel Smith, and hopefully the patches + will be merged into the main release soon. +
    ETLab + + home page + + Mark Dillavou reports that he's installed a Buildbot in the Enabling + Technology Laboratory at the University of Alabama, Birmingham, to + maintain their visualization and virtual-environment projects. +
    Netbox Blue + + + Stephen Thorne says that his company, Netbox Blue, uses a buildbot to + build and test their network security appliance. +
    Ethereal + Buildbot + + home page + + Ulf Lamping reports that the Ethereal project, a well-known packet + sniffer, uses a buildbot for their cross-platform compatibility + testing. +
    VideoLAN + Buildbot + + home page + + Cl?ment Stenac writes in to say that the VideoLAN Project has a + Buildbot to do their continuous-integration and nightly builds. +
    Nuxeo + Buildbot + + home page + + Stefane Fermigier reports that Nuxeo SAS is running this buildbot to + test their ECM project named CPS. +
    Zope + Buildbot + + home page + + The Zope project (a large and well-known application server for + building web Content Management Systems and the like) is using a + buildbot to track the status of Zope3. +
    OpenID + + home page + + Kevin Turner reports that JanRain, Inc. is using a buildbot for their + multi-language OpenID libraries. +
    Python + Buildbot + + home page + + Python, the language that the Buildbot is written in, has recently set + up its own Buildbot. Guido van Rossum mentioned it in his blog, + and again in his keynote at PyCon2006. +
    KDE + Buildbot + + home page + + The KDE Project has a buildbot, working on their unstable code branch. +
    WebKit + Buildbot + + home page + + The OpenDarwin WebKit component (which includes the HTML renderer used + by the Safari browser in OS-X) has a buildbot too. +
    + + install a Buildbot today and get your name added here! +
    +

    + + + + + + + + + +
    Buildbotlink to the buildbot's main status page
    home pagelink to the project's home page
    +

    +
    -
    - + - + + + SourceForge.net Logo + +
    Brian Warner <warner @ lothar.com>
    - -SourceForge.net Logo - -Last modified: Fri Feb 17 00:34:36 PST 2006 + + +

    The pretty home page icon comes from the Tango Project, and is +used under the Creative Commands +Attribution Share-Alike license.

    + +Last modified: Sun Mar 12 00:33:14 PST 2006 From warner at users.sourceforge.net Sun Mar 12 09:24:01 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 09:24:01 +0000 Subject: [Buildbot-commits] site index.html,1.56,1.57 ChangeLog,1.27,1.28 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12858 Modified Files: index.html ChangeLog Log Message: add a link to the epydoc-generated API reference Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- ChangeLog 12 Mar 2006 09:13:03 -0000 1.27 +++ ChangeLog 12 Mar 2006 09:23:59 -0000 1.28 @@ -2,6 +2,7 @@ * index.html (Success Stories): turn it into a table, with a light touch of CSS to make it less ugly + (Docs): add a link to the epydoc API reference * source-Arch.html: updated the Darcs mirror with a new version of tailor, so there is no longer the spurious extra buildbot/ Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- index.html 12 Mar 2006 09:13:03 -0000 1.56 +++ index.html 12 Mar 2006 09:23:59 -0000 1.57 @@ -58,8 +58,10 @@ are here.
  • The README file contains an overview, while the User's Manual contains complete - documentation.
  • + href="manual-0.7.2.html">User's Manual contains complete documentation. + The API Reference may be useful when + writing the configuration file: the various Steps and Schedulers are + documented there.
  • Recent changes are summarized in the NEWS file, while the complete details are in the Creative Commands Attribution Share-Alike license.

    -Last modified: Sun Mar 12 00:33:14 PST 2006 +Last modified: Sun Mar 12 01:20:37 PST 2006 From warner at users.sourceforge.net Sun Mar 12 10:27:04 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 10:27:04 +0000 Subject: [Buildbot-commits] buildbot/buildbot __init__.py,1.21,1.22 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14016/buildbot Modified Files: __init__.py Log Message: * buildbot/__init__.py (version): bump to 0.7.2+ while between releases * docs/buildbot.texinfo: same Index: __init__.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/__init__.py,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- __init__.py 17 Feb 2006 08:04:32 -0000 1.21 +++ __init__.py 12 Mar 2006 10:27:02 -0000 1.22 @@ -1,3 +1,3 @@ #! /usr/bin/python -version = "0.7.2" +version = "0.7.2+" From warner at users.sourceforge.net Sun Mar 12 10:27:04 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 10:27:04 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.37,1.38 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14016/docs Modified Files: buildbot.texinfo Log Message: * buildbot/__init__.py (version): bump to 0.7.2+ while between releases * docs/buildbot.texinfo: same Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- buildbot.texinfo 17 Feb 2006 08:04:32 -0000 1.37 +++ buildbot.texinfo 12 Mar 2006 10:26:58 -0000 1.38 @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename buildbot.info - at settitle BuildBot Manual 0.7.2 + at settitle BuildBot Manual 0.7.2+ @c %**end of header @copying From warner at users.sourceforge.net Sun Mar 12 10:27:05 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 10:27:05 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.573,1.574 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14016 Modified Files: ChangeLog Log Message: * buildbot/__init__.py (version): bump to 0.7.2+ while between releases * docs/buildbot.texinfo: same Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.573 retrieving revision 1.574 diff -u -d -r1.573 -r1.574 --- ChangeLog 17 Feb 2006 08:04:32 -0000 1.573 +++ ChangeLog 12 Mar 2006 10:27:02 -0000 1.574 @@ -1,3 +1,9 @@ +2006-03-12 Brian Warner + + * buildbot/__init__.py (version): bump to 0.7.2+ while between + releases + * docs/buildbot.texinfo: same + 2006-02-17 Brian Warner * buildbot/__init__.py (version): Releasing buildbot-0.7.2 From warner at users.sourceforge.net Sun Mar 12 11:28:06 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 11:28:06 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process builder.py,1.34,1.35 base.py,1.61,1.62 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13851/buildbot/process Modified Files: builder.py base.py Log Message: * buildbot/buildset.py (BuildSet.__init__): clean up docstring * buildbot/status/html.py (Waterfall.__init__): same * buildbot/process/builder.py (Builder.startBuild): same * buildbot/process/base.py (BuildRequest): same * buildbot/sourcestamp.py (SourceStamp): same * buildbot/scheduler.py (Nightly): same Index: base.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- base.py 26 Nov 2005 02:14:31 -0000 1.61 +++ base.py 12 Mar 2006 11:28:04 -0000 1.62 @@ -34,7 +34,7 @@ I am paired with a BuildRequestStatus object, to which I feed status information. - @type source: a L{buildbot.buildset.SourceStamp} instance. + @type source: a L{buildbot.sourcestamp.SourceStamp} instance. @ivar source: the source code that this BuildRequest use @type reason: string Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- builder.py 5 Nov 2005 21:06:15 -0000 1.34 +++ builder.py 12 Mar 2006 11:28:04 -0000 1.35 @@ -473,12 +473,12 @@ def startBuild(self, build, sb): """Start a build on the given slave. @param build: the L{base.Build} to start - @param slave: the L{SlaveBuilder} which will host this build + @param sb: the L{SlaveBuilder} which will host this build - @return: a Deferred which fires with a L{base.BuildControl} that can - be used to stop the Build, or to access a - L{buildbot.status.builder.BuildStatus} which will watch the Build as - it runs. """ + @return: a Deferred which fires with a + L{buildbot.interfaces.IBuildControl} that can be used to stop the + Build, or to access a L{buildbot.interfaces.IBuildStatus} which will + watch the Build as it runs. """ self.building.append(build) From warner at users.sourceforge.net Sun Mar 12 11:28:06 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 11:28:06 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.80,1.81 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13851/buildbot/status Modified Files: html.py Log Message: * buildbot/buildset.py (BuildSet.__init__): clean up docstring * buildbot/status/html.py (Waterfall.__init__): same * buildbot/process/builder.py (Builder.startBuild): same * buildbot/process/base.py (BuildRequest): same * buildbot/sourcestamp.py (SourceStamp): same * buildbot/scheduler.py (Nightly): same Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- html.py 23 Jan 2006 23:03:26 -0000 1.80 +++ html.py 12 Mar 2006 11:28:02 -0000 1.81 @@ -1682,9 +1682,9 @@ will be used for the 'favicon.ico' resource. Many browsers automatically request this file and use it as an icon in any bookmark generated from this site. - Defaults to the L{buildbot/buildbot.png} image - provided in the distribution. Can be set to None to - avoid using a favicon at all. + Defaults to the buildbot/buildbot.png image provided + in the distribution. Can be set to None to avoid + using a favicon at all. """ base.StatusReceiverMultiService.__init__(self) From warner at users.sourceforge.net Sun Mar 12 11:28:06 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 11:28:06 +0000 Subject: [Buildbot-commits] buildbot/buildbot sourcestamp.py,1.1,1.2 scheduler.py,1.14,1.15 buildset.py,1.3,1.4 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13851/buildbot Modified Files: sourcestamp.py scheduler.py buildset.py Log Message: * buildbot/buildset.py (BuildSet.__init__): clean up docstring * buildbot/status/html.py (Waterfall.__init__): same * buildbot/process/builder.py (Builder.startBuild): same * buildbot/process/base.py (BuildRequest): same * buildbot/sourcestamp.py (SourceStamp): same * buildbot/scheduler.py (Nightly): same Index: buildset.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/buildset.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- buildset.py 14 Oct 2005 19:32:55 -0000 1.3 +++ buildset.py 12 Mar 2006 11:28:04 -0000 1.4 @@ -14,7 +14,7 @@ def __init__(self, builderNames, source, reason=None, bsid=None): """ - @param source: a L{SourceStamp} + @param source: a L{buildbot.sourcestamp.SourceStamp} """ self.builderNames = builderNames self.source = source Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- scheduler.py 13 Jan 2006 08:34:28 -0000 1.14 +++ scheduler.py 12 Mar 2006 11:28:04 -0000 1.15 @@ -362,22 +362,22 @@ hour. For example, the following master.cfg clause will cause a build to be - started every night at 3:00am: + started every night at 3:00am:: s = Nightly('nightly', ['builder1', 'builder2'], hour=3, minute=0) c['schedules'].append(s) This scheduler will perform a build each monday morning at 6:23am and - again at 8:23am: + again at 8:23am:: s = Nightly('BeforeWork', ['builder1'], dayOfWeek=0, hour=[6,8], minute=23) - The following runs a build every two hours: + The following runs a build every two hours:: s = Nightly('every2hours', ['builder1'], hour=range(0, 24, 2)) - And this one will run only on December 24th: + And this one will run only on December 24th:: s = Nightly('SleighPreflightCheck', ['flying_circuits', 'radar'], month=12, dayOfMonth=24, hour=12, minute=0) Index: sourcestamp.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/sourcestamp.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sourcestamp.py 19 Jul 2005 23:11:59 -0000 1.1 +++ sourcestamp.py 12 Mar 2006 11:28:04 -0000 1.2 @@ -3,11 +3,11 @@ from buildbot.twcompat import implements class SourceStamp(util.ComparableMixin): - """ - a tuple of (branch, revision, patchspec, changes). - C{branch} is always valid, although it may be None to let the Source - step use its default branch. There are four possibilities for the - remaining elements: + """This is a tuple of (branch, revision, patchspec, changes). + + C{branch} is always valid, although it may be None to let the Source + step use its default branch. There are four possibilities for the + remaining elements: - (revision=REV, patchspec=None, changes=None): build REV - (revision=REV, patchspec=(LEVEL, DIFF), changes=None): checkout REV, then apply a patch to the source, with C{patch -pPATCHLEVEL Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13851 Modified Files: ChangeLog Log Message: * buildbot/buildset.py (BuildSet.__init__): clean up docstring * buildbot/status/html.py (Waterfall.__init__): same * buildbot/process/builder.py (Builder.startBuild): same * buildbot/process/base.py (BuildRequest): same * buildbot/sourcestamp.py (SourceStamp): same * buildbot/scheduler.py (Nightly): same Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.574 retrieving revision 1.575 diff -u -d -r1.574 -r1.575 --- ChangeLog 12 Mar 2006 10:27:02 -0000 1.574 +++ ChangeLog 12 Mar 2006 11:28:04 -0000 1.575 @@ -1,5 +1,12 @@ 2006-03-12 Brian Warner + * buildbot/buildset.py (BuildSet.__init__): clean up docstring + * buildbot/status/html.py (Waterfall.__init__): same + * buildbot/process/builder.py (Builder.startBuild): same + * buildbot/process/base.py (BuildRequest): same + * buildbot/sourcestamp.py (SourceStamp): same + * buildbot/scheduler.py (Nightly): same + * buildbot/__init__.py (version): bump to 0.7.2+ while between releases * docs/buildbot.texinfo: same From warner at users.sourceforge.net Sun Mar 12 11:54:02 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 11:54:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.575,1.576 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27713 Modified Files: ChangeLog Log Message: * buildbot/scripts/runner.py: add 'buildbot restart' command (stop): don't sys.exit() out of here, otherwise restart can't work * docs/buildbot.texinfo (Shutdown): document it Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.575 retrieving revision 1.576 diff -u -d -r1.575 -r1.576 --- ChangeLog 12 Mar 2006 11:28:04 -0000 1.575 +++ ChangeLog 12 Mar 2006 11:54:00 -0000 1.576 @@ -1,5 +1,9 @@ 2006-03-12 Brian Warner + * buildbot/scripts/runner.py: add 'buildbot restart' command + (stop): don't sys.exit() out of here, otherwise restart can't work + * docs/buildbot.texinfo (Shutdown): document it + * buildbot/buildset.py (BuildSet.__init__): clean up docstring * buildbot/status/html.py (Waterfall.__init__): same * buildbot/process/builder.py (Builder.startBuild): same From warner at users.sourceforge.net Sun Mar 12 11:54:02 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 11:54:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts runner.py,1.41,1.42 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27713/buildbot/scripts Modified Files: runner.py Log Message: * buildbot/scripts/runner.py: add 'buildbot restart' command (stop): don't sys.exit() out of here, otherwise restart can't work * docs/buildbot.texinfo (Shutdown): document it Index: runner.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- runner.py 17 Feb 2006 07:23:13 -0000 1.41 +++ runner.py 12 Mar 2006 11:54:00 -0000 1.42 @@ -347,11 +347,20 @@ os.kill(pid, 0) except OSError: print "buildbot process %d is dead" % pid - sys.exit(0) + return timer += 1 time.sleep(1) print "never saw process go away" +def restart(config): + stop(config, wait=True) + print "now restarting buildbot process.." + start(config) + # this next line might not be printed, if start() ended up running twistd + # inline + print "buildbot process has been restarted" + + def loadOptions(filename="options", here=None, home=None): """Find the .buildbot/FILENAME file. Crawl from the current directory up towards the root, and also look in ~/.buildbot . The first directory @@ -419,6 +428,10 @@ def getSynopsis(self): return "Usage: buildbot stop " +class RestartOptions(MakerBase): + def getSynopsis(self): + return "Usage: buildbot restart " + class DebugClientOptions(usage.Options): optFlags = [ ['help', 'h', "Display this message"], @@ -654,6 +667,9 @@ "Create and populate a directory for a new buildslave"], ['start', None, StartOptions, "Start a buildmaster or buildslave"], ['stop', None, StopOptions, "Stop a buildmaster or buildslave"], + ['restart', None, RestartOptions, + "Restart a buildmaster or buildslave"], + ['sighup', None, StopOptions, "SIGHUP a buildmaster to make it re-read the config file"], @@ -713,6 +729,8 @@ start(so) elif command == "stop": stop(so, wait=True) + elif command == "restart": + restart(so) elif command == "sighup": stop(so, "HUP") elif command == "sendchange": From warner at users.sourceforge.net Sun Mar 12 11:54:02 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 11:54:02 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.38,1.39 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27713/docs Modified Files: buildbot.texinfo Log Message: * buildbot/scripts/runner.py: add 'buildbot restart' command (stop): don't sys.exit() out of here, otherwise restart can't work * docs/buildbot.texinfo (Shutdown): document it Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- buildbot.texinfo 12 Mar 2006 10:26:58 -0000 1.38 +++ buildbot.texinfo 12 Mar 2006 11:53:59 -0000 1.39 @@ -870,6 +870,17 @@ buildbot sighup @var{BASEDIR} @end example +When you update the Buildbot code to a new release, you will need to +restart the buildmaster and/or buildslave before it can take advantage +of the new code. You can do a @code{buildbot stop @var{BASEDIR}} and + at code{buildbot start @var{BASEDIR}} in quick succession, or you can +use the @code{restart} shortcut, which does both steps for you: + + at example +buildbot restart @var{BASEDIR} + at end example + + @node Maintenance, Troubleshooting, Shutdown, Installation @section Maintenance From warner at users.sourceforge.net Sun Mar 12 21:50:35 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 12 Mar 2006 21:50:35 +0000 Subject: [Buildbot-commits] site index.html,1.57,1.58 ChangeLog,1.28,1.29 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31736 Modified Files: index.html ChangeLog Log Message: index.html (href): fix tango-project.org attribution Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ChangeLog 12 Mar 2006 09:23:59 -0000 1.28 +++ ChangeLog 12 Mar 2006 21:50:25 -0000 1.29 @@ -3,6 +3,7 @@ * index.html (Success Stories): turn it into a table, with a light touch of CSS to make it less ugly (Docs): add a link to the epydoc API reference + (href): fix tango-project.org attribution * source-Arch.html: updated the Darcs mirror with a new version of tailor, so there is no longer the spurious extra buildbot/ Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- index.html 12 Mar 2006 09:23:59 -0000 1.57 +++ index.html 12 Mar 2006 21:50:25 -0000 1.58 @@ -447,11 +447,12 @@ -

    The pretty home page icon comes from the The pretty home page icon home
+page comes from the Tango Project, and is used under the Creative Commands +href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution Share-Alike license.

    -Last modified: Sun Mar 12 01:20:37 PST 2006 +Last modified: Sun Mar 12 13:46:23 PST 2006 From warner at users.sourceforge.net Mon Mar 13 05:48:38 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 05:48:38 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_maildir.py,1.4,1.5 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6153/buildbot/test Modified Files: test_maildir.py Log Message: (MaildirTest): rename the 'timeout' method, as it collides with trial's internals Index: test_maildir.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_maildir.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- test_maildir.py 24 Apr 2005 21:30:25 -0000 1.4 +++ test_maildir.py 13 Mar 2006 05:48:35 -0000 1.5 @@ -38,7 +38,7 @@ # to do this right, use safecat shutil.copy(msg, newdir) - def timeout(self): + def do_timeout(self): self.done = 1 def testMaildir(self): @@ -55,7 +55,7 @@ msg = testfiles[i] reactor.callLater(2*i, self.deliverMail, os.path.join(testfiles_dir, msg)) - t = reactor.callLater(2*i + 15, self.timeout) + t = reactor.callLater(2*i + 15, self.do_timeout) while not (self.done or len(self.changes) == count): reactor.iterate(0.1) s.stopService() From warner at users.sourceforge.net Mon Mar 13 05:48:38 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 05:48:38 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.576,1.577 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6153 Modified Files: ChangeLog Log Message: (MaildirTest): rename the 'timeout' method, as it collides with trial's internals Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.576 retrieving revision 1.577 diff -u -d -r1.576 -r1.577 --- ChangeLog 12 Mar 2006 11:54:00 -0000 1.576 +++ ChangeLog 13 Mar 2006 05:48:36 -0000 1.577 @@ -1,5 +1,8 @@ 2006-03-12 Brian Warner + * buildbot/test/test_maildir.py (MaildirTest): rename the + 'timeout' method, as it collides with trial's internals + * buildbot/scripts/runner.py: add 'buildbot restart' command (stop): don't sys.exit() out of here, otherwise restart can't work * docs/buildbot.texinfo (Shutdown): document it From warner at users.sourceforge.net Mon Mar 13 05:50:26 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 05:50:26 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.577,1.578 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7031 Modified Files: ChangeLog Log Message: test_vc.py: remove the last use of waitForDeferred Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.577 retrieving revision 1.578 diff -u -d -r1.577 -r1.578 --- ChangeLog 13 Mar 2006 05:48:36 -0000 1.577 +++ ChangeLog 13 Mar 2006 05:50:24 -0000 1.578 @@ -1,5 +1,7 @@ 2006-03-12 Brian Warner + * buildbot/test/test_vc.py: remove the last use of waitForDeferred + * buildbot/test/test_maildir.py (MaildirTest): rename the 'timeout' method, as it collides with trial's internals From warner at users.sourceforge.net Mon Mar 13 05:50:26 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 05:50:26 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.43,1.44 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7031/buildbot/test Modified Files: test_vc.py Log Message: test_vc.py: remove the last use of waitForDeferred Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- test_vc.py 24 Oct 2005 22:42:03 -0000 1.43 +++ test_vc.py 13 Mar 2006 05:50:24 -0000 1.44 @@ -6,7 +6,6 @@ from email.Utils import mktime_tz, parsedate_tz from twisted.trial import unittest -dr = unittest.deferredResult from twisted.internet import defer, reactor, utils #defer.Deferred.debug = True @@ -45,55 +44,8 @@ # is running). +VCS = {} -class VCSupport: - """This holds everything we learn about the availability of VC tools on - the test host. A single instance of this is created when the first test - case is started, and remains available at the module level for all other - test cases.""" - - def __init__(self): - log.msg("test_vc now looking for VC programs") - self.have = {'tla': False, 'baz': False, 'darcs': False, - 'svn': False, 'cvs': False, - } - for p in os.environ['PATH'].split(os.pathsep): - if os.path.exists(os.path.join(p, 'tla')): - self.have['tla'] = True - if os.path.exists(os.path.join(p, 'baz')): - self.have['baz'] = True - if os.path.exists(os.path.join(p, 'darcs')): - self.have['darcs'] = True - if os.path.exists(os.path.join(p, 'svn')): - # we need svn to be compiled with the ra_local access module - from twisted.internet import utils - log.msg("running svn --version..") - v = dr(utils.getProcessOutput('svn', ["--version"], - env=os.environ)) - if v.find("handles 'file' schem") != -1: - # older versions say 'schema'. 1.2.0 and beyond say - # 'scheme'. - self.have['svn'] = True - else: - log.msg(("%s found but it does not support 'file:' " + - "schema, skipping svn tests") % - os.path.join(p, "svn")) - if os.path.exists(os.path.join(p, 'cvs')): - self.have['cvs'] = True - - if not self.have['svn']: - log.msg("could not find usable 'svn', skipping Subversion tests") - if not self.have['tla']: - log.msg("could not find 'tla' on $PATH, skipping some Arch tests") - if not self.have['baz']: - log.msg("could not find 'baz' on $PATH, skipping some Arch tests") - if not self.have['darcs']: - log.msg("could not find 'darcs' on $PATH, skipping Darcs tests") - if not self.have['cvs']: - log.msg("could not find 'cvs' on $PATH, skipping CVS tests") - log.msg("test_vc program scan done") - -VCS = None config_vc = """ from buildbot.process import factory, step @@ -278,15 +230,14 @@ (substring, string)) self.failUnless(string.find(substring) != -1, msg) - def setUpClass(self): - global VCS - if VCS is None: - print "doing VCSupport" - VCS = VCSupport() - SignalMixin.setUpClass(self) - def setUp(self): - self.capable() + # capable() should (eventually )raise SkipTest if the VC tools it + # needs are not available + d = defer.maybeDeferred(self.capable) + d.addCallback(self._setUp1) + return maybeWait(d) + + def _setUp1(self, res): if os.path.exists("basedir"): shutil.rmtree("basedir") os.mkdir("basedir") @@ -295,6 +246,9 @@ if os.path.exists(self.slavebase): shutil.rmtree(self.slavebase) os.mkdir("slavebase") + # NOTE: self.createdRepository survives from one test method to the + # next, and we use this fact to avoid repeating the (expensive) + # repository-build step if self.createdRepository: d = defer.succeed(None) else: @@ -309,7 +263,7 @@ d = self.vc_create() d.addCallback(self.postCreate) d.addCallback(self.setUp2) - return maybeWait(d) + return d def setUp2(self, res): pass @@ -922,7 +876,13 @@ vctype_try = "cvs" def capable(self): - if not VCS.have['cvs']: + global VCS + if not VCS.has_key("cvs"): + VCS["cvs"] = False + for p in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(p, 'cvs')): + VCS["cvs"] = True + if not VCS["cvs"]: raise unittest.SkipTest("CVS is not installed") def postCreate(self, res): @@ -1030,9 +990,34 @@ vctype_try = "svn" def capable(self): - if not VCS.have['svn']: + global VCS + if not VCS.has_key("svn"): + VCS["svn"] = False + for p in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(p, 'svn')): + # we need svn to be compiled with the ra_local access + # module + from twisted.internet import utils + log.msg("running svn --version..") + d = utils.getProcessOutput('svn', ["--version"], + env=os.environ) + d.addCallback(self._capable) + return d + if not VCS["svn"]: raise unittest.SkipTest("No usable Subversion was found") + def _capable(self, v): + if v.find("handles 'file' schem") != -1: + # older versions say 'schema'. 1.2.0 and beyond say + # 'scheme'. + VCS['svn'] = True + else: + log.msg(("%s found but it does not support 'file:' " + + "schema, skipping svn tests") % + os.path.join(p, "svn")) + VCS['svn'] = False + raise unittest.SkipTest("Found SVN, but it can't use file: schema") + def vc_create(self): self.svnrep = os.path.join(self.repbase, "SVN-Repository") tmp = os.path.join(self.repbase, "svntmp") @@ -1147,7 +1132,13 @@ vctype_try = "darcs" def capable(self): - if not VCS.have['darcs']: + global VCS + if not VCS.has_key("darcs"): + VCS["darcs"] = False + for p in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(p, 'darcs')): + VCS["darcs"] = True + if not VCS["darcs"]: raise unittest.SkipTest("Darcs is not installed") def vc_create(self): @@ -1250,8 +1241,6 @@ return maybeWait(d) def testCheckoutHTTP(self): - if not VCS.have['darcs']: - raise unittest.SkipTest("Darcs is not installed") self.serveHTTP() repourl = "http://localhost:%d/Darcs-Repository/trunk" % self.httpPort self.vcargs = { 'repourl': repourl } @@ -1302,7 +1291,21 @@ archcmd = "tla" def capable(self): - if not VCS.have['tla']: + global VCS + if not VCS.has_key("tla"): + VCS["tla"] = False + for p in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(p, 'tla')): + VCS["tla"] = True + # we need to check for bazaar here too, since vc_create needs to know + # about the presence of /usr/bin/baz even if we're running the tla + # tests. + if not VCS.has_key("baz"): + VCS["baz"] = False + for p in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(p, 'baz')): + VCS["baz"] = True + if not VCS["tla"]: raise unittest.SkipTest("Arch (tla) is not installed") def setUp2(self, res): @@ -1357,7 +1360,7 @@ "Buildbot Test Suite "]) yield w; w.getResult() - if VCS.have['baz']: + if VCS['baz']: # bazaar keeps a cache of revisions, but this test creates a new # archive each time it is run, so the cache causes errors. # Disable the cache to avoid these problems. This will be @@ -1557,7 +1560,13 @@ archcmd = "baz" def capable(self): - if not VCS.have['baz']: + global VCS + if not VCS.has_key("baz"): + VCS["baz"] = False + for p in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(p, 'baz')): + VCS["baz"] = True + if not VCS["baz"]: raise unittest.SkipTest("Arch (baz) is not installed") def setUp2(self, res): From warner at users.sourceforge.net Mon Mar 13 08:21:45 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 08:21:45 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.75,1.76 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8744/buildbot/status Modified Files: builder.py Log Message: * buildbot/status/builder.py (LogFile.merge): don't write chunks larger than chunkSize. Fixes SF#1349253. * buildbot/test/test_status.py (Log.testLargeSummary): test it (Log.testConsumer): update to match new internal chunking behavior Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- builder.py 23 Jan 2006 23:03:26 -0000 1.75 +++ builder.py 13 Mar 2006 08:21:43 -0000 1.76 @@ -367,9 +367,13 @@ assert channel < 10 f = self.openfile f.seek(0, 2) - f.write("%d:%d" % (1 + len(text), channel)) - f.write(text) - f.write(",") + offset = 0 + while offset < len(text): + size = min(len(text)-offset, self.chunkSize) + f.write("%d:%d" % (1 + size, channel)) + f.write(text[offset:offset+size]) + f.write(",") + offset += size self.runEntries = [] self.runLength = 0 From warner at users.sourceforge.net Mon Mar 13 08:21:45 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 08:21:45 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_status.py,1.29,1.30 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8744/buildbot/test Modified Files: test_status.py Log Message: * buildbot/status/builder.py (LogFile.merge): don't write chunks larger than chunkSize. Fixes SF#1349253. * buildbot/test/test_status.py (Log.testLargeSummary): test it (Log.testConsumer): update to match new internal chunking behavior Index: test_status.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- test_status.py 27 Nov 2005 00:46:13 -0000 1.29 +++ test_status.py 13 Mar 2006 08:21:42 -0000 1.30 @@ -626,10 +626,11 @@ l2.chunkSize = 1000 l2.addHeader("HEADER\n") l2.addStdout(800*"a") - l2.addStdout(800*"a") # should now have two chunks on disk - l2.addStdout(800*"b") # HEADER,1600*a on disk, 800*a in memory - l2.addStdout(800*"b") # HEADER,1600*a,1600*b on disk - l2.addStdout(200*"c") # HEADER,1600*a,1600*b on disk,200*c in memory + l2.addStdout(800*"a") # should now have two chunks on disk, 1000+600 + l2.addStdout(800*"b") # HEADER,1000+600*a on disk, 800*a in memory + l2.addStdout(800*"b") # HEADER,1000+600*a,1000+600*b on disk + l2.addStdout(200*"c") # HEADER,1000+600*a,1000+600*b on disk, + # 200*c in memory s = MyLogConsumer(limit=1) d = l2.subscribeConsumer(s) @@ -644,31 +645,56 @@ return d def _testConsumer_4(self, res, l2, s): self.failUnlessEqual(s.chunks, [(builder.HEADER, "HEADER\n"), - (builder.STDOUT, 1600*"a")]) + (builder.STDOUT, 1000*"a"), + ]) s.limit = None d = s.producer.resumeProducing() d.addCallback(self._testConsumer_5, l2, s) return d def _testConsumer_5(self, res, l2, s): self.failUnlessEqual(s.chunks, [(builder.HEADER, "HEADER\n"), - (builder.STDOUT, 1600*"a"), - (builder.STDOUT, 1600*"b"), + (builder.STDOUT, 1000*"a"), + (builder.STDOUT, 600*"a"), + (builder.STDOUT, 1000*"b"), + (builder.STDOUT, 600*"b"), (builder.STDOUT, 200*"c")]) l2.addStdout(1000*"c") # HEADER,1600*a,1600*b,1200*c on disk self.failUnlessEqual(s.chunks, [(builder.HEADER, "HEADER\n"), - (builder.STDOUT, 1600*"a"), - (builder.STDOUT, 1600*"b"), + (builder.STDOUT, 1000*"a"), + (builder.STDOUT, 600*"a"), + (builder.STDOUT, 1000*"b"), + (builder.STDOUT, 600*"b"), (builder.STDOUT, 200*"c"), (builder.STDOUT, 1000*"c")]) l2.finish() self.failUnlessEqual(s.chunks, [(builder.HEADER, "HEADER\n"), - (builder.STDOUT, 1600*"a"), - (builder.STDOUT, 1600*"b"), + (builder.STDOUT, 1000*"a"), + (builder.STDOUT, 600*"a"), + (builder.STDOUT, 1000*"b"), + (builder.STDOUT, 600*"b"), (builder.STDOUT, 200*"c"), (builder.STDOUT, 1000*"c")]) self.failIf(s.producer) self.failUnless(s.finished) + def testLargeSummary(self): + bigtext = "a" * 200000 # exceed the NetstringReceiver 100KB limit + l = MyLog(self.basedir, "large", bigtext) + s = MyLogConsumer() + d = l.subscribeConsumer(s) + def _check(res): + for ctype,chunk in s.chunks: + self.failUnless(len(chunk) < 100000) + merged = "".join([c[1] for c in s.chunks]) + self.failUnless(merged == bigtext) + d.addCallback(_check) + # when this fails, it fails with a timeout, and there is an exception + # sent to log.err(). This AttributeError exception is in + # NetstringReceiver.dataReceived where it does + # self.transport.loseConnection() because of the NetstringParseError, + # however self.transport is None + return maybeWait(d, 5) + testLargeSummary.timeout = 5 config_base = """ from buildbot.process import factory, step From warner at users.sourceforge.net Mon Mar 13 08:21:45 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 08:21:45 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.578,1.579 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8744 Modified Files: ChangeLog Log Message: * buildbot/status/builder.py (LogFile.merge): don't write chunks larger than chunkSize. Fixes SF#1349253. * buildbot/test/test_status.py (Log.testLargeSummary): test it (Log.testConsumer): update to match new internal chunking behavior Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.578 retrieving revision 1.579 diff -u -d -r1.578 -r1.579 --- ChangeLog 13 Mar 2006 05:50:24 -0000 1.578 +++ ChangeLog 13 Mar 2006 08:21:43 -0000 1.579 @@ -1,3 +1,10 @@ +2006-03-13 Brian Warner + + * buildbot/status/builder.py (LogFile.merge): don't write chunks + larger than chunkSize. Fixes SF#1349253. + * buildbot/test/test_status.py (Log.testLargeSummary): test it + (Log.testConsumer): update to match new internal chunking behavior + 2006-03-12 Brian Warner * buildbot/test/test_vc.py: remove the last use of waitForDeferred From warner at users.sourceforge.net Mon Mar 13 09:29:59 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 09:29:59 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.39,1.40 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5432/docs Modified Files: buildbot.texinfo Log Message: * buildbot/status/words.py (IRC): add an optional password= argument, which will be sent to Nickserv in an IDENTIFY message at login, to claim the nickname. freenode requires this before the bot can sent (or reply to) private messages. Thanks to Clement Stenac for the patch. * docs/buildbot.texinfo (IRC Bot): document it Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- buildbot.texinfo 12 Mar 2006 11:53:59 -0000 1.39 +++ buildbot.texinfo 13 Mar 2006 09:29:57 -0000 1.40 @@ -3718,12 +3718,16 @@ @example from twisted.status import words irc = words.IRC("irc.example.org", "botnickname", - channels=["channel1", "channel2"]) + channels=["channel1", "channel2"], + password="mysecretpassword") c['status'].append(irc) @end example Take a look at the docstring for @code{words.IRC} for more details on -configuring this service. +configuring this service. The @code{password} argument, if provided, +will be sent to Nickserv to claim the nickname: some IRC servers will +not allow clients to send private messages until they have logged in +with a password. To use the service, you address messages at the buildbot, either normally (@code{botnickname: status}) or with private messages From warner at users.sourceforge.net Mon Mar 13 09:29:59 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 09:29:59 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.579,1.580 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5432 Modified Files: ChangeLog Log Message: * buildbot/status/words.py (IRC): add an optional password= argument, which will be sent to Nickserv in an IDENTIFY message at login, to claim the nickname. freenode requires this before the bot can sent (or reply to) private messages. Thanks to Clement Stenac for the patch. * docs/buildbot.texinfo (IRC Bot): document it Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.579 retrieving revision 1.580 diff -u -d -r1.579 -r1.580 --- ChangeLog 13 Mar 2006 08:21:43 -0000 1.579 +++ ChangeLog 13 Mar 2006 09:29:57 -0000 1.580 @@ -1,5 +1,12 @@ 2006-03-13 Brian Warner + * buildbot/status/words.py (IRC): add an optional password= + argument, which will be sent to Nickserv in an IDENTIFY message at + login, to claim the nickname. freenode requires this before the + bot can sent (or reply to) private messages. Thanks to Clement + Stenac for the patch. + * docs/buildbot.texinfo (IRC Bot): document it + * buildbot/status/builder.py (LogFile.merge): don't write chunks larger than chunkSize. Fixes SF#1349253. * buildbot/test/test_status.py (Log.testLargeSummary): test it From warner at users.sourceforge.net Mon Mar 13 09:29:59 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 13 Mar 2006 09:29:59 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status words.py,1.45,1.46 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5432/buildbot/status Modified Files: words.py Log Message: * buildbot/status/words.py (IRC): add an optional password= argument, which will be sent to Nickserv in an IDENTIFY message at login, to claim the nickname. freenode requires this before the bot can sent (or reply to) private messages. Thanks to Clement Stenac for the patch. * docs/buildbot.texinfo (IRC Bot): document it Index: words.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/words.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- words.py 22 Oct 2005 21:10:05 -0000 1.45 +++ words.py 13 Mar 2006 09:29:57 -0000 1.46 @@ -69,10 +69,12 @@ "What you say !!": ["You have no chance to survive make your time.", "HA HA HA HA ...."], } - def __init__(self, nickname, channels, status, categories): + def __init__(self, nickname, password, channels, status, categories): """ @type nickname: string @param nickname: the nickname by which this bot should be known + @type password: string + @param password: the password to use for identifying with Nickserv @type channels: list of strings @param channels: the bot will maintain a presence in these channels @type status: L{buildbot.status.builder.Status} @@ -81,12 +83,15 @@ """ self.nickname = nickname self.channels = channels + self.password = password self.status = status self.categories = categories self.counter = 0 self.hasQuit = 0 def signedOn(self): + if self.password: + self.msg("Nickserv", "IDENTIFY " + self.password) for c in self.channels: self.join(c) def joined(self, channel): @@ -499,10 +504,11 @@ shuttingDown = False p = None - def __init__(self, nickname, channels, categories): + def __init__(self, nickname, password, channels, categories): #ThrottledClientFactory.__init__(self) # doesn't exist self.status = None self.nickname = nickname + self.password = password self.channels = channels self.categories = categories @@ -517,7 +523,8 @@ self.p.quit("buildmaster reconfigured: bot disconnecting") def buildProtocol(self, address): - p = self.protocol(self.nickname, self.channels, self.status, + p = self.protocol(self.nickname, self.password, + self.channels, self.status, self.categories) p.factory = self p.status = self.status @@ -546,11 +553,12 @@ connect to a single IRC server and am known by a single nickname on that server, however I can join multiple channels.""" - compare_attrs = ["host", "port", "nick", "channels", "allowForce", + compare_attrs = ["host", "port", "nick", "password", + "channels", "allowForce", "categories"] def __init__(self, host, nick, channels, port=6667, allowForce=True, - categories=None): + categories=None, password=None): base.StatusReceiverMultiService.__init__(self) assert allowForce in (True, False) # TODO: implement others @@ -560,11 +568,13 @@ self.port = port self.nick = nick self.channels = channels + self.password = password self.allowForce = allowForce self.categories = categories # need to stash the factory so we can give it the status object - self.f = IrcStatusFactory(self.nick, self.channels, self.categories) + self.f = IrcStatusFactory(self.nick, self.password, + self.channels, self.categories) c = internet.TCPClient(host, port, self.f) c.setServiceParent(self) From warner at users.sourceforge.net Fri Mar 17 01:07:11 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 17 Mar 2006 01:07:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts sample.cfg,1.7,1.8 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21234/buildbot/scripts Modified Files: sample.cfg Log Message: * buildbot/scripts/sample.cfg: add python-mode declaration for vim. Thanks to John Pye for the patch. * docs/buildbot.texinfo (Launching the daemons): fix @reboot job command line, mention the importance of running 'crontab' as the buildmaster/buildslave user. Thanks to John Pye for the catch. Index: sample.cfg =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/sample.cfg,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sample.cfg 24 Nov 2005 21:57:30 -0000 1.7 +++ sample.cfg 17 Mar 2006 01:07:09 -0000 1.8 @@ -1,4 +1,5 @@ # -*- python -*- +# ex: set syntax=python: # This is a sample buildmaster config file. It must be installed as # 'master.cfg' in your buildmaster's base directory (although the filename @@ -129,7 +130,7 @@ # if you set 'manhole', you can telnet into the buildmaster and get an # interactive python shell, which may be useful for debugging buildbot # internals. It is probably only useful for buildbot developers. -# from buildbot.master import Manhole +#from buildbot.master import Manhole #c['manhole'] = Manhole(9999, "admin", "password") # the 'projectName' string will be used to describe the project that this From warner at users.sourceforge.net Fri Mar 17 01:07:11 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 17 Mar 2006 01:07:11 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.580,1.581 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21234 Modified Files: ChangeLog Log Message: * buildbot/scripts/sample.cfg: add python-mode declaration for vim. Thanks to John Pye for the patch. * docs/buildbot.texinfo (Launching the daemons): fix @reboot job command line, mention the importance of running 'crontab' as the buildmaster/buildslave user. Thanks to John Pye for the catch. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.580 retrieving revision 1.581 diff -u -d -r1.580 -r1.581 --- ChangeLog 13 Mar 2006 09:29:57 -0000 1.580 +++ ChangeLog 17 Mar 2006 01:07:09 -0000 1.581 @@ -1,3 +1,12 @@ +2006-03-16 Brian Warner + + * buildbot/scripts/sample.cfg: add python-mode declaration for + vim. Thanks to John Pye for the patch. + + * docs/buildbot.texinfo (Launching the daemons): fix @reboot job + command line, mention the importance of running 'crontab' as the + buildmaster/buildslave user. Thanks to John Pye for the catch. + 2006-03-13 Brian Warner * buildbot/status/words.py (IRC): add an optional password= From warner at users.sourceforge.net Fri Mar 17 01:07:11 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 17 Mar 2006 01:07:11 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.40,1.41 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21234/docs Modified Files: buildbot.texinfo Log Message: * buildbot/scripts/sample.cfg: add python-mode declaration for vim. Thanks to John Pye for the patch. * docs/buildbot.texinfo (Launching the daemons): fix @reboot job command line, mention the importance of running 'crontab' as the buildmaster/buildslave user. Thanks to John Pye for the catch. Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- buildbot.texinfo 13 Mar 2006 09:29:57 -0000 1.40 +++ buildbot.texinfo 17 Mar 2006 01:07:08 -0000 1.41 @@ -803,12 +803,21 @@ Once you get everything running, you will want to arrange for the buildbot daemons to be started at boot time. One way is to use - at code{cron}, by putting them in a @@reboot crontab entry: + at code{cron}, by putting them in a @@reboot crontab entry at footnote{this +@@reboot syntax is understood by Vixie cron, which is the flavor +usually provided with linux systems. Other unices may have a cron that +doesn't understand @@reboot}: @example -@@reboot buildbot @var{BASEDIR} +@@reboot buildbot start @var{BASEDIR} @end example +When you run @command{crontab} to set this up, remember to do it as +the buildmaster or buildslave account! If you add this to your crontab +when running as your regular account (or worse yet, root), then the +daemon will run as the wrong user, quite possibly as one with more +authority than you intended to provide. + It is important to remember that the environment provided to cron jobs and init scripts can be quite different that your normal runtime. There may be fewer environment variables specified, and the PATH may From warner at users.sourceforge.net Fri Mar 17 01:26:44 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 17 Mar 2006 01:26:44 +0000 Subject: [Buildbot-commits] site ChangeLog,1.29,1.30 index.html,1.58,1.59 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29092 Modified Files: ChangeLog index.html Log Message: added ASCEND buildbot Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ChangeLog 12 Mar 2006 21:50:25 -0000 1.29 +++ ChangeLog 17 Mar 2006 01:26:41 -0000 1.30 @@ -1,3 +1,7 @@ +2006-03-16 Brian Warner + + * index.html (Sucess Stories): added the ASCEND buildbot + 2006-03-12 Brian Warner * index.html (Success Stories): turn it into a table, with a light Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- index.html 12 Mar 2006 21:50:25 -0000 1.58 +++ index.html 17 Mar 2006 01:26:41 -0000 1.59 @@ -403,6 +403,21 @@ + ASCEND + + Buildbot + + + home page + + + John Pye writes to say that the ASCEND + project is using a buildbot. + + + + @@ -454,5 +469,5 @@ href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution Share-Alike license.

    -Last modified: Sun Mar 12 13:46:23 PST 2006 +Last modified: Thu Mar 16 17:25:22 PST 2006 From warner at users.sourceforge.net Wed Mar 22 20:53:33 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 22 Mar 2006 20:53:33 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.581,1.582 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6651 Modified Files: ChangeLog Log Message: rearrange, add an easy-to-change function to turn a repository-relative pathname into a (branch, branch-relative-filename) tuple. Change this function to handle the branch naming policy used by your Subversion repository. Thanks to AllMyData.com for sponsoring this work. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.581 retrieving revision 1.582 diff -u -d -r1.581 -r1.582 --- ChangeLog 17 Mar 2006 01:07:09 -0000 1.581 +++ ChangeLog 22 Mar 2006 20:53:31 -0000 1.582 @@ -1,3 +1,11 @@ +2006-03-22 Brian Warner + + * contrib/svn_buildbot.py: rearrange, add an easy-to-change + function to turn a repository-relative pathname into a (branch, + branch-relative-filename) tuple. Change this function to handle + the branch naming policy used by your Subversion repository. + Thanks to AllMyData.com for sponsoring this work. + 2006-03-16 Brian Warner * buildbot/scripts/sample.cfg: add python-mode declaration for From warner at users.sourceforge.net Wed Mar 22 20:53:33 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 22 Mar 2006 20:53:33 +0000 Subject: [Buildbot-commits] buildbot/contrib svn_buildbot.py,1.10,1.11 Message-ID: Update of /cvsroot/buildbot/buildbot/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6651/contrib Modified Files: svn_buildbot.py Log Message: rearrange, add an easy-to-change function to turn a repository-relative pathname into a (branch, branch-relative-filename) tuple. Change this function to handle the branch naming policy used by your Subversion repository. Thanks to AllMyData.com for sponsoring this work. Index: svn_buildbot.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/contrib/svn_buildbot.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- svn_buildbot.py 24 Nov 2005 21:57:29 -0000 1.10 +++ svn_buildbot.py 22 Mar 2006 20:53:30 -0000 1.11 @@ -46,7 +46,7 @@ sys.stderr = f sys.stdout = f -from twisted.internet import reactor +from twisted.internet import defer, reactor from twisted.python import usage from twisted.spread import pb from twisted.cred import credentials @@ -76,6 +76,9 @@ patterns. Excludes override includes, that is, patterns that match both an include and an exclude will be excluded.'''], ] + optFlags = [ + ['dryrun', 'n', "Do not actually send changes"], + ] def __init__(self): usage.Options.__init__(self) @@ -99,78 +102,149 @@ if self._excludes: self['excludes'] = '(%s)' % ('|'.join(self._excludes),) +def split_file_dummy(changed_file): + """Split the repository-relative filename into a tuple of (branchname, + branch_relative_filename). If you have no branches, this should just + return (None, changed_file). + """ + return (None, changed_file) -def main(opts): - repo = opts['repository'] - print "Repo:", repo - rev_arg = '' - if opts['revision']: - rev_arg = '-r %s' % (opts['revision'],) - changed = commands.getoutput('svnlook changed %s "%s"' % (rev_arg, repo) - ).split('\n') - changed = [x[1:].strip() for x in changed] - message = commands.getoutput('svnlook log %s "%s"' % (rev_arg, repo)) - who = commands.getoutput('svnlook author %s "%s"' % (rev_arg, repo)) - revision = opts.get('revision') - if revision is not None: - revision = int(revision) +# this version handles repository layouts that look like: +# trunk/files.. -> trunk +# branches/branch1/files.. -> branches/branch1 +# branches/branch2/files.. -> branches/branch2 +# +def split_file_branches(changed_file): + pieces = changed_file.split(os.sep) + if pieces[0] == 'branches': + return (os.path.join(*pieces[:2]), + os.path.join(*pieces[2:])) + if pieces[0] == 'trunk': + return (pieces[0], os.path.join(*pieces[1:])) + ## there are other sibilings of 'trunk' and 'branches'. Pretend they are + ## all just funny-named branches, and let the Schedulers ignore them. + #return (pieces[0], os.path.join(*pieces[1:])) - # see if we even need to notify buildbot by looking at filters first - changestring = '\n'.join(changed) - fltpat = opts['includes'] - if fltpat: - included = sets.Set(re.findall(fltpat, changestring)) - else: - included = sets.Set(changed) + raise RuntimeError("cannot determine branch for '%s'" % changed_file) - expat = opts['excludes'] - if expat: - excluded = sets.Set(re.findall(expat, changestring)) - else: - excluded = sets.Set([]) - if len(included.difference(excluded)) == 0: - print changestring - print """\ -Buildbot was not interested, no changes matched any of these filters:\n %s -or all the changes matched these exclusions:\n %s\ -""" % (fltpat, expat) - sys.exit(0) +split_file = split_file_dummy - pbcf = pb.PBClientFactory() - reactor.connectTCP(opts['bbserver'], int(opts['bbport']), - pbcf) - def gotPersp(persp): - print "who", repr(who) - print "what", repr(changed) - print "why", repr(message) - print "new revision", repr(revision) - return persp.callRemote('addChange', {'who': who, - 'files': changed, - 'comments': message, - 'revision': revision}) +class ChangeSender: - def quit(*why): - print "quitting! because", why - reactor.stop() + def getChanges(self, opts): + """Generate and stash a list of Change dictionaries, ready to be sent + to the buildmaster's PBChangeSource.""" + # first we extract information about the files that were changed + repo = opts['repository'] + print "Repo:", repo + rev_arg = '' + if opts['revision']: + rev_arg = '-r %s' % (opts['revision'],) + changed = commands.getoutput('svnlook changed %s "%s"' % (rev_arg, + repo) + ).split('\n') + changed = [x[1:].strip() for x in changed] - pbcf.login(credentials.UsernamePassword('change', 'changepw') - ).addCallback(gotPersp - ).addCallback(quit, "SUCCESS" - ).addErrback(quit, "FAILURE") + message = commands.getoutput('svnlook log %s "%s"' % (rev_arg, repo)) + who = commands.getoutput('svnlook author %s "%s"' % (rev_arg, repo)) + revision = opts.get('revision') + if revision is not None: + revision = int(revision) - # timeout of 60 seconds - reactor.callLater(60, quit, "TIMEOUT") + # see if we even need to notify buildbot by looking at filters first + changestring = '\n'.join(changed) + fltpat = opts['includes'] + if fltpat: + included = sets.Set(re.findall(fltpat, changestring)) + else: + included = sets.Set(changed) - reactor.run() + expat = opts['excludes'] + if expat: + excluded = sets.Set(re.findall(expat, changestring)) + else: + excluded = sets.Set([]) + if len(included.difference(excluded)) == 0: + print changestring + print """\ + Buildbot was not interested, no changes matched any of these filters:\n %s + or all the changes matched these exclusions:\n %s\ + """ % (fltpat, expat) + sys.exit(0) + + # now see which branches are involved + files_per_branch = {} + for f in changed: + branch, filename = split_file(f) + if files_per_branch.has_key(branch): + files_per_branch[branch].append(filename) + else: + files_per_branch[branch] = [filename] + + # now create the Change dictionaries + changes = [] + for branch in files_per_branch.keys(): + d = {'who': who, + 'branch': branch, + 'files': files_per_branch[branch], + 'comments': message, + 'revision': revision} + changes.append(d) + + return changes + + def sendChanges(self, opts, changes): + pbcf = pb.PBClientFactory() + reactor.connectTCP(opts['bbserver'], int(opts['bbport']), pbcf) + d = pbcf.login(credentials.UsernamePassword('change', 'changepw')) + d.addCallback(self.sendAllChanges, changes) + return d + + def sendAllChanges(self, remote, changes): + dl = [remote.callRemote('addChange', change) + for change in changes] + return defer.DeferredList(dl) + + def run(self): + opts = Options() + try: + opts.parseOptions() + except usage.error, ue: + print opts + print "%s: %s" % (sys.argv[0], ue) + sys.exit() + + changes = self.getChanges(opts) + if opts['dryrun']: + for i,c in enumerate(changes): + print "CHANGE #%d" % (i+1) + keys = c.keys() + keys.sort() + for k in keys: + print "[%10s]: %s" % (k, c[k]) + print "*NOT* sending any changes" + return + + d = self.sendChanges(opts, changes) + + def quit(*why): + print "quitting! because", why + reactor.stop() + + def failed(f): + print "FAILURE" + print f + reactor.stop() + + d.addCallback(quit, "SUCCESS") + d.addErrback(failed) + reactor.callLater(60, quit, "TIMEOUT") + reactor.run() if __name__ == '__main__': - opts = Options() - try: - opts.parseOptions() - except usage.error, ue: - print opts - print "%s: %s" % (sys.argv[0], ue) - sys.exit() - main(opts) + s = ChangeSender() + s.run() + +