Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for tool_shed.repository_types.metadata

import logging

from mercurial import hg
from mercurial import ui

log = logging.getLogger( __name__ )


[docs]class Metadata( object ):
[docs] def __init__( self ): self.type = None
[docs] def get_changesets_for_setting_metadata( self, app, repository ): repo = hg.repository( ui.ui(), repository.repo_path( app ) ) return repo.changelog
[docs] def is_valid_for_type( self, app, repository, revisions_to_check=None ): raise Exception( "Unimplemented Method" )
[docs]class TipOnly( Metadata ):
[docs] def __init__( self ): self.type = None
[docs] def get_changesets_for_setting_metadata( self, app, repository ): repo = hg.repository( ui.ui(), repository.repo_path( app ) ) return [ repo.changelog.tip() ]