bhearsum%mozilla.com f74e509a9e 458785: get_l10n_repositories needs to support splitting locale/revision by any whitespace. r=ccooper, patch=me
git-svn-id: svn://10.0.0.236/trunk@254975 18797224-902f-48f8-a5cc-f745e15eee43
2008-11-10 14:31:19 +00:00

35 lines
1.2 KiB
Python

from urlparse import urljoin
# This file contains misc. helper function that don't make sense to put in
# other files. For example, functions that are called in a master.cfg
def get_l10n_repositories(file, l10nCentral, relbranch):
"""Reads in a list of locale names and revisions for their associated
repository from 'file'.
"""
repositories = {}
for localeLine in open(file).readlines():
locale, revision = localeLine.rstrip().split()
if revision == 'FIXME':
raise Exception('Found FIXME in %s for locale "%s"' % \
(file, locale))
locale = urljoin(l10nCentral, locale)
repositories[locale] = {
'revision': revision,
'relbranchOverride': relbranch,
'bumpFiles': []
}
return repositories
# This function is used as fileIsImportant parameter for Buildbots that do both
# dep/nightlies and release builds. Because they build the same "branch" this
# allows us to have the release builder ignore HgPoller triggered changse
# and the dep builders only obey HgPoller/Force Build triggered ones.
def isHgPollerTriggered(change, hgUrl):
if change.comments.find(hgUrl) > -1:
return True
return False