- pass newRepo tasks the tag name instead of tag ID

- display the tag name for newRepo tasks in the web UI
This commit is contained in:
Mike Bonnet 2008-07-01 11:07:48 -04:00
parent 6529645b2e
commit 20ee6af836
2 changed files with 7 additions and 4 deletions

View file

@ -1585,7 +1585,10 @@ def taskLabel(taskInfo):
if taskInfo.has_key('request'):
build = taskInfo['request'][1]
extra = buildLabel(build)
elif method in ('newRepo', 'tagBuild', 'tagNotification'):
elif method == 'newRepo':
if taskInfo.has_key('request'):
extra = str(taskInfo['request'][0])
elif method in ('tagBuild', 'tagNotification'):
# There is no displayable information included in the request
# for these methods
pass

View file

@ -274,7 +274,7 @@ class RepoManager(object):
tags = {}
for target in session.getBuildTargets():
tag_id = target['build_tag']
tags[tag_id] = 1
tags[tag_id] = target['build_tag_name']
#index repos by tag
tag_repos = {}
for repo in self.repos.values():
@ -316,8 +316,8 @@ class RepoManager(object):
if len(self.tasks) >= options.max_repo_tasks:
self.logger.info("Maximum number of repo tasks reached.")
break
task_id = session.newRepo(tag_id)
self.logger.info("Created newRepo task %s for tag %s" % (task_id, tag_id))
task_id = session.newRepo(tags[tag_id])
self.logger.info("Created newRepo task %s for tag %s (%s)" % (task_id, tag_id, tags[tag_id]))
self.tasks[tag_id] = task_id
#some cleanup
n_deletes = 0