<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[154410] contrib/buildbot-test/master.cfg</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/154410">154410</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2016-10-29 02:29:10 +0200 (Sat, 29 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>buildbot: Attempt to standardize formatting

Mostly taken from PEP 8 (https://www.python.org/dev/peps/pep-0008), with
some additional arbitrary choices to impose some consistency.

- Use typical Python whitespacing
  (https://www.python.org/dev/peps/pep-0008/#id26).

- Avoid multiline collections where feasible. Otherwise, put the closing
  brace/bracket on its own line, aligned with the last element. (This
  looks more like typical Python indenting and less like C or JSON.)

- When calls span multiple lines, place the closing parenthesis at the
  end of the final line.

- Remove unnecessary parentheses.

- Prefer hanging indents, especially for calls with many arguments.

- Indent continuation lines and hanging indents one level when possible.

- Sundry tweaks to comments.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#contribbuildbottestmastercfg">contrib/buildbot-test/master.cfg</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="contribbuildbottestmastercfg"></a>
<div class="modfile"><h4>Modified: contrib/buildbot-test/master.cfg (154409 => 154410)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/buildbot-test/master.cfg 2016-10-28 23:04:18 UTC (rev 154409)
+++ contrib/buildbot-test/master.cfg    2016-10-29 00:29:10 UTC (rev 154410)
</span><span class="lines">@@ -2,10 +2,15 @@
</span><span class="cx"> # ex: set syntax=python:
</span><span class="cx"> # vim:ft=python
</span><span class="cx"> 
</span><ins>+# This is a buildmaster config file. It must be installed as
+# 'master.cfg' in your buildmaster's base directory.
+
</ins><span class="cx"> import json
</span><span class="cx"> import os
</span><span class="cx"> import re
</span><span class="cx"> 
</span><ins>+####### HELPER FUNCTIONS #######
+
</ins><span class="cx"> def _path(name):
</span><span class="cx">     return os.path.join(os.path.dirname(__file__), name)
</span><span class="cx"> 
</span><span class="lines">@@ -15,8 +20,6 @@
</span><span class="cx">         res.update(d)
</span><span class="cx">     return res
</span><span class="cx"> 
</span><del>-# This is a buildmaster config file. It must be installed as
-# 'master.cfg' in your buildmaster's base directory.
</del><span class="cx"> 
</span><span class="cx"> # This is the dictionary that the buildmaster pays attention to. We also use
</span><span class="cx"> # a shorter alias to save typing.
</span><span class="lines">@@ -27,19 +30,19 @@
</span><span class="cx"> # it has to be)
</span><span class="cx"> 
</span><span class="cx"> config = {
</span><del>-    'production':   False,
-    'privkey':      '',
-    'slaveport':    9989,
-    'httpport':     8010,
-    'buildboturl':  'http://localhost:8010/',
</del><ins>+    'production': False,
+    'privkey': '',
+    'slaveport': 9989,
+    'httpport': 8010,
+    'buildboturl': 'http://localhost:8010/',
</ins><span class="cx">     'htpasswdfile': 'htpasswd',
</span><del>-    'mpbbsvnurl':   'https://svn.macports.org/repository/macports/contrib/mp-buildbot',
-    'svnurl':       'https://svn.macports.org/repository/macports/trunk',
-    'archivesite':  'https://packages.macports.org',
-    'slaveprefix':  '/opt/local',
-    'toolsprefix':  '/opt/mports',
</del><ins>+    'mpbbsvnurl': 'https://svn.macports.org/repository/macports/contrib/mp-buildbot',
+    'svnurl': 'https://svn.macports.org/repository/macports/trunk',
+    'archivesite': 'https://packages.macports.org',
+    'slaveprefix': '/opt/local',
+    'toolsprefix': '/opt/mports',
</ins><span class="cx">     'deploy': {}
</span><del>-}
</del><ins>+    }
</ins><span class="cx"> 
</span><span class="cx"> if os.path.exists(_path('config.json')):
</span><span class="cx">     with open(_path('config.json')) as f:
</span><span class="lines">@@ -46,18 +49,17 @@
</span><span class="cx">         configdata = json.load(f)
</span><span class="cx">     config.update(configdata)
</span><span class="cx"> 
</span><del>-path_base  = '/usr/bin:/bin:/usr/sbin:/sbin'
</del><ins>+path_base = '/usr/bin:/bin:/usr/sbin:/sbin'
</ins><span class="cx"> path_ports = os.path.join(config['toolsprefix'], 'bin') + ':' + path_base
</span><span class="cx"> path_docs = path_ports
</span><span class="cx"> 
</span><span class="cx"> # Allow spaces and tabs in property values
</span><span class="cx"> import re
</span><del>-c['validation'] = {
-    'property_value': re.compile(r'^[ \t\w./~:-]*$')
-}
</del><ins>+c['validation'] = {'property_value': re.compile(r'^[ \t\w./~:-]*$')}
</ins><span class="cx"> 
</span><del>-####### BUILDSLAVES
</del><span class="cx"> 
</span><ins>+####### BUILDSLAVES #######
+
</ins><span class="cx"> # The 'slaves' list defines the set of recognized buildslaves. Each element is
</span><span class="cx"> # a BuildSlave object, specifying a unique slave name and password.  The same
</span><span class="cx"> # slave name and password must be configured on the slave.
</span><span class="lines">@@ -75,14 +77,14 @@
</span><span class="cx"> for slave, pwd in slavedata['slaves'].items():
</span><span class="cx">     c['slaves'].append(BuildSlave(slave, pwd))
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> # 'slavePortnum' defines the TCP port to listen on for connections from slaves.
</span><span class="cx"> # This must match the value configured into the buildslaves (with their
</span><span class="cx"> # --master option)
</span><span class="cx"> c['slavePortnum'] = config['slaveport']
</span><span class="cx"> 
</span><del>-####### CHANGESOURCES
</del><span class="cx"> 
</span><ins>+####### CHANGESOURCES #######
+
</ins><span class="cx"> # the 'change_source' setting tells the buildmaster how it should find out
</span><span class="cx"> # about source code changes.
</span><span class="cx"> 
</span><span class="lines">@@ -98,14 +100,14 @@
</span><span class="cx"> #    c['change_source'] = PBChangeSource(user=sourcedata[0], passwd=sourcedata[1], port=sourcedata[2])
</span><span class="cx"> else:
</span><span class="cx">     from buildbot.changes.svnpoller import SVNPoller
</span><del>-    c['change_source'] = (SVNPoller(
</del><ins>+    c['change_source'] = SVNPoller(
</ins><span class="cx">         svnurl='https://svn.macports.org/repository/macports/trunk',
</span><span class="cx">         #svnbin='/opt/local/bin/svn',
</span><span class="cx">         pollinterval=300,
</span><span class="cx">         category='macports',
</span><del>-        project='ports'))
</del><ins>+        project='ports')
</ins><span class="cx"> 
</span><del>-####### SCHEDULERS
</del><ins>+####### SCHEDULERS #######
</ins><span class="cx"> 
</span><span class="cx"> def change_has_ports(change):
</span><span class="cx">     for f in change.files:
</span><span class="lines">@@ -155,12 +157,12 @@
</span><span class="cx">     SingleBranchScheduler(
</span><span class="cx">         name='base',
</span><span class="cx">         treeStableTimer=None,
</span><del>-        change_filter = basefilter,
</del><ins>+        change_filter=basefilter,
</ins><span class="cx">         builderNames=base_buildernames),
</span><span class="cx">     SingleBranchScheduler(
</span><span class="cx">         name='ports',
</span><span class="cx">         treeStableTimer=None,
</span><del>-        change_filter = portsfilter,
</del><ins>+        change_filter=portsfilter,
</ins><span class="cx">         builderNames=portwatcher_buildernames),
</span><span class="cx">     ForceScheduler(
</span><span class="cx">         name='base_force',
</span><span class="lines">@@ -182,8 +184,7 @@
</span><span class="cx">             label='Port list:',
</span><span class="cx">             default='',
</span><span class="cx">             size=30,
</span><del>-            required=True)
-        ])
</del><ins>+            required=True)])
</ins><span class="cx">     ]
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -190,32 +191,36 @@
</span><span class="cx"> if 'www' in config['deploy']:
</span><span class="cx">     c['schedulers'] += [
</span><span class="cx">         SingleBranchScheduler(
</span><del>-                name='www',
-                treeStableTimer=300,
-                change_filter = wwwfilter,
-                builderNames=['docs-www']),
</del><ins>+            name='www',
+            treeStableTimer=300,
+            change_filter=wwwfilter,
+            builderNames=['docs-www']),
</ins><span class="cx">         ForceScheduler(
</span><span class="cx">             name='www_force',
</span><del>-            builderNames=['docs-www'])]
</del><ins>+            builderNames=['docs-www'])
+        ]
</ins><span class="cx"> 
</span><span class="cx"> if 'guide' in config['deploy']:
</span><span class="cx">     c['schedulers'] += [
</span><span class="cx">         SingleBranchScheduler(
</span><del>-                name='guide',
-                treeStableTimer=300,
-                change_filter = guidefilter,
-                builderNames=['docs-guide']),
</del><ins>+            name='guide',
+            treeStableTimer=300,
+            change_filter=guidefilter,
+            builderNames=['docs-guide']),
</ins><span class="cx">         ForceScheduler(
</span><span class="cx">             name='guide_force',
</span><del>-            builderNames=['docs-www'])]
</del><ins>+            builderNames=['docs-www'])
+        ]
</ins><span class="cx"> 
</span><span class="cx"> for i in range(len(portbuilder_buildernames)):
</span><del>-    c['schedulers'].append(Triggerable(
-        name=portbuilder_triggerables[i],
-        builderNames=[portbuilder_buildernames[i]]))
</del><ins>+    c['schedulers'].append(
+        Triggerable(
+            name=portbuilder_triggerables[i],
+            builderNames=[portbuilder_buildernames[i]]))
</ins><span class="cx"> 
</span><del>-####### BUILDERS
</del><span class="cx"> 
</span><ins>+####### BUILDERS #######
+
</ins><span class="cx"> # WARNING: mergeRequests has to be False or Triggerable builds will not be scheduled correctly!
</span><span class="cx"> c['mergeRequests'] = False
</span><span class="cx"> 
</span><span class="lines">@@ -287,20 +292,19 @@
</span><span class="cx">             # let ShellCommand describe
</span><span class="cx">             return ShellCommand.getText(self, cmd, results)
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> # can't run with prefix inside the workdir in production,
</span><span class="cx"> # because archives must be built with prefix=/opt/local
</span><span class="cx"> if config['production']:
</span><del>-    prefix='/opt/local'
-    dlhost='packages@packages-origin.macports.org'
-    dlpath='/var/www/html/packages'
</del><ins>+    prefix = '/opt/local'
+    dlhost = 'packages@packages-origin.macports.org'
+    dlpath = '/var/www/html/packages'
</ins><span class="cx"> else:
</span><del>-    prefix=config['slaveprefix']
-    dlhost=''
-    dlpath='./deployed_archives'
</del><ins>+    prefix = config['slaveprefix']
+    dlhost = ''
+    dlpath = './deployed_archives'
</ins><span class="cx"> 
</span><del>-ulpath='archive_staging'
-ulpath_unique=ulpath+'-%(buildername)s'
</del><ins>+ulpath = 'archive_staging'
+ulpath_unique = ulpath+'-%(buildername)s'
</ins><span class="cx"> 
</span><span class="cx"> from buildbot.steps.transfer import FileDownload, DirectoryUpload
</span><span class="cx"> from buildbot.steps.master import MasterShellCommand
</span><span class="lines">@@ -426,11 +430,9 @@
</span><span class="cx">     name='install-port',
</span><span class="cx">     description=['installing', WithProperties('%(portname)s')],
</span><span class="cx">     descriptionDone=['install', WithProperties('%(portname)s')],
</span><del>-    logfiles={
-        'files':      os.path.join(logdir, 'port-contents.txt'),
-        'statistics': os.path.join(logdir, 'port-statistics.txt'),
-        'main.log':   os.path.join(logdir, 'main.log')
-    },
</del><ins>+    logfiles={'files': os.path.join(logdir, 'port-contents.txt'),
+              'statistics': os.path.join(logdir, 'port-statistics.txt'),
+              'main.log': os.path.join(logdir, 'main.log')},
</ins><span class="cx">     haltOnFailure=True))
</span><span class="cx"> 
</span><span class="cx"> portbuilder_factory.addStep(ShellCommand(
</span><span class="lines">@@ -448,13 +450,12 @@
</span><span class="cx"> # XXX: move deploy_archives.sh functionality to mp-buildbot
</span><span class="cx"> # sign generated binaries and sync to download server (if distributable)
</span><span class="cx"> if config['production']:
</span><del>-    portbuilder_factory.addStep(MasterShellCommand(command=['./deploy_archives.sh', WithProperties(ulpath_unique)],
-                                       name='deploy-archives',
-                                       description=['deploying', 'archives'],
-                                       descriptionDone=['deploy', 'archives'],
-                          env={'PRIVKEY': config['privkey'],
-                               'DLHOST': dlhost,
-                               'DLPATH': dlpath}))
</del><ins>+    portbuilder_factory.addStep(MasterShellCommand(
+        command=['./deploy_archives.sh', WithProperties(ulpath_unique)],
+        name='deploy-archives',
+        description=['deploying', 'archives'],
+        descriptionDone=['deploy', 'archives'],
+        env={'PRIVKEY': config['privkey'], 'DLHOST': dlhost, 'DLPATH': dlpath}))
</ins><span class="cx"> 
</span><span class="cx"> # TODO: do we want to upload the individual logs so maintainers can review them?
</span><span class="cx"> portbuilder_factory.addStep(ShellCommand(
</span><span class="lines">@@ -464,27 +465,29 @@
</span><span class="cx">     descriptionDone=['clean'],
</span><span class="cx">     alwaysRun=True))
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> def make_rsync_deploy_steps(host, user, sshkeyfile, sshknownhostsfile, srcpath, destpath):
</span><span class="cx">     return [
</span><del>-        FileDownload(name='ssh key',
-                     description='transferring',
-                     descriptionDone='transfer',
-                     mastersrc=sshkeyfile,
-                     slavedest='ssh_key',
-                     mode=0600),
-        FileDownload(name='ssh known_hosts',
-                     description='transferring',
-                     descriptionDone='transfer',
-                     mastersrc=sshknownhostsfile,
-                     slavedest='ssh_known_hosts',
-                     mode=0600),
-        ShellCommand(name='rsync',
-                     description='deploying',
-                     descriptionDone='deploy',
-                     command='rsync -avzhC --delay-updates --delete-delay %s/ %s@%s:%s/' % (srcpath, user, host, destpath),
-                     env={'RSYNC_RSH': 'ssh -i ssh_key -oUserKnownHostsFile=ssh_known_hosts'})
-    ]
</del><ins>+        FileDownload(
+            name='ssh key',
+            description='transferring',
+            descriptionDone='transfer',
+            mastersrc=sshkeyfile,
+            slavedest='ssh_key',
+            mode=0600),
+        FileDownload(
+            name='ssh known_hosts',
+            description='transferring',
+            descriptionDone='transfer',
+            mastersrc=sshknownhostsfile,
+            slavedest='ssh_known_hosts',
+            mode=0600),
+        ShellCommand(
+            name='rsync',
+            description='deploying',
+            descriptionDone='deploy',
+            command='rsync -avzhC --delay-updates --delete-delay %s/ %s@%s:%s/' % (srcpath, user, host, destpath),
+            env={'RSYNC_RSH': 'ssh -i ssh_key -oUserKnownHostsFile=ssh_known_hosts'})
+        ]
</ins><span class="cx"> 
</span><span class="cx"> if 'www' in config['deploy']:
</span><span class="cx">     docs_www_factory = BuildFactory()
</span><span class="lines">@@ -532,7 +535,7 @@
</span><span class="cx">             destpath=config['deploy']['guide']['destpath']))
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-# === BUILDER CONFIGURATION ===
</del><ins>+####### BUILDER CONFIGURATION #######
</ins><span class="cx"> 
</span><span class="cx"> from buildbot.config import BuilderConfig
</span><span class="cx"> 
</span><span class="lines">@@ -548,9 +551,9 @@
</span><span class="cx">     'BUILDBOT_BUILDERNAME': WithProperties('%(buildername)s'),
</span><span class="cx">     'BUILDBOT_BUILDNUMBER': WithProperties('%(buildnumber)s'),
</span><span class="cx">     'BUILDBOT_BUILDURL': make_build_url
</span><del>-}
</del><ins>+    }
</ins><span class="cx"> 
</span><del>-c['builders']=[]
</del><ins>+c['builders'] = []
</ins><span class="cx"> extract_os = re.compile(r'10\.\d+')
</span><span class="cx"> for plat in build_platforms:
</span><span class="cx">     os_match = extract_os.search(plat)
</span><span class="lines">@@ -562,7 +565,8 @@
</span><span class="cx">                 slavenames=['base-' + plat],
</span><span class="cx">                 factory=base_factory,
</span><span class="cx">                 tags=['base', os_version],
</span><del>-                env=merge_dicts(env_buildinfo, {'PATH': path_base}))]
</del><ins>+                env=merge_dicts(env_buildinfo, {'PATH': path_base}))
+            ]
</ins><span class="cx">     if 'linux' not in plat and '10.5_ppc' != plat:
</span><span class="cx">         c['builders'] += [
</span><span class="cx">             BuilderConfig(
</span><span class="lines">@@ -576,7 +580,8 @@
</span><span class="cx">                 slavenames=['ports-' + plat],
</span><span class="cx">                 factory=portbuilder_factory,
</span><span class="cx">                 tags=['portbuilder', os_version],
</span><del>-                env=merge_dicts(env_buildinfo, {'PATH': path_ports}))]
</del><ins>+                env=merge_dicts(env_buildinfo, {'PATH': path_ports}))
+            ]
</ins><span class="cx"> 
</span><span class="cx"> if 'www' in config['deploy']:
</span><span class="cx">     c['builders'].append(
</span><span class="lines">@@ -595,8 +600,9 @@
</span><span class="cx">             tags=['docs', 'guide'],
</span><span class="cx">             env=merge_dicts(env_buildinfo, {'PATH': path_ports})))
</span><span class="cx"> 
</span><del>-####### STATUS TARGETS
</del><span class="cx"> 
</span><ins>+####### STATUS TARGETS #######
+
</ins><span class="cx"> # 'status' is a list of Status Targets. The results of each build will be
</span><span class="cx"> # pushed to these targets. buildbot/status/*.py has a variety to choose from,
</span><span class="cx"> # including web pages, email senders, and IRC bots.
</span><span class="lines">@@ -610,16 +616,15 @@
</span><span class="cx"> 
</span><span class="cx"> htauth = HTPasswdAprAuth(config['htpasswdfile'])
</span><span class="cx"> 
</span><del>-authz_cfg=authz.Authz(
-    auth               = htauth,
-    gracefulShutdown   = 'auth',
-    forceBuild         = 'auth',
-    forceAllBuilds     = 'auth',
-    pingBuilder        = 'auth',
-    stopBuild          = 'auth',
-    stopAllBuilds      = 'auth',
-    cancelPendingBuild = 'auth',
-)
</del><ins>+authz_cfg = authz.Authz(
+    auth=htauth,
+    gracefulShutdown='auth',
+    forceBuild='auth',
+    forceAllBuilds='auth',
+    pingBuilder='auth',
+    stopBuild='auth',
+    stopAllBuilds='auth',
+    cancelPendingBuild='auth')
</ins><span class="cx"> 
</span><span class="cx"> from buildbot.status.mail import MailNotifier
</span><span class="cx"> from twisted.internet import defer
</span><span class="lines">@@ -681,8 +686,8 @@
</span><span class="cx">     # same as original, but calls portMessageFormatter with access to interested_users
</span><span class="cx">     def buildMessageDict(self, name, build, results):
</span><span class="cx">         self.interested_users.clear()
</span><del>-        msgdict = self.portMessageFormatter(self.mode, name, build, results,
-                                            self.master_status, self.interested_users)
</del><ins>+        msgdict = self.portMessageFormatter(
+            self.mode, name, build, results, self.master_status, self.interested_users)
</ins><span class="cx">         return msgdict
</span><span class="cx"> 
</span><span class="cx">     def useLookup(self, build):
</span><span class="lines">@@ -765,11 +770,7 @@
</span><span class="cx">             subject += ', '.join(sorted(failed_ports)[:10])
</span><span class="cx">             if len(failed_ports) > 10:
</span><span class="cx">                 subject +=  ', and {} more'.format(len(failed_ports) - 10)
</span><del>-    return {
-        'body'    : '\n'.join(text),
-        'type'    : 'plain',
-        'subject' : subject
-    }
</del><ins>+    return {'body': '\n'.join(text), 'type': 'plain', 'subject': subject}
</ins><span class="cx"> 
</span><span class="cx"> if config['production']:
</span><span class="cx">     # send mail about base failures to users on the blamelist
</span><span class="lines">@@ -809,7 +810,7 @@
</span><span class="cx">         sendToInterestedUsers=False)
</span><span class="cx">     c['status'].append(mn)
</span><span class="cx"> 
</span><del>-####### PROJECT IDENTITY
</del><ins>+####### PROJECT IDENTITY #######
</ins><span class="cx"> 
</span><span class="cx"> from buildbot.plugins import util
</span><span class="cx"> 
</span><span class="lines">@@ -824,24 +825,21 @@
</span><span class="cx"> c['status'].append(html.WebStatus(
</span><span class="cx">     http_port=config['httpport'],
</span><span class="cx">     authz=authz_cfg,
</span><del>-    changecommentlink=(r'#(\d+)', r'https://trac.macports.org/ticket/\1', r'Ticket \g<0>')
-))
</del><ins>+    changecommentlink=(r'#(\d+)', r'https://trac.macports.org/ticket/\1', r'Ticket \g<0>')))
</ins><span class="cx"> 
</span><span class="cx"> c['revlink'] = util.RevlinkMatch([r'https://svn.macports.org/repository/macports/(.*)'],
</span><span class="cx">                                   r'https://trac.macports.org/changeset/%s')
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-####### DB URL
</del><ins>+####### DATABASE #######
</ins><span class="cx"> 
</span><del>-c['db'] = {
-    # This specifies what database buildbot uses to store its state.  You can leave
-    # this at its default for all but the largest installations.
-    'db_url' : 'sqlite:///state.sqlite',
-}
</del><ins>+# This specifies what database buildbot uses to store its state. You can
+# leave this at its default for all but the largest installations.
+c['db'] = {'db_url': 'sqlite:///state.sqlite'}
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-######## Cache settings
-c['buildHorizon']   = 10000
-c['logHorizon']     =  5000
-c['eventHorizon']   =  2000
-c['buildCacheSize'] =   600
</del><ins>+####### DATA LIFETIME #######
+c['buildHorizon'] = 10000
+c['logHorizon'] = 5000
+c['eventHorizon'] = 2000
+c['buildCacheSize'] = 600
</ins></span></pre>
</div>
</div>

</body>
</html>