'Reset all metadata on a single tool shed repository installed into a Galaxy instance.'

def reset_all_metadata_on_installed_repository(self):

    if self.relative_install_dir:
        original_metadata_dict = self.repository.metadata
        self.generate_metadata_for_changeset_revision()
        if (self.metadata_dict != original_metadata_dict):
            self.repository.metadata = self.metadata_dict
            self.update_in_shed_tool_config()
            self.app.install_model.context.add(self.repository)
            self.app.install_model.context.flush()
            self.app.tool_shed_repository_cache.rebuild()
            log.debug(('Metadata    has    been    reset    on    repository    %s.' % self.repository.name))
        else:
            log.debug(('Metadata    did    not    need    to    be    reset    on    repository    %s.' % self.repository.name))
    else:
        log.debug(('Error    locating    installation    directory    for    repository    %s.' % self.repository.name))
