def testSimple(self): contents = """\ af abc123 zh-TW blah""" expected = { 'l10n/af': { 'revision': 'abc123', 'relbranchOverride': None, 'bumpFiles': [], }, 'l10n/zh-TW': { 'revision': 'blah', 'relbranchOverride': None, 'bumpFiles': [], } } got = getL10nRepositories(contents, 'l10n') self.assertEquals(got, expected)
options, args = parser.parse_args() retry(mercurial, args=(options.buildbot_configs, 'buildbot-configs')) update('buildbot-configs', revision=options.release_tag) config = validate(options, args) configDir = path.dirname(options.configfile) # We generate this upfront to ensure that it's consistent throughout all # repositories that use it. However, in cases where a relbranch is provided # for all repositories, it will not be used generatedRelbranch = generateRelbranchName(config['milestone']) if config.get('relbranchPrefix'): generatedRelbranch = generateRelbranchName( config['milestone'], prefix=config['relbranchPrefix']) tags = getTags(config['baseTag'], config['buildNumber']) l10nRepos = getL10nRepositories(path.join('buildbot-configs', configDir, config['l10nRevisionFile']), config['l10nRepoPath']) for repo in config['sourceRepositories'].values(): relbranch = repo['relbranch'] or generatedRelbranch tagRepo(config, repo['path'], repo['name'], repo['revision'], tags, repo['bumpFiles'], relbranch, options.attempts) failed = [] for l in sorted(l10nRepos): info = l10nRepos[l] relbranch = config['l10nRelbranch'] or generatedRelbranch try: tagRepo(config, l, path.basename(l), info['revision'], tags, info['bumpFiles'], relbranch, options.attempts) # If en-US tags successfully we'll do our best to tag all of the l10n # repos, even if some have errors
mercurial(options.buildbot_configs, 'buildbot-configs') update('buildbot-configs', revision=options.release_tag) config = validate(options, args) configDir = path.dirname(options.configfile) # We generate this upfront to ensure that it's consistent throughout all # repositories that use it. However, in cases where a relbranch is provided # for all repositories, it will not be used generatedRelbranch = generateRelbranchName(config['version']) if config.get('relbranchPrefix'): generatedRelbranch = generateRelbranchName( config['version'], prefix=config['relbranchPrefix']) tags = getTags(config['baseTag'], config['buildNumber']) l10nRevisionFile = path.join('buildbot-configs', configDir, config['l10nRevisionFile']) l10nRepos = getL10nRepositories( open(l10nRevisionFile).read(), config['l10nRepoPath']) if options.tag_source: for repo in config['sourceRepositories'].values(): relbranch = repo['relbranch'] or generatedRelbranch tagRepo(config, repo['path'], repo['name'], repo['revision'], tags, repo['bumpFiles'], relbranch, options.attempts) failed = [] if options.tag_l10n: for l in sorted(l10nRepos): info = l10nRepos[l] relbranch = config['l10nRelbranch'] or generatedRelbranch try: tagRepo(config, l, path.basename(l), info['revision'], tags, info['bumpFiles'], relbranch, options.attempts)
mercurial(options.buildbot_configs, 'buildbot-configs') update('buildbot-configs', revision=options.release_tag) config = validate(options, args) configDir = path.dirname(options.configfile) # We generate this upfront to ensure that it's consistent throughout all # repositories that use it. However, in cases where a relbranch is provided # for all repositories, it will not be used generatedRelbranch = generateRelbranchName(config['version']) if config.get('relbranchPrefix'): generatedRelbranch = generateRelbranchName( config['version'], prefix=config['relbranchPrefix']) tags = getTags(config['baseTag'], config['buildNumber']) l10nRevisionFile = path.join( 'buildbot-configs', configDir, config['l10nRevisionFile']) l10nRepos = getL10nRepositories( open(l10nRevisionFile).read(), config['l10nRepoPath']) if options.tag_source: for repo in config['sourceRepositories'].values(): relbranch = repo['relbranch'] or generatedRelbranch tagRepo(config, repo['path'], repo['name'], repo['revision'], tags, repo['bumpFiles'], relbranch, options.attempts) failed = [] if options.tag_l10n: for l in sorted(l10nRepos): info = l10nRepos[l] relbranch = config['l10nRelbranch'] or generatedRelbranch try: tagRepo(config, l, path.basename(l), info['revision'], tags, info['bumpFiles'], relbranch, options.attempts)