2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b2c6618e150d/ Changeset: b2c6618e150d Branch: next-stable User: greg Date: 2013-10-22 20:48:53 Summary: Fix for getting the status from the tool shed for installed repositories. Affected #: 1 file diff -r 2f0053f5952e9b93ded01fcd24ed87783dedc698 -r b2c6618e150d6397e33ecd6ad4b046b580b35b83 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -2741,6 +2741,9 @@ changeset_revision = kwd.get( 'changeset_revision', None ) repository = suc.get_repository_by_name_and_owner( trans.app, name, owner ) if repository: + repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, + trans.security.encode_id( repository.id ), + changeset_revision ) repo_dir = repository.repo_path( trans.app ) repo = hg.repository( suc.get_configured_ui(), repo_dir ) tool_shed_status_dict = {} @@ -2751,21 +2754,24 @@ tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' else: next_installable_revision = suc.get_next_downloadable_changeset_revision( repository, repo, changeset_revision ) - if next_installable_revision: - tool_shed_status_dict[ 'latest_installable_revision' ] = 'False' + if repository_metadata is None: + if next_installable_revision: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' + else: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'False' else: - tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' + if next_installable_revision: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'False' + else: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' # Handle revision updates. if changeset_revision == repository.tip( trans.app ): tool_shed_status_dict[ 'revision_update' ] = 'False' else: - repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, - trans.security.encode_id( repository.id ), - changeset_revision ) - if repository_metadata: + if repository_metadata is None: + tool_shed_status_dict[ 'revision_update' ] = 'True' + else: tool_shed_status_dict[ 'revision_update' ] = 'False' - else: - tool_shed_status_dict[ 'revision_update' ] = 'True' # Handle revision upgrades. ordered_metadata_changeset_revisions = suc.get_ordered_metadata_changeset_revisions( repository, repo, downloadable=True ) num_metadata_revisions = len( ordered_metadata_changeset_revisions ) https://bitbucket.org/galaxy/galaxy-central/commits/556bf6487abc/ Changeset: 556bf6487abc User: greg Date: 2013-10-22 20:49:40 Summary: Merged from next-stable Affected #: 1 file diff -r 8bc80aa53e81d9362e08ead0a0307cd3af0dd8aa -r 556bf6487abc5a3383a399334d97e93e1a87cb54 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -2741,6 +2741,9 @@ changeset_revision = kwd.get( 'changeset_revision', None ) repository = suc.get_repository_by_name_and_owner( trans.app, name, owner ) if repository: + repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, + trans.security.encode_id( repository.id ), + changeset_revision ) repo_dir = repository.repo_path( trans.app ) repo = hg.repository( suc.get_configured_ui(), repo_dir ) tool_shed_status_dict = {} @@ -2751,21 +2754,24 @@ tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' else: next_installable_revision = suc.get_next_downloadable_changeset_revision( repository, repo, changeset_revision ) - if next_installable_revision: - tool_shed_status_dict[ 'latest_installable_revision' ] = 'False' + if repository_metadata is None: + if next_installable_revision: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' + else: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'False' else: - tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' + if next_installable_revision: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'False' + else: + tool_shed_status_dict[ 'latest_installable_revision' ] = 'True' # Handle revision updates. if changeset_revision == repository.tip( trans.app ): tool_shed_status_dict[ 'revision_update' ] = 'False' else: - repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, - trans.security.encode_id( repository.id ), - changeset_revision ) - if repository_metadata: + if repository_metadata is None: + tool_shed_status_dict[ 'revision_update' ] = 'True' + else: tool_shed_status_dict[ 'revision_update' ] = 'False' - else: - tool_shed_status_dict[ 'revision_update' ] = 'True' # Handle revision upgrades. ordered_metadata_changeset_revisions = suc.get_ordered_metadata_changeset_revisions( repository, repo, downloadable=True ) num_metadata_revisions = len( ordered_metadata_changeset_revisions ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.