Cleanup module loading order and reload() invocation to keep release configuration happy
authorPhilippe M. Chiasson <gozer@mozillamessaging.com>
Tue, 15 Sep 2009 09:55:30 -0400
changeset 1508 d2bd4a45320d2625290de02779d0044e20cde11a
parent 1507 b9393d53993d62a3fb0fdc02f3da2cd56c0cae94
child 1509 dede57d210e393feb19ee052ca1615454f46109a
push id1
push userroot
push dateWed, 17 Dec 2014 00:18:48 +0000
Cleanup module loading order and reload() invocation to keep release configuration happy
thunderbird/master.cfg
thunderbird/mozillabuild.py
thunderbird/mozillaleak.py
thunderbird/release_master.py
--- a/thunderbird/master.cfg
+++ b/thunderbird/master.cfg
@@ -24,97 +24,86 @@ reload(config)
 from config import *
 
 import os
 debug = os.environ.get('DEBUG')
 
 if debug:
     import sys
 
+c['builders'] = []
+c['schedulers'] = []
+c['change_source'] = []
+c['status'] = []
+
+####### Release Automation
+
+import release_master
+reload(release_master)
+
+c['builders'].extend(release_master.builders)
+c['schedulers'].extend(release_master.schedulers)
+c['change_source'].extend(release_master.change_source)
+c['status'].extend(release_master.status)
+
 from buildbot import locks
 from buildbot.process import factory
 from buildbot.scheduler import Scheduler, Nightly, Periodic, Triggerable, AnyBranchScheduler
 from buildbot.status.tinderbox import TinderboxMailNotifier
 from buildbot.status.words import IRC
 import buildbot.steps.source
-reload(buildbot.steps.source)
 from buildbot.steps.source import Mercurial
 from buildbot.steps import trigger
 from buildbot.steps.shell import Compile, ShellCommand, WithProperties, TreeSize
 
 import buildbotcustom.changes.hgpoller
 import buildbotcustom.steps.misc
 import buildbotcustom.steps.test
 import buildbotcustom.steps.transfer
 import buildbotcustom.steps.updates
 import buildbotcustom.status.tinderbox
-reload(buildbotcustom.changes.hgpoller)
-reload(buildbotcustom.steps.misc)
-reload(buildbotcustom.steps.test)
-reload(buildbotcustom.steps.transfer)
-reload(buildbotcustom.steps.updates)
-reload(buildbotcustom.status.tinderbox)
 
 from buildbotcustom.steps.test import AliveTest, CompareBloatLogs, \
   CompareLeakLogs, Codesighs
 from buildbotcustom.steps.misc import SetMozillaBuildProperties, GetHgRevision, MozillaClobberer
 from buildbotcustom.steps.transfer import MozillaStageUpload
 from buildbotcustom.steps.updates import CreateCompleteUpdateSnippet
 
 import buildbotcustom.process.factory
-reload(buildbotcustom.process.factory)
 from buildbotcustom.process.factory import CCUnittestBuildFactory, CCNightlyRepackFactory
 
 # l10n parallelization logic
 import buildbotcustom.log
 import buildbotcustom.l10n
-reload(buildbotcustom.log)
-reload(buildbotcustom.l10n)
 from buildbotcustom.l10n import NightlyL10n, Scheduler as SchedulerL10n
 
 import mozillaleak
 reload(mozillaleak)
 from mozillaleak import addLeakTestSteps
 
 import mozillabuild
 reload(mozillabuild)
 from mozillabuild import *
 
 # Keep track of our l10n pollers to eliminate dupes
 hg_all_locales_poller_map = {}
 
-c['schedulers'] = []
-c['builders'] = []
-c['status'] = []
-
 ####### L10n Scheduler with multiple dispatchers
 
 # for debugging purposes of the repack on locale change system
 buildbotcustom.log.init(
     scheduler = buildbotcustom.log.DEBUG,
     dispatcher = buildbotcustom.log.DEBUG
 )
 
 s = SchedulerL10n("l10n", "l10nbuilds.ini")
 c['schedulers'].append(s)
 
-####### Release Automation
-
-import release_master
-reload(release_master)
-
-c['builders'].extend(release_master.builders)
-c['schedulers'].extend(release_master.schedulers)
-c['change_source'].extend(release_master.change_source)
-c['status'].extend(release_master.status)
-
 ####### SOURCES
 
-c['change_source'] = []
-
 setupHGPollersFromBranches(DEFAULTS, BRANCHES, c['change_source'], 'comm-central')
 
 for name in BRANCHES.keys():
     # shorthand 
     branch = BRANCHES[name]
     build_factory = getConfig(DEFAULTS, branch, 'factory')
     master_branch = getConfig(DEFAULTS, branch, 'master_branch')
     mozilla_branch = getConfig(DEFAULTS, branch, 'mozilla_central_branch')
--- a/thunderbird/mozillabuild.py
+++ b/thunderbird/mozillabuild.py
@@ -1,13 +1,12 @@
 def getConfig(defaults, branch, value, default=None):
     return branch.get(value, defaults.get(value, default))
 
 import buildbotcustom.changes.hgpoller
-reload(buildbotcustom.changes.hgpoller)
 from buildbotcustom.changes.hgpoller import HgAllLocalesPoller, HgPoller
 
 def setupHGPollersFromBranches(defaults, branches, change_source, fixed_branch):
     # Figure out the unique pushlogs we should be polling
     
     sources = {}
     l10n = False 
     for name in branches.keys():
--- a/thunderbird/mozillaleak.py
+++ b/thunderbird/mozillaleak.py
@@ -1,20 +1,16 @@
 from buildbot.steps.shell import Compile, ShellCommand
 
 import os.path
 
 import buildbotcustom.steps.misc
 import buildbotcustom.steps.test
 import buildbotcustom.steps.transfer
 import buildbotcustom.steps.updates
-reload(buildbotcustom.steps.misc)
-reload(buildbotcustom.steps.test)
-reload(buildbotcustom.steps.transfer)
-reload(buildbotcustom.steps.updates)
 
 from buildbotcustom.steps.misc import SetMozillaBuildProperties
 from buildbotcustom.steps.test import AliveTest, CompareBloatLogs, \
   CompareLeakLogs, Codesighs, GraphServerPost
 from buildbotcustom.steps.transfer import MozillaStageUpload
 from buildbotcustom.steps.updates import CreateCompleteUpdateSnippet
 
 from buildbot.steps.shell import SetProperty
--- a/thunderbird/release_master.py
+++ b/thunderbird/release_master.py
@@ -1,13 +1,14 @@
 from buildbot.changes.pb import PBChangeSource
 from buildbot.scheduler import Scheduler, Dependent
 
 import buildbotcustom.l10n
 import buildbotcustom.misc
+reload(buildbotcustom.misc)
 import buildbotcustom.process.factory
 
 from buildbotcustom.l10n import DependentL10n
 from buildbotcustom.misc import get_l10n_repositories, isHgPollerTriggered
 from buildbotcustom.process.factory import StagingRepositorySetupFactory, \
   CCReleaseTaggingFactory, CCSourceFactory, CCReleaseBuildFactory, \
   ReleaseUpdatesFactory, UpdateVerifyFactory, ReleaseFinalVerification, \
   L10nVerifyFactory, CCReleaseRepackFactory