From warner at users.sourceforge.net Mon Feb 5 18:47:24 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 05 Feb 2007 18:47:24 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status mail.py,1.31,1.32 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7859/buildbot/status Modified Files: mail.py Log Message: [project @ MailNotifier: assert that 'mode' is one of the supported values] Original author: warner at lothar.com Date: 2007-02-05 18:42:31 Index: mail.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- mail.py 11 Dec 2006 09:06:35 -0000 1.31 +++ mail.py 5 Feb 2007 18:47:22 -0000 1.32 @@ -136,6 +136,7 @@ self.extraRecipients = extraRecipients self.sendToInterestedUsers = sendToInterestedUsers self.fromaddr = fromaddr + assert mode in ('all', 'failing', 'problem') self.mode = mode self.categories = categories self.builders = builders From warner at users.sourceforge.net Mon Feb 5 18:47:24 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 05 Feb 2007 18:47:24 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.831,1.832 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7859 Modified Files: ChangeLog Log Message: [project @ MailNotifier: assert that 'mode' is one of the supported values] Original author: warner at lothar.com Date: 2007-02-05 18:42:31 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.831 retrieving revision 1.832 diff -u -d -r1.831 -r1.832 --- ChangeLog 31 Jan 2007 00:45:57 -0000 1.831 +++ ChangeLog 5 Feb 2007 18:47:22 -0000 1.832 @@ -1,3 +1,9 @@ +2007-02-05 Brian Warner + + * buildbot/status/mail.py (MailNotifier.__init__): assert that 'mode' + is one of the three known values, otherwise we emit some confusing + messages later on. Thanks to Grig Gheorghiu for the catch. + 2007-01-30 Brian Warner * buildbot/changes/bonsaipoller.py (BonsaiParser.__init__): Ben From warner at users.sourceforge.net Tue Feb 6 08:23:02 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 08:23:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.832,1.833 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4693 Modified Files: ChangeLog Log Message: [project @ test_steps.py: remove the last use of reactor.iterate() in the whole tree] Original author: warner at lothar.com Date: 2007-02-06 08:22:26 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.832 retrieving revision 1.833 diff -u -d -r1.832 -r1.833 --- ChangeLog 5 Feb 2007 18:47:22 -0000 1.832 +++ ChangeLog 6 Feb 2007 08:23:00 -0000 1.833 @@ -1,3 +1,10 @@ +2007-02-06 Brian Warner + + * buildbot/test/test_steps.py (BuildStep): remove use of + reactor.iterate(), although the technique I replaced it with is a + gross polling hack that must be cleaned up properly some day. This + was the last use of reactor.iterate in the entire tree, yay. + 2007-02-05 Brian Warner * buildbot/status/mail.py (MailNotifier.__init__): assert that 'mode' From warner at users.sourceforge.net Tue Feb 6 08:23:02 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 08:23:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_steps.py,1.36,1.37 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4693/buildbot/test Modified Files: test_steps.py Log Message: [project @ test_steps.py: remove the last use of reactor.iterate() in the whole tree] Original author: warner at lothar.com Date: 2007-02-06 08:22:26 Index: test_steps.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- test_steps.py 11 Dec 2006 09:14:38 -0000 1.36 +++ test_steps.py 6 Feb 2007 08:23:00 -0000 1.37 @@ -96,22 +96,33 @@ def testShellCommand1(self): cmd = "argle bargle" dir = "murkle" - expectedEvents = [] + self.expectedEvents = [] buildstep.RemoteCommand.commandCounter[0] = 3 c = MyShellCommand(workdir=dir, command=cmd, build=self.build, timeout=10) - self.assertEqual(self.remote.events, expectedEvents) + self.assertEqual(self.remote.events, self.expectedEvents) c.step_status = self.build_status.addStepWithName("myshellcommand") d = c.startStep(self.remote) self.failUnless(c.started) - rc = c.rc d.addCallbacks(self.callback, self.errback) - timeout = time.time() + 10 - while self.remote.remoteCalls == 0: - if time.time() > timeout: - self.fail("timeout") - reactor.iterate(0.01) - expectedEvents.append(["callRemote", "startCommand", + d2 = self.poll() + d2.addCallback(self._testShellCommand1_2, c) + return d2 + testShellCommand1.timeout = 10 + + def poll(self, ignored=None): + # TODO: This is gross, but at least it's no longer using + # reactor.iterate() . Still, get rid of this some day soon. + if self.remote.remoteCalls == 0: + d = defer.Deferred() + d.addCallback(self.poll) + reactor.callLater(0.1, d.callback, None) + return d + return defer.succeed(None) + + def _testShellCommand1_2(self, res, c): + rc = c.rc + self.expectedEvents.append(["callRemote", "startCommand", (rc, "3", "shell", {'command': "argle bargle", @@ -121,7 +132,7 @@ 'logfiles': {}, 'timeout': 10, 'env': None}) ] ) - self.assertEqual(self.remote.events, expectedEvents) + self.assertEqual(self.remote.events, self.expectedEvents) # we could do self.remote.deferred.errback(UnknownCommand) here. We # could also do .callback(), but generally the master end silently @@ -149,11 +160,19 @@ rc.remote_complete() # that should fire the Deferred - timeout = time.time() + 10 - while not self.finished: - if time.time() > timeout: - self.fail("timeout") - reactor.iterate(0.01) + d = self.poll2() + d.addCallback(self._testShellCommand1_3) + return d + + def poll2(self, ignored=None): + if not self.finished: + d = defer.Deferred() + d.addCallback(self.poll2) + reactor.callLater(0.1, d.callback, None) + return d + return defer.succeed(None) + + def _testShellCommand1_3(self, res): self.assertEqual(self.failed, 0) self.assertEqual(self.results, 0) From warner at users.sourceforge.net Tue Feb 6 20:36:11 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py, 1.25, 1.26 sourcestamp.py, 1.3, 1.4 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9373/buildbot Modified Files: scheduler.py sourcestamp.py Log Message: [project @ implement 'try --diff', might not work yet, still needs docs and tests] Original author: warner at allmydata.com Date: 2007-02-06 19:06:08 Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- scheduler.py 23 Jan 2007 21:04:32 -0000 1.25 +++ scheduler.py 6 Feb 2007 20:36:09 -0000 1.26 @@ -563,7 +563,7 @@ # "1", the version number of this format # buildsetID, arbitrary string, used to find the buildSet later # branch name, "" for default-branch - # base revision + # base revision, "" for HEAD # patchlevel, usually "1" # patch # builderNames... @@ -579,6 +579,8 @@ builderNames = s[5:] if branch == "": branch = None + if baserev == "": + baserev = None patchlevel = int(patchlevel) patch = (patchlevel, diff) ss = SourceStamp(branch, baserev, patch) Index: sourcestamp.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/sourcestamp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sourcestamp.py 11 Dec 2006 09:06:34 -0000 1.3 +++ sourcestamp.py 6 Feb 2007 20:36:09 -0000 1.4 @@ -6,17 +6,17 @@ """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 + step use its default branch. There are three possibilities for the remaining elements: - - (revision=REV, patchspec=None, changes=None): build REV + - (revision=REV, patchspec=None, changes=None): build REV. If REV is + None, build the HEAD revision from the given branch. - (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/buildbot/scripts In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9373/buildbot/scripts Modified Files: runner.py tryclient.py Log Message: [project @ implement 'try --diff', might not work yet, still needs docs and tests] Original author: warner at allmydata.com Date: 2007-02-06 19:06:08 Index: runner.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- runner.py 9 Dec 2006 07:09:41 -0000 1.50 +++ runner.py 6 Feb 2007 20:36:09 -0000 1.51 @@ -585,7 +585,15 @@ ["master", "m", None, "Location of the buildmaster's PBListener (host:port)"], ["passwd", None, None, "password for PB authentication"], - + + ["diff", None, None, + "Filename of a patch to use instead of scanning a local tree. Use '-' for stdin."], + ["patchlevel", "p", 0, + "Number of slashes to remove from patch pathnames, like the -p option to 'patch'"], + + ["baserev", None, None, + "Base revision to use instead of scanning a local tree."], + ["vc", None, None, "The VC system in use, one of: cvs,svn,tla,baz,darcs"], ["branch", None, None, @@ -607,6 +615,9 @@ def opt_builder(self, option): self['builders'].append(option) + def opt_patchlevel(self, option): + self['patchlevel'] = int(option) + def getSynopsis(self): return "Usage: buildbot try [options]" Index: tryclient.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- tryclient.py 23 Jan 2007 05:49:58 -0000 1.18 +++ tryclient.py 6 Feb 2007 20:36:09 -0000 1.19 @@ -341,28 +341,43 @@ self.bsid = "%d-%s" % (time.time(), random.randint(0, 1000000)) # common options - vc = self.getopt("vc", "try_vc") branch = self.getopt("branch", "try_branch") - if vc in ("cvs", "svn"): - # we need to find the tree-top - topdir = self.getopt("try_topdir", "try_topdir") - if topdir: - treedir = os.path.expanduser(topdir) + difffile = self.config.get("diff") + if difffile: + baserev = self.config.get("baserev") + if difffile == "-": + diff = sys.stdin.read() else: - topfile = self.getopt("try-topfile", "try_topfile") - treedir = getTopdir(topfile) + diff = open(difffile,"r").read() + patch = (self.config['patchlevel'], diff) + ss = SourceStamp(branch, baserev, patch) + d = defer.succeed(ss) else: - treedir = os.getcwd() - d = getSourceStamp(vc, treedir, branch) + vc = self.getopt("vc", "try_vc") + if vc in ("cvs", "svn"): + # we need to find the tree-top + topdir = self.getopt("try_topdir", "try_topdir") + if topdir: + treedir = os.path.expanduser(topdir) + else: + topfile = self.getopt("try-topfile", "try_topfile") + treedir = getTopdir(topfile) + else: + treedir = os.getcwd() + d = getSourceStamp(vc, treedir, branch) d.addCallback(self._createJob_1) return d + def _createJob_1(self, ss): self.sourcestamp = ss if self.connect == "ssh": patchlevel, diff = ss.patch + revspec = ss.revision + if revspec is None: + revspec = "" self.jobfile = createJobfile(self.bsid, - ss.branch or "", ss.revision, + ss.branch or "", revspec, patchlevel, diff, self.builderNames) From warner at users.sourceforge.net Tue Feb 6 20:36:11 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:11 +0000 Subject: [Buildbot-commits] buildbot Branch.changelog,NONE,1.1 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9373 Added Files: Branch.changelog Log Message: [project @ implement 'try --diff', might not work yet, still needs docs and tests] Original author: warner at allmydata.com Date: 2007-02-06 19:06:08 --- NEW FILE: Branch.changelog --- 2007-02-06 Brian Warner * buildbot/scripts/tryclient.py (Try.createJob): implement --diff option, to take the patch from a pre-made file rather than generating it from the local tree. * buildbot/scripts/runner.py (TryOptions): add --diff, --patchlevel, and --baserev options * buildbot/scheduler.py (Try_Jobdir.parseJob): treat a baserev of "" as None, meaning HEAD. * buildbot/sourcestamp.py (SourceStamp): update docstring to indicate that baserev=None means HEAD # Local Variables: # add-log-time-format: add-log-iso8601-time-string # End: From warner at users.sourceforge.net Tue Feb 6 20:36:18 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:18 +0000 Subject: [Buildbot-commits] buildbot Branch.changelog,1.1,1.2 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9401 Modified Files: Branch.changelog Log Message: [project @ steps.source: when our SourceStamp has a patch, add the contents of the patch as a LogFile] Original author: warner at allmydata.com Date: 2007-02-06 19:34:02 Index: Branch.changelog =================================================================== RCS file: /cvsroot/buildbot/buildbot/Branch.changelog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Branch.changelog 6 Feb 2007 20:36:09 -0000 1.1 +++ Branch.changelog 6 Feb 2007 20:36:16 -0000 1.2 @@ -1,5 +1,9 @@ 2007-02-06 Brian Warner + * buildbot/steps/source.py (Source.start): if we're using a patch, + add it as a LogFile to the checkout/update step. This will turn + into a link on the waterfall page. + * buildbot/scripts/tryclient.py (Try.createJob): implement --diff option, to take the patch from a pre-made file rather than generating it from the local tree. From warner at users.sourceforge.net Tue Feb 6 20:36:18 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:18 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps source.py,1.4,1.5 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9401/buildbot/steps Modified Files: source.py Log Message: [project @ steps.source: when our SourceStamp has a patch, add the contents of the patch as a LogFile] Original author: warner at allmydata.com Date: 2007-02-06 19:34:02 Index: source.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- source.py 23 Jan 2007 05:49:58 -0000 1.4 +++ source.py 6 Feb 2007 20:36:16 -0000 1.5 @@ -169,6 +169,8 @@ # 'patch' is None or a tuple of (patchlevel, diff) patch = s.patch + if patch: + self.addCompleteLog("patch", patch[1]) self.startVC(branch, revision, patch) From warner at users.sourceforge.net Tue Feb 6 20:36:29 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog, 1.833, 1.834 Branch.changelog, 1.2, NONE Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9428 Modified Files: ChangeLog Removed Files: Branch.changelog Log Message: [project @ merge in 'buildbot try --diff' branch] Original author: warner at lothar.com Date: 2007-02-06 19:49:22 --- Branch.changelog DELETED --- Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.833 retrieving revision 1.834 diff -u -d -r1.833 -r1.834 --- ChangeLog 6 Feb 2007 08:23:00 -0000 1.833 +++ ChangeLog 6 Feb 2007 20:36:27 -0000 1.834 @@ -1,5 +1,20 @@ 2007-02-06 Brian Warner + * buildbot/steps/source.py (Source.start): if we're using a patch, + add it as a LogFile to the checkout/update step. This will turn + into a link on the waterfall page. + + * buildbot/scripts/tryclient.py (Try.createJob): implement --diff + option, to take the patch from a pre-made file rather than + generating it from the local tree. Thanks to Robert Helmer for the + idea. + * buildbot/scripts/runner.py (TryOptions): add --diff, + --patchlevel, and --baserev options + * buildbot/scheduler.py (Try_Jobdir.parseJob): treat a baserev of "" + as None, meaning HEAD. + * buildbot/sourcestamp.py (SourceStamp): update docstring to + indicate that baserev=None means HEAD + * buildbot/test/test_steps.py (BuildStep): remove use of reactor.iterate(), although the technique I replaced it with is a gross polling hack that must be cleaned up properly some day. This From warner at users.sourceforge.net Tue Feb 6 20:36:47 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:47 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.834,1.835 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9441 Modified Files: ChangeLog Log Message: [project @ document 'buildbot try --diff'] Original author: warner at lothar.com Date: 2007-02-06 20:34:28 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.834 retrieving revision 1.835 diff -u -d -r1.834 -r1.835 --- ChangeLog 6 Feb 2007 20:36:27 -0000 1.834 +++ ChangeLog 6 Feb 2007 20:36:45 -0000 1.835 @@ -14,6 +14,7 @@ as None, meaning HEAD. * buildbot/sourcestamp.py (SourceStamp): update docstring to indicate that baserev=None means HEAD + * docs/buildbot.texinfo (try --diff): document it * buildbot/test/test_steps.py (BuildStep): remove use of reactor.iterate(), although the technique I replaced it with is a From warner at users.sourceforge.net Tue Feb 6 20:36:47 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 20:36:47 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.96,1.97 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9441/docs Modified Files: buildbot.texinfo Log Message: [project @ document 'buildbot try --diff'] Original author: warner at lothar.com Date: 2007-02-06 20:34:28 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- buildbot.texinfo 23 Jan 2007 05:49:58 -0000 1.96 +++ buildbot.texinfo 6 Feb 2007 20:36:45 -0000 1.97 @@ -243,6 +243,10 @@ * statusgui:: * try:: +waiting for results + +* try --diff:: + Other Tools * sendchange:: @@ -5827,6 +5831,10 @@ builds run, and will not terminate until the first failure has been detected (or the last success). +There is an alternate form which accepts a pre-made patch file +(typically the output of a command like 'svn diff'). This ``--diff'' +form does not require a local tree to run from. See @xref{try --diff}. + For this command to work, several pieces must be in place: @@ -6140,6 +6148,48 @@ @code{try_quiet=True}), it will emit a progress message every 60 seconds until the builds have completed. + at menu +* try --diff:: + at end menu + + at node try --diff, , try, try + at subsubsection try --diff + +Sometimes you might have a patch from someone else that you want to +submit to the buildbot. For example, a user may have created a patch +to fix some specific bug and sent it to you by email. You've inspected +the patch and suspect that it might do the job (and have at least +confirmed that it doesn't do anything evil). Now you want to test it +out. + +One approach would be to check out a new local tree, apply the patch, +run your local tests, then use ``buildbot try'' to run the tests on +other platforms. An alternate approach is to use the @command{buildbot +try --diff} form to have the buildbot test the patch without using a +local tree. + +This form takes a @option{--diff} argument which points to a file that +contains the patch you want to apply. By default this patch will be +applied to the TRUNK revision, but if you give the optional + at option{--baserev} argument, a tree of the given revision will be used +as a starting point instead of TRUNK. + +You can also use @command{buildbot try --diff=-} to read the patch +from stdin. + +Each patch has a ``patchlevel'' associated with it. This indicates the +number of slashes (and preceding pathnames) that should be stripped +before applying the diff. This exactly corresponds to the @option{-p} +or @option{--strip} argument to the @command{patch} utility. By +default @command{buildbot try --diff} uses a patchlevel of 0, but you +can override this with the @option{-p} argument. + +When you use @option{--diff}, you do not need to use any of the other +options that relate to a local tree, specifically @option{--vc}, + at option{--try-topfile}, or @option{--try-topdir}. These options will +be ignored. Of course you must still specify how to get to the +buildmaster (with @option{--connect}, @option{--tryhost}, etc). + @node Other Tools, .buildbot config directory, Developer Tools, Command-line tool @section Other Tools From warner at users.sourceforge.net Tue Feb 6 23:05:57 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 06 Feb 2007 23:05:57 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.835,1.836 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2362 Modified Files: ChangeLog Log Message: [project @ update ChangeLog with 'buildbot try --diff' ticket number] Original author: warner at lothar.com Date: 2007-02-06 23:03:42 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.835 retrieving revision 1.836 diff -u -d -r1.835 -r1.836 --- ChangeLog 6 Feb 2007 20:36:45 -0000 1.835 +++ ChangeLog 6 Feb 2007 23:05:54 -0000 1.836 @@ -7,7 +7,7 @@ * buildbot/scripts/tryclient.py (Try.createJob): implement --diff option, to take the patch from a pre-made file rather than generating it from the local tree. Thanks to Robert Helmer for the - idea. + idea. Closes #15 (the Trac ticket on the new http://buildbot.net/). * buildbot/scripts/runner.py (TryOptions): add --diff, --patchlevel, and --baserev options * buildbot/scheduler.py (Try_Jobdir.parseJob): treat a baserev of "" From warner at users.sourceforge.net Wed Feb 7 02:32:48 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 02:32:48 +0000 Subject: [Buildbot-commits] buildbot/contrib bb_applet.py,1.2,1.3 Message-ID: Update of /cvsroot/buildbot/buildbot/contrib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18960/contrib Modified Files: bb_applet.py Log Message: [project @ update bb_applet.py, adding prefs and connect/disconnect controls] Original author: warner at allmydata.com Date: 2007-02-07 02:31:15 Index: bb_applet.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/contrib/bb_applet.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bb_applet.py 23 Jan 2007 08:01:35 -0000 1.2 +++ bb_applet.py 7 Feb 2007 02:32:46 -0000 1.3 @@ -41,8 +41,12 @@ # preferences are not yet implemented MENU = """ - + + + """ @@ -145,6 +149,8 @@ container.set_size_request(self.size, self.size) self.fill_nut() verbs = [ ("Props", self.menu_preferences), + ("Connect", self.menu_connect), + ("Disconnect", self.menu_disconnect), ] container.setup_menu(MENU, verbs) self.boxes = {} @@ -184,7 +190,10 @@ self.tips = gtk.Tooltips() self.tips.enable() - def disconnected(self): + def disconnect(self): + self.remote.broker.transport.loseConnection() + + def disconnected(self, *args): print "disconnected" self.fill_nut() @@ -238,9 +247,50 @@ def remote_stepFinished(self, buildername, build, stepname, step, results): pass - def menu_preferences(self, event, data=None): print "prefs!" + p = Prefs(self) + p.create() + + def set_buildmaster(self, buildmaster): + host, port = buildmaster.split(":") + self.buildmaster = host, int(port) + self.disconnect() + reactor.callLater(0.5, self.connect) + + def menu_connect(self, event, data=None): + self.connect() + + def menu_disconnect(self, event, data=None): + self.disconnect() + + +class Prefs: + def __init__(self, parent): + self.parent = parent + + def create(self): + self.w = w = gtk.Window() + v = gtk.VBox() + h = gtk.HBox() + h.pack_start(gtk.Label("buildmaster (host:port) : ")) + self.buildmaster_entry = b = gtk.Entry() + if self.parent.buildmaster: + host, port = self.parent.buildmaster + b.set_text("%s:%d" % (host, port)) + h.pack_start(b) + v.add(h) + + b = gtk.Button("Ok") + b.connect("clicked", self.done) + v.add(b) + + w.add(v) + w.show_all() + def done(self, widget): + buildmaster = self.buildmaster_entry.get_text() + self.parent.set_buildmaster(buildmaster) + self.w.unmap() From warner at users.sourceforge.net Wed Feb 7 02:32:48 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 02:32:48 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.836,1.837 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18960 Modified Files: ChangeLog Log Message: [project @ update bb_applet.py, adding prefs and connect/disconnect controls] Original author: warner at allmydata.com Date: 2007-02-07 02:31:15 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.836 retrieving revision 1.837 diff -u -d -r1.836 -r1.837 --- ChangeLog 6 Feb 2007 23:05:54 -0000 1.836 +++ ChangeLog 7 Feb 2007 02:32:46 -0000 1.837 @@ -1,5 +1,13 @@ 2007-02-06 Brian Warner + * contrib/bb_applet.py (MyApplet.filled): add a small prefs + dialog, to allow you to reset the buildmaster and force + connect/disconnect. Correctly handle losing the buildmaster + connection (by switching the display to the hexnut, at which point + you can use the 'Connect' menu item to reconnect). + +2007-02-06 Brian Warner + * buildbot/steps/source.py (Source.start): if we're using a patch, add it as a LogFile to the checkout/update step. This will turn into a link on the waterfall page. From warner at users.sourceforge.net Wed Feb 7 03:42:37 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 03:42:37 +0000 Subject: [Buildbot-commits] buildbot/buildbot master.py,1.103,1.104 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13498/buildbot Modified Files: master.py Log Message: [project @ BotPerspective.__repr__: correct bitrot] Original author: warner at lothar.com Date: 2007-02-07 03:33:12 Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- master.py 11 Dec 2006 09:06:34 -0000 1.103 +++ master.py 7 Feb 2007 03:42:34 -0000 1.104 @@ -59,9 +59,10 @@ return defer.succeed(None) def __repr__(self): - return "" % \ + builders = self.botmaster.getBuildersForSlave(self.slavename) + return "" % \ (self.slavename, - string.join(map(lambda b: b.name, self.builders), ',')) + string.join(map(lambda b: b.name, builders), ',')) def attached(self, bot): """This is called when the slave connects. From warner at users.sourceforge.net Wed Feb 7 03:42:36 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 03:42:36 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.837,1.838 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13498 Modified Files: ChangeLog Log Message: [project @ BotPerspective.__repr__: correct bitrot] Original author: warner at lothar.com Date: 2007-02-07 03:33:12 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.837 retrieving revision 1.838 diff -u -d -r1.837 -r1.838 --- ChangeLog 7 Feb 2007 02:32:46 -0000 1.837 +++ ChangeLog 7 Feb 2007 03:42:34 -0000 1.838 @@ -1,13 +1,14 @@ 2007-02-06 Brian Warner + * buildbot/master.py (BotPerspective.__repr__): fit bitrot, the + attributes this uses went away + * contrib/bb_applet.py (MyApplet.filled): add a small prefs dialog, to allow you to reset the buildmaster and force connect/disconnect. Correctly handle losing the buildmaster connection (by switching the display to the hexnut, at which point you can use the 'Connect' menu item to reconnect). -2007-02-06 Brian Warner - * buildbot/steps/source.py (Source.start): if we're using a patch, add it as a LogFile to the checkout/update step. This will turn into a link on the waterfall page. From warner at users.sourceforge.net Wed Feb 7 03:42:43 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 03:42:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot master.py,1.104,1.105 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13515/buildbot Modified Files: master.py Log Message: [project @ master.py: warn about orphan Builders: those which have no Schedulers to drive them] Original author: warner at lothar.com Date: 2007-02-07 03:38:48 Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- master.py 7 Feb 2007 03:42:34 -0000 1.104 +++ master.py 7 Feb 2007 03:42:41 -0000 1.105 @@ -721,11 +721,15 @@ % (b['name'], b['builddir'])) dirnames.append(b['builddir']) + unscheduled_buildernames = buildernames[:] schedulernames = [] for s in schedulers: for b in s.listBuilderNames(): assert b in buildernames, \ "%s uses unknown builder %s" % (s, b) + if b in unscheduled_buildernames: + unscheduled_buildernames.remove(b) + if s.name in schedulernames: # TODO: schedulers share a namespace with other Service # children of the BuildMaster node, like status plugins, the @@ -736,6 +740,10 @@ raise ValueError(msg) schedulernames.append(s.name) + if unscheduled_buildernames: + log.msg("Warning: some Builders have no Schedulers to drive them:" + " %s" % (unscheduled_buildernames,)) + # assert that all locks used by the Builds and their Steps are # uniquely named. locks = {} From warner at users.sourceforge.net Wed Feb 7 03:42:43 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 03:42:43 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.838,1.839 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13515 Modified Files: ChangeLog Log Message: [project @ master.py: warn about orphan Builders: those which have no Schedulers to drive them] Original author: warner at lothar.com Date: 2007-02-07 03:38:48 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.838 retrieving revision 1.839 diff -u -d -r1.838 -r1.839 --- ChangeLog 7 Feb 2007 03:42:34 -0000 1.838 +++ ChangeLog 7 Feb 2007 03:42:41 -0000 1.839 @@ -1,5 +1,8 @@ 2007-02-06 Brian Warner + * buildbot/master.py (BuildMaster.loadConfig): warn the user if we + see any Builders that don't have Schedulers to drive them + * buildbot/master.py (BotPerspective.__repr__): fit bitrot, the attributes this uses went away From warner at users.sourceforge.net Wed Feb 7 03:42:49 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 03:42:49 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.839,1.840 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13532 Modified Files: ChangeLog Log Message: [project @ html.py: oops, close the FORM tag] Original author: warner at lothar.com Date: 2007-02-07 03:41:38 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.839 retrieving revision 1.840 diff -u -d -r1.839 -r1.840 --- ChangeLog 7 Feb 2007 03:42:41 -0000 1.839 +++ ChangeLog 7 Feb 2007 03:42:47 -0000 1.840 @@ -1,5 +1,8 @@ 2007-02-06 Brian Warner + * buildbot/status/html.py (StatusResourceBuild.body): oops, close + the FORM tag + * buildbot/master.py (BuildMaster.loadConfig): warn the user if we see any Builders that don't have Schedulers to drive them From warner at users.sourceforge.net Wed Feb 7 03:42:49 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 03:42:49 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.94,1.95 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13532/buildbot/status Modified Files: html.py Log Message: [project @ html.py: oops, close the FORM tag] Original author: warner at lothar.com Date: 2007-02-07 03:41:38 Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- html.py 11 Dec 2006 09:06:35 -0000 1.94 +++ html.py 7 Feb 2007 03:42:47 -0000 1.95 @@ -394,6 +394,7 @@ data += make_row("Reason for re-running build:", "") data += '\n' + data += '\n' data += "

Steps and Logfiles:

\n" if b.getLogs(): From warner at users.sourceforge.net Wed Feb 7 04:25:32 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 04:25:32 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_steps.py, 1.37, 1.38 test_vc.py, 1.72, 1.73 test_web.py, 1.39, 1.40 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30421/buildbot/test Modified Files: test_steps.py test_vc.py test_web.py Log Message: [project @ hush most pyflakes warnings] Original author: warner at lothar.com Date: 2007-02-07 04:24:33 Index: test_steps.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- test_steps.py 6 Feb 2007 08:23:00 -0000 1.37 +++ test_steps.py 7 Feb 2007 04:25:29 -0000 1.38 @@ -14,7 +14,7 @@ # todo: test batched updates, by invoking remote_update(updates) instead of # statusUpdate(update). Also involves interrupted builds. -import os, time +import os from twisted.trial import unittest from twisted.internet import reactor, defer Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- test_vc.py 23 Jan 2007 05:49:58 -0000 1.72 +++ test_vc.py 7 Feb 2007 04:25:29 -0000 1.73 @@ -1066,10 +1066,7 @@ if self.httpServer: d.addCallback(lambda res: self.httpServer.stopListening()) def stopHTTPTimer(): - try: - from twisted.web import http # Twisted-2.0 - except ImportError: - from twisted.protocols import http # Twisted-1.3 + from twisted.web import http http._logDateTimeStop() # shut down the internal timer. DUMB! d.addCallback(lambda res: stopHTTPTimer()) d.addCallback(lambda res: self.tearDown2()) Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- test_web.py 11 Dec 2006 08:40:17 -0000 1.39 +++ test_web.py 7 Feb 2007 04:25:29 -0000 1.40 @@ -102,10 +102,7 @@ def stopHTTPLog(): # grr. - try: - from twisted.web import http # Twisted-2.0 - except ImportError: - from twisted.protocols import http # Twisted-1.3 + from twisted.web import http http._logDateTimeStop() class BaseWeb: From warner at users.sourceforge.net Wed Feb 7 04:25:31 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 04:25:31 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status builder.py, 1.93, 1.94 words.py, 1.47, 1.48 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30421/buildbot/status Modified Files: builder.py words.py Log Message: [project @ hush most pyflakes warnings] Original author: warner at lothar.com Date: 2007-02-07 04:24:33 Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- builder.py 11 Dec 2006 09:06:35 -0000 1.93 +++ builder.py 7 Feb 2007 04:25:29 -0000 1.94 @@ -14,10 +14,7 @@ pickle = cPickle except ImportError: import pickle -try: - from cStringIO import StringIO -except ImportError: - from StringIO import StringIO +from cStringIO import StringIO # sibling imports from buildbot import interfaces, util, sourcestamp Index: words.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/words.py,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- words.py 6 Sep 2006 00:41:55 -0000 1.47 +++ words.py 7 Feb 2007 04:25:29 -0000 1.48 @@ -6,12 +6,7 @@ import re, shlex from twisted.internet import protocol, reactor -try: - # Twisted-2.0 - from twisted.words.protocols import irc -except ImportError: - # Twisted-1.3 - from twisted.protocols import irc +from twisted.words.protocols import irc from twisted.python import log, failure from twisted.application import internet From warner at users.sourceforge.net Wed Feb 7 04:25:31 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 04:25:31 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.840,1.841 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30421 Modified Files: ChangeLog Log Message: [project @ hush most pyflakes warnings] Original author: warner at lothar.com Date: 2007-02-07 04:24:33 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.840 retrieving revision 1.841 diff -u -d -r1.840 -r1.841 --- ChangeLog 7 Feb 2007 03:42:47 -0000 1.840 +++ ChangeLog 7 Feb 2007 04:25:29 -0000 1.841 @@ -1,5 +1,15 @@ 2007-02-06 Brian Warner + * buildbot/clients/debug.py: hush pyflakes warnings by removing a + redundant import + * buildbot/scripts/startup.py: same, by removing twisted-1.3.0 + compatibility + * buildbot/status/builder.py: same, by requiring cStringIO + * buildbot/status/words.py: same, remove twisted-1.3.0 compat + * buildbot/test/test_vc.py: same + * buildbot/test/test_web.py: + * buildbot/test/test_steps.py: same, remove unused import + * buildbot/status/html.py (StatusResourceBuild.body): oops, close the FORM tag From warner at users.sourceforge.net Wed Feb 7 04:25:31 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 04:25:31 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts startup.py,1.3,1.4 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30421/buildbot/scripts Modified Files: startup.py Log Message: [project @ hush most pyflakes warnings] Original author: warner at lothar.com Date: 2007-02-07 04:24:33 Index: startup.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/startup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- startup.py 9 Dec 2006 09:19:48 -0000 1.3 +++ startup.py 7 Feb 2007 04:25:29 -0000 1.4 @@ -105,13 +105,9 @@ argv.append("--reactor=win32") sys.argv = argv - # this is copied from bin/twistd. twisted-1.3.0 uses twistw, while - # twisted-2.0.0 uses _twistw. + # this is copied from bin/twistd. twisted-2.0.0 uses _twistw. if platformType == "win32": - try: - from twisted.scripts._twistw import run - except ImportError: - from twisted.scripts.twistw import run + from twisted.scripts._twistw import run else: from twisted.scripts.twistd import run run() From warner at users.sourceforge.net Wed Feb 7 04:25:31 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 04:25:31 +0000 Subject: [Buildbot-commits] buildbot/buildbot/clients debug.py,1.7,1.8 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/clients In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30421/buildbot/clients Modified Files: debug.py Log Message: [project @ hush most pyflakes warnings] Original author: warner at lothar.com Date: 2007-02-07 04:24:33 Index: debug.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/clients/debug.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- debug.py 12 Dec 2006 03:33:42 -0000 1.7 +++ debug.py 7 Feb 2007 04:25:29 -0000 1.8 @@ -6,7 +6,7 @@ from twisted.python import util from twisted.spread import pb from twisted.cred import credentials -import gtk, gtk.glade +import gtk.glade import sys, re class DebugWidget: From warner at users.sourceforge.net Wed Feb 7 06:13:25 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 06:13:25 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.97,1.98 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7309/docs Modified Files: buildbot.texinfo Log Message: [project @ docs: fix Requirements section to stop claiming python-2.2 compatibility. Closes #13.] Original author: warner at lothar.com Date: 2007-02-07 06:12:42 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- buildbot.texinfo 6 Feb 2007 20:36:45 -0000 1.97 +++ buildbot.texinfo 7 Feb 2007 06:13:23 -0000 1.98 @@ -596,29 +596,24 @@ @item Python: http://www.python.org -Buildbot requires python-2.2 or later, and is primarily developed -against python-2.3. The buildmaster uses generators, a feature which -is not available in python-2.1, and both master and slave require a -version of Twisted which only works with python-2.2 or later. Certain -features (like the inclusion of build logs in status emails) require -python-2.2.2 or later. The IRC ``force build'' command requires -python-2.3 (for the shlex.split function). +Buildbot requires python-2.3 or later, and is primarily developed +against python-2.4. It is also tested against python-2.5 . @item Twisted: http://twistedmatrix.com -Both the buildmaster and the buildslaves require Twisted-1.3.0 or -later. It has been mainly developed against Twisted-2.0.1, but has -been tested against Twisted-2.1.0 (the most recent as of this -writing), and might even work on versions as old as Twisted-1.1.0, but -as always the most recent version is recommended. +Both the buildmaster and the buildslaves require Twisted-2.0.x or +later. It has been tested against all releases of Twisted up to +Twisted-2.5.0 (the most recent as of this writing). As always, the +most recent version is recommended. -Twisted-1.3.0 and earlier were released as a single monolithic -package. When you run Buildbot against Twisted-2.0.0 or later (which -are split into a number of smaller subpackages), you'll need at least -"Twisted" (the core package), and you'll also want TwistedMail, +Twisted is delivered as a collection of subpackages. You'll need at +least "Twisted" (the core package), and you'll also want TwistedMail, TwistedWeb, and TwistedWords (for sending email, serving a web status -page, and delivering build status via IRC, respectively). +page, and delivering build status via IRC, respectively). You might +also want TwistedConch (for the encrypted Manhole debug port). Note +that Twisted requires ZopeInterface to be installed as well. + @end itemize Certain other packages may be useful on the system running the From warner at users.sourceforge.net Wed Feb 7 06:13:25 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 06:13:25 +0000 Subject: [Buildbot-commits] buildbot ChangeLog, 1.841, 1.842 README, 1.34, 1.35 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7309 Modified Files: ChangeLog README Log Message: [project @ docs: fix Requirements section to stop claiming python-2.2 compatibility. Closes #13.] Original author: warner at lothar.com Date: 2007-02-07 06:12:42 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.841 retrieving revision 1.842 diff -u -d -r1.841 -r1.842 --- ChangeLog 7 Feb 2007 04:25:29 -0000 1.841 +++ ChangeLog 7 Feb 2007 06:13:22 -0000 1.842 @@ -1,5 +1,10 @@ 2007-02-06 Brian Warner + * docs/buildbot.texinfo (Requirements): update requirements to + stop claiming compatibility with python-2.2 or twisted-1.3.x . + Closes #13. + * README: mention python-2.5 and twisted-2.5 compatibility + * buildbot/clients/debug.py: hush pyflakes warnings by removing a redundant import * buildbot/scripts/startup.py: same, by removing twisted-1.3.0 Index: README =================================================================== RCS file: /cvsroot/buildbot/buildbot/README,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- README 11 Dec 2006 05:21:39 -0000 1.34 +++ README 7 Feb 2007 06:13:22 -0000 1.35 @@ -53,13 +53,13 @@ Python: http://www.python.org Buildbot requires python-2.3 or later, and is primarily developed against - python-2.4 . It has *not* yet been tested against python-2.5 . + python-2.4 . It is also tested against python-2.5 . Twisted: http://twistedmatrix.com Both the buildmaster and the buildslaves require Twisted-2.0.x or later. As always, the most recent version is recommended. It has been tested - against Twisted-2.4.0 and Twisted SVN as of the date of release. + against Twisted-2.5.0 and Twisted SVN as of the date of release. Twisted is delivered as a collection of subpackages. You'll need at least "Twisted" (the core package), and you'll also want TwistedMail, From warner at users.sourceforge.net Wed Feb 7 08:21:59 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 08:21:59 +0000 Subject: [Buildbot-commits] buildbot/contrib/OS-X - New directory Message-ID: Update of /cvsroot/buildbot/buildbot/contrib/OS-X In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24990/contrib/OS-X Log Message: Directory /cvsroot/buildbot/buildbot/contrib/OS-X added to the repository From warner at users.sourceforge.net Wed Feb 7 08:22:06 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 08:22:06 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.842,1.843 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25182 Modified Files: ChangeLog Log Message: [project @ add Mark Pauley's launchd .plist files] Original author: warner at lothar.com Date: 2007-02-07 08:19:42 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.842 retrieving revision 1.843 diff -u -d -r1.842 -r1.843 --- ChangeLog 7 Feb 2007 06:13:22 -0000 1.842 +++ ChangeLog 7 Feb 2007 08:22:04 -0000 1.843 @@ -1,3 +1,9 @@ +2007-02-07 Brian Warner + + * contrib/OS-X/*: add some launchd .plist files for automatically + starting a buildmaster or buildslave under OS-X (10.4 or later). + Thanks to Mark Pauley for these. + 2007-02-06 Brian Warner * docs/buildbot.texinfo (Requirements): update requirements to From warner at users.sourceforge.net Wed Feb 7 08:22:06 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 07 Feb 2007 08:22:06 +0000 Subject: [Buildbot-commits] buildbot/contrib/OS-X README, NONE, 1.1 net.sourceforge.buildbot.master.plist, NONE, 1.1 net.sourceforge.buildbot.slave.plist, NONE, 1.1 Message-ID: Update of /cvsroot/buildbot/buildbot/contrib/OS-X In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25182/contrib/OS-X Added Files: README net.sourceforge.buildbot.master.plist net.sourceforge.buildbot.slave.plist Log Message: [project @ add Mark Pauley's launchd .plist files] Original author: warner at lothar.com Date: 2007-02-07 08:19:42 --- NEW FILE: README --- Mark Pauley contributed the two launchd plist files for OS-X (10.4+) to start a buildmaster or buildslave automatically at startup: contrib/OS-X/net.sourceforge.buildbot.master.plist contrib/OS-X/net.sourceforge.buildbot.slave.plist His email message is as follows: Message-Id: From: Mark Pauley To: buildbot-devel Date: Wed, 24 Jan 2007 11:05:44 -0800 Subject: [Buildbot-devel] Sample buildbot launchd plists for MacOS 10.4+ Hi guys, I've had these kicking around for a while and thought that maybe someone would like to see them. Installing either of these two to / Library/LaunchDaemons will cause the bulidbot slave or master to auto- start as whatever user you like on launch. This is the "right way to do this" going forward, startupitems are deprecated. Please note that this means any tests that require a windowserver connection on os x won't work. --- NEW FILE: net.sourceforge.buildbot.master.plist --- Label net.sourceforge.buildbot.slave UserName buildbot WorkingDirectory /Users/buildbot/Buildbot_Master ProgramArguments /usr/bin/twistd --nodaemon --python=buildbot.tac --logfile=buildbot.log --prefix=master QueueDirectories / KeepAlive SuccessfulExit RunAtLoad StandardErrorPath /var/log/build_master.log --- NEW FILE: net.sourceforge.buildbot.slave.plist --- Label net.sourceforge.buildbot.slave UserName buildbot WorkingDirectory /Users/buildbot/Buildbot_Slave ProgramArguments /usr/bin/twistd --nodaemon --python=buildbot.tac --logfile=buildbot.log --prefix=slave KeepAlive SuccessfulExit RunAtLoad From warner at users.sourceforge.net Tue Feb 27 23:03:16 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:03:16 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web - New directory Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5373/buildbot/status/web Log Message: Directory /cvsroot/buildbot/buildbot/buildbot/status/web added to the repository From warner at users.sourceforge.net Tue Feb 27 23:03:26 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:03:26 +0000 Subject: [Buildbot-commits] buildbot Branch.ChangeLog,1.2,1.3 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5417 Added Files: Branch.ChangeLog Log Message: [project @ web-parts: start rearranging web status files] Original author: warner at lothar.com Date: 2007-02-27 20:33:22 --- NEW FILE: Branch.ChangeLog --- Tue Feb 27 14:30:48 2007 Brian Warner * buildbot/status/web/*.py: move all web status stuff into a separate directory, in anticipation of splitting it into smaller pieces and adding more files. html.py was getting way too big. From warner at users.sourceforge.net Tue Feb 27 23:03:26 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:03:26 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.95,NONE Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5417/buildbot/status Removed Files: html.py Log Message: [project @ web-parts: start rearranging web status files] Original author: warner at lothar.com Date: 2007-02-27 20:33:22 --- html.py DELETED --- From warner at users.sourceforge.net Tue Feb 27 23:03:26 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:03:26 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web __init__.py, NONE, 1.1 waterfall.py, NONE, 1.1 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5417/buildbot/status/web Added Files: __init__.py waterfall.py Log Message: [project @ web-parts: start rearranging web status files] Original author: warner at lothar.com Date: 2007-02-27 20:33:22 --- NEW FILE: __init__.py --- --- NEW FILE: waterfall.py --- # -*- test-case-name: buildbot.test.test_web -*- from __future__ import generators from twisted.python import log, components import urllib, re from twisted.internet import defer, reactor from twisted.web.resource import Resource from twisted.web import static, html, server, distrib from twisted.web.error import NoResource from twisted.web.util import Redirect, DeferredResource from twisted.application import strports from twisted.spread import pb from zope.interface import Interface, implements import sys, string, types, time, os.path from buildbot import interfaces, util [...1692 lines suppressed...] def setup(self): status = self.parent.getStatus() if self.allowForce: control = interfaces.IControl(self.parent) else: control = None change_svc = self.parent.change_svc sr = StatusResource(status, control, change_svc, self.categories, self.css) sr.favicon = self.favicon sr.robots_txt = self.robots_txt self.site = server.Site(sr) if self.http_port is not None: s = strports.service(self.http_port, self.site) s.setServiceParent(self) if self.distrib_port is not None: f = pb.PBServerFactory(distrib.ResourcePublisher(self.site)) s = strports.service(self.distrib_port, f) s.setServiceParent(self) From warner at users.sourceforge.net Tue Feb 27 23:07:18 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:07:18 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.40,1.41 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7101/buildbot/test Modified Files: test_web.py Log Message: [project @ web-parts: fix more issues resulting from moving html.py into web/*] Original author: warner at lothar.com Date: 2007-02-27 22:14:46 Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- test_web.py 7 Feb 2007 04:25:29 -0000 1.40 +++ test_web.py 27 Feb 2007 23:07:16 -0000 1.41 @@ -12,6 +12,7 @@ from buildbot import master, interfaces, sourcestamp from buildbot.status import html, builder +from buildbot.status.web import waterfall from buildbot.changes.changes import Change from buildbot.process import base from buildbot.process.buildstep import BuildStep @@ -230,7 +231,7 @@ d.addCallback(self._test_waterfall_3) return d def _test_waterfall_3(self, icon): - expected = open(html.buildbot_icon,"rb").read() + expected = open(waterfall.buildbot_icon,"rb").read() self.failUnless(icon == expected) d = client.getPage("http://localhost:%d/changes" % self.port) @@ -264,7 +265,7 @@ s = setupBuildStepStatus("test_web.test_urls") s.addURL("coverage", "http://coverage.example.org/target") s.addURL("icon", "http://coverage.example.org/icon.png") - box = html.IBox(s).getBox() + box = waterfall.IBox(s).getBox() td = box.td() e1 = '[coverage]' self.failUnlessSubstring(e1, td) From warner at users.sourceforge.net Tue Feb 27 23:07:26 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:07:26 +0000 Subject: [Buildbot-commits] buildbot Branch.ChangeLog, 1.4, 1.5 MANIFEST.in, 1.23, 1.24 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7145 Modified Files: Branch.ChangeLog MANIFEST.in Log Message: [project @ web-parts: a few more move issues] Original author: warner at lothar.com Date: 2007-02-27 22:37:35 Index: Branch.ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/Branch.ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Branch.ChangeLog 27 Feb 2007 23:07:16 -0000 1.4 +++ Branch.ChangeLog 27 Feb 2007 23:07:24 -0000 1.5 @@ -6,3 +6,4 @@ * buildbot/status/classic.css: move it too * setup.py: add the new sub-package * buildbot/test/test_web.py: match the changes + * MANIFEST.in: handle the move of classic.css Index: MANIFEST.in =================================================================== RCS file: /cvsroot/buildbot/buildbot/MANIFEST.in,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- MANIFEST.in 23 Aug 2006 07:04:36 -0000 1.23 +++ MANIFEST.in 27 Feb 2007 23:07:24 -0000 1.24 @@ -7,7 +7,7 @@ include docs/epyrun docs/gen-reference include buildbot/test/mail/* buildbot/test/subdir/* include buildbot/scripts/sample.cfg -include buildbot/status/classic.css +include buildbot/status/web/classic.css include buildbot/clients/debug.glade include buildbot/buildbot.png From warner at users.sourceforge.net Tue Feb 27 23:07:18 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:07:18 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web classic.css, NONE, 1.1 waterfall.py, 1.1, 1.2 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7101/buildbot/status/web Modified Files: waterfall.py Added Files: classic.css Log Message: [project @ web-parts: fix more issues resulting from moving html.py into web/*] Original author: warner at lothar.com Date: 2007-02-27 22:14:46 --- NEW FILE: classic.css --- a:visited { color: #800080; } td.Event, td.BuildStep, td.Activity, td.Change, td.Time, td.Builder { border-top: 1px solid; border-right: 1px solid; } /* Activity states */ .offline { background-color: red; } .idle { background-color: white; } .waiting { background-color: yellow; } .building { background-color: yellow; } /* LastBuild, BuildStep states */ .success { background-color: #72ff75; } .failure { background-color: red; } .warnings { background-color: #ff8000; } .exception { background-color: #c000c0; } .start,.running { background-color: yellow; } Index: waterfall.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/waterfall.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- waterfall.py 27 Feb 2007 23:03:24 -0000 1.1 +++ waterfall.py 27 Feb 2007 23:07:16 -0000 1.2 @@ -1569,7 +1569,7 @@ # the icon is sibpath(__file__, "../buildbot.png") . This is for # portability. up = os.path.dirname - buildbot_icon = os.path.abspath(os.path.join(up(up(__file__)), + buildbot_icon = os.path.abspath(os.path.join(up(up(up(__file__))), "buildbot.png")) buildbot_css = os.path.abspath(os.path.join(up(__file__), "classic.css")) From warner at users.sourceforge.net Tue Feb 27 23:07:18 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:07:18 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py, 1.96, 1.97 classic.css, 1.3, NONE Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7101/buildbot/status Added Files: html.py Removed Files: classic.css Log Message: [project @ web-parts: fix more issues resulting from moving html.py into web/*] Original author: warner at lothar.com Date: 2007-02-27 22:14:46 --- classic.css DELETED --- --- NEW FILE: html.py --- #! /usr/bin/python # compatibility wrapper. This is currently the preferred place for master.cfg # to import from. from buildbot.status.web.waterfall import Waterfall From warner at users.sourceforge.net Tue Feb 27 23:07:18 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:07:18 +0000 Subject: [Buildbot-commits] buildbot Branch.ChangeLog, 1.3, 1.4 setup.py, 1.41, 1.42 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7101 Modified Files: Branch.ChangeLog setup.py Log Message: [project @ web-parts: fix more issues resulting from moving html.py into web/*] Original author: warner at lothar.com Date: 2007-02-27 22:14:46 Index: Branch.ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/Branch.ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Branch.ChangeLog 27 Feb 2007 23:03:23 -0000 1.3 +++ Branch.ChangeLog 27 Feb 2007 23:07:16 -0000 1.4 @@ -3,4 +3,6 @@ * buildbot/status/web/*.py: move all web status stuff into a separate directory, in anticipation of splitting it into smaller pieces and adding more files. html.py was getting way too big. - + * buildbot/status/classic.css: move it too + * setup.py: add the new sub-package + * buildbot/test/test_web.py: match the changes Index: setup.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/setup.py,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- setup.py 3 Oct 2006 17:23:14 -0000 1.41 +++ setup.py 27 Feb 2007 23:07:16 -0000 1.42 @@ -64,7 +64,7 @@ ], packages=["buildbot", - "buildbot.status", + "buildbot.status", "buildbot.status.web", "buildbot.changes", "buildbot.steps", "buildbot.process", @@ -75,7 +75,7 @@ ], data_files=[("buildbot", ["buildbot/buildbot.png"]), ("buildbot/clients", ["buildbot/clients/debug.glade"]), - ("buildbot/status", ["buildbot/status/classic.css"]), + ("buildbot/status/web", ["buildbot/status/web/classic.css"]), ("buildbot/scripts", ["buildbot/scripts/sample.cfg"]), ("buildbot/test/mail", testmsgs), ("buildbot/test/subdir", ["buildbot/test/subdir/emit.py"]), From warner at users.sourceforge.net Tue Feb 27 23:07:37 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 27 Feb 2007 23:07:37 +0000 Subject: [Buildbot-commits] buildbot ChangeLog, 1.843, 1.844 Branch.ChangeLog, 1.5, NONE Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7166 Modified Files: ChangeLog Removed Files: Branch.ChangeLog Log Message: [project @ merge split-html.py-into-web/stuff change into trunk] Original author: warner at lothar.com Date: 2007-02-27 22:41:06 --- Branch.ChangeLog DELETED --- Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.843 retrieving revision 1.844 diff -u -d -r1.843 -r1.844 --- ChangeLog 7 Feb 2007 08:22:04 -0000 1.843 +++ ChangeLog 27 Feb 2007 23:07:34 -0000 1.844 @@ -1,3 +1,13 @@ +2007-02-27 Brian Warner + + * buildbot/status/web/*.py: move all web status stuff into a + separate directory, in anticipation of splitting it into smaller + pieces and adding more files. html.py was getting way too big. + * buildbot/status/classic.css: move it too + * setup.py: add the new sub-package + * buildbot/test/test_web.py: match the changes + * MANIFEST.in: handle the move of classic.css + 2007-02-07 Brian Warner * contrib/OS-X/*: add some launchd .plist files for automatically From warner at users.sourceforge.net Wed Feb 28 06:27:52 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 28 Feb 2007 06:27:52 +0000 Subject: [Buildbot-commits] buildbot/buildbot/changes p4poller.py,1.8,1.9 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/changes In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18011/buildbot/changes Modified Files: p4poller.py Log Message: [project @ p4changes] Use a more optimal form of "p4 changes", as suggested by Stewart Lord of Perforce technical support. From the p4d release notes: Special handling for @changelist - #85130 ** The syntax '//path/file at change1, at somethingelse' now performs better in many common cases. Previously, the server would search based on changelist number or file path according to hard-coded rules. This worked poorly in a few common cases: both '//singlefile at 1, at date' and '//... at 5000,5001' started with the wrong search. This left users trying odd syntax to second guess the server. Now the server adaptively tries searching by change number, but if that appears to be too inefficient (more than 80% of the revisions not matching the path), it switches to searching by path. (Bug #18689). In 2wire's case, this was the top source of server load, scanning ~2,200,000 rows for one project and ~2,700,000 rows for another every 10 minutes. Now each scans 10-20 rows on average. (Figures gathered with -Ztrack=1.) Original author: Scott Lamb Date: 2007-02-24 02:19:46 Index: p4poller.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/p4poller.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- p4poller.py 30 Sep 2006 22:35:59 -0000 1.8 +++ p4poller.py 28 Feb 2007 06:27:49 -0000 1.9 @@ -28,7 +28,7 @@ them to the change master.""" compare_attrs = ["p4port", "p4user", "p4passwd", "p4base", - "p4bin", "pollinterval", "histmax"] + "p4bin", "pollinterval"] changes_line_re = re.compile( r"Change (?P\d+) on \S+ by \S+@\S+ '.+'$") @@ -45,7 +45,7 @@ def __init__(self, p4port=None, p4user=None, p4passwd=None, p4base='//', p4bin='p4', split_file=lambda branchfile: (None, branchfile), - pollinterval=60 * 10, histmax=100): + pollinterval=60 * 10, histmax=None): """ @type p4port: string @param p4port: p4 port definition (host:portno) @@ -63,7 +63,8 @@ @type pollinterval: int @param pollinterval: interval in seconds between polls @type histmax: int - @param histmax: maximum number of changes to look back through + @param histmax: (obsolete) maximum number of changes to look back through. + ignored; accepted for backwards compatibility. """ self.p4port = p4port @@ -73,7 +74,6 @@ self.p4bin = p4bin self.split_file = split_file self.pollinterval = pollinterval - self.histmax = histmax self.loop = LoopingCall(self.checkp4) def startService(self): @@ -121,7 +121,11 @@ args.extend(['-u', self.p4user]) if self.p4passwd: args.extend(['-P', self.p4passwd]) - args.extend(['changes', '-m', str(self.histmax), self.p4base + '...']) + args.extend(['changes']) + if self.last_change is not None: + args.extend(['%s...@%d,now' % (self.p4base, self.last_change+1)]) + else: + args.extend(['-m', '1', '%s...' % (self.p4base,)]) env = {} return getProcessOutput(self.p4bin, args, env) @@ -133,13 +137,11 @@ if not line: continue m = self.changes_line_re.match(line) assert m, "Unexpected 'p4 changes' output: %r" % result - num = m.group('num') + num = int(m.group('num')) if last_change is None: - log.msg('P4Poller: starting at change %s' % num) + log.msg('P4Poller: starting at change %d' % num) self.last_change = num return [] - if last_change == num: - break changelists.append(num) changelists.reverse() # oldest first @@ -158,7 +160,7 @@ args.extend(['-u', self.p4user]) if self.p4passwd: args.extend(['-P', self.p4passwd]) - args.extend(['describe', '-s', num]) + args.extend(['describe', '-s', str(num)]) env = {} d = getProcessOutput(self.p4bin, args, env) return d From warner at users.sourceforge.net Wed Feb 28 06:27:52 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 28 Feb 2007 06:27:52 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_p4poller.py, 1.4, 1.5 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18011/buildbot/test Modified Files: test_p4poller.py Log Message: [project @ p4changes] Use a more optimal form of "p4 changes", as suggested by Stewart Lord of Perforce technical support. From the p4d release notes: Special handling for @changelist - #85130 ** The syntax '//path/file at change1, at somethingelse' now performs better in many common cases. Previously, the server would search based on changelist number or file path according to hard-coded rules. This worked poorly in a few common cases: both '//singlefile at 1, at date' and '//... at 5000,5001' started with the wrong search. This left users trying odd syntax to second guess the server. Now the server adaptively tries searching by change number, but if that appears to be too inefficient (more than 80% of the revisions not matching the path), it switches to searching by path. (Bug #18689). In 2wire's case, this was the top source of server load, scanning ~2,200,000 rows for one project and ~2,700,000 rows for another every 10 minutes. Now each scans 10-20 rows on average. (Figures gathered with -Ztrack=1.) Original author: Scott Lamb Date: 2007-02-24 02:19:46 Index: test_p4poller.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_p4poller.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- test_p4poller.py 11 Dec 2006 08:23:29 -0000 1.4 +++ test_p4poller.py 28 Feb 2007 06:27:50 -0000 1.5 @@ -38,20 +38,20 @@ """ p4change = { - '3': change_3_log + + 3: change_3_log + """Affected files ... ... //depot/myproject/branch_b/branch_b_file#1 add ... //depot/myproject/branch_b/whatbranch#1 branch ... //depot/myproject/branch_c/whatbranch#1 branch """, - '2': change_2_log + + 2: change_2_log + """Affected files ... ... //depot/myproject/trunk/whatbranch#1 add ... //depot/otherproject/trunk/something#1 add """, - '5': change_4_log + + 5: change_4_log + """Affected files ... ... //depot/myproject/branch_b/branch_b_file#1 add @@ -108,14 +108,14 @@ def _testCheck2(self, res): self.assertEquals(self.changes, []) - self.assertEquals(self.t.last_change, '1') + self.assertEquals(self.t.last_change, 1) # Subsequent times, it returns Change objects for new changes. return self.t.checkp4().addCallback(self._testCheck3) def _testCheck3(self, res): self.assertEquals(len(self.changes), 3) - self.assertEquals(self.t.last_change, '3') + self.assertEquals(self.t.last_change, 3) self.assert_(not self.t.working) # They're supposed to go oldest to newest, so this one must be first. @@ -170,7 +170,7 @@ def testFailedDescribe(self): """'p4 describe' failure is properly reported""" c = dict(p4change) - c['3'] = 'Perforce client error:\n...' + c[3] = 'Perforce client error:\n...' self.t = MockP4Source(p4changes=[first_p4changes, second_p4changes], p4change=c, p4port=None, p4user=None) self.t.parent = self @@ -186,7 +186,7 @@ self.assert_(isinstance(f, failure.Failure)) self.failUnlessIn('Perforce client error', str(f)) self.assert_(not self.t.working) - self.assertEquals(self.t.last_change, '2') + self.assertEquals(self.t.last_change, 2) def testAlreadyWorking(self): """don't launch a new poll while old is still going""" @@ -213,4 +213,4 @@ def _testSplitFile(self, res): self.assertEquals(len(self.changes), 2) - self.assertEquals(self.t.last_change, '5') + self.assertEquals(self.t.last_change, 5) From warner at users.sourceforge.net Wed Feb 28 06:28:02 2007 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 28 Feb 2007 06:28:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.844,1.845 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18028 Modified Files: ChangeLog Log Message: [project @ add Changelog for the p4poller optimization patch from Scott Lamb. Closes #27] Original author: warner at lothar.com Date: 2007-02-28 06:25:52 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.844 retrieving revision 1.845 diff -u -d -r1.844 -r1.845 --- ChangeLog 27 Feb 2007 23:07:34 -0000 1.844 +++ ChangeLog 28 Feb 2007 06:27:59 -0000 1.845 @@ -1,3 +1,11 @@ +2007-02-28 Brian Warner + + * buildbot/changes/p4poller.py (P4Source): apply change from Scott + Lamb to use a more optimal form of 'p4 changes', to reduce server + load. He reports that this optimization was added to p4d release + 2005.2, but it should work in all versions. Closes #27. + * buildbot/test/test_p4poller.py: match it + 2007-02-27 Brian Warner * buildbot/status/web/*.py: move all web status stuff into a