'Repair specified tool shed repositories.'

@web.expose
@web.require_admin
def repair_tool_shed_repositories(self, trans, repair_repository_manager, tool_shed_repositories, repo_info_dicts, **kwd):

    for (index, tool_shed_repository) in enumerate(tool_shed_repositories):
        repo_info_dict = repo_info_dicts[index]
        repair_repository_manager.repair_tool_shed_repository(tool_shed_repository, encoding_util.tool_shed_encode(repo_info_dict))
    tsr_ids_for_monitoring = [trans.security.encode_id(tsr.id) for tsr in tool_shed_repositories]
    return trans.response.send_redirect(web.url_for(controller='admin_toolshed', action='monitor_repository_installation', tool_shed_repository_ids=tsr_ids_for_monitoring))
