commit/galaxy-central: greg: Send changeset_revision to method that renders the Repository Actions pop-up menu in the tool shed to ensure the desired repository revision is used when choosing actions.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/6439459c265e/ Changeset: 6439459c265e User: greg Date: 2013-08-27 19:24:37 Summary: Send changeset_revision to method that renders the Repository Actions pop-up menu in the tool shed to ensure the desired repository revision is used when choosing actions. Affected #: 5 files diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 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 @@ -664,10 +664,12 @@ repo = hg.repository( suc.get_configured_ui(), repository.repo_path( trans.app ) ) # Update repository files for browsing. suc.update_repository( repo ) - metadata = self.get_metadata( trans, id, repository.tip( trans.app ) ) + changeset_revision = repository.tip( trans.app ) + metadata = self.get_metadata( trans, id, changeset_revision ) repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako', repository=repository, + changeset_revision=changeset_revision, metadata=metadata, commit_message=commit_message, repository_type_select_field=repository_type_select_field, @@ -1102,6 +1104,7 @@ repositories_archive_filename = os.path.basename( repositories_archive.name ) if error_message: message = error_message + status = 'error' else: trans.response.set_content_type( 'application/x-gzip' ) trans.response.headers[ "Content-Disposition" ] = 'attachment; filename="%s"' % ( repositories_archive_filename ) @@ -1109,9 +1112,7 @@ # Make sure the file is removed from disk after the contents have been downloaded. os.unlink( repositories_archive.name ) return opened_archive - repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, - trans.security.encode_id( repository.id ), - changeset_revision ) + repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision ) metadata = repository_metadata.metadata # Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend. repository_dependencies = \ @@ -1822,6 +1823,10 @@ return trans.fill_template( '/webapps/tool_shed/repository/help.mako', message=message, status=status, **kwd ) @web.expose + def import_capsule( self, trans, **kwd ): + pass + + @web.expose def index( self, trans, **kwd ): message = kwd.get( 'message', '' ) status = kwd.get( 'status', 'done' ) @@ -2449,9 +2454,11 @@ message = "Select at least 1 file to delete from the repository before clicking <b>Delete selected files</b>." status = "error" repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) + changeset_revision = repository.tip( trans.app ) return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako', repo=repo, repository=repository, + changeset_revision=changeset_revision, commit_message=commit_message, repository_type_select_field=repository_type_select_field, message=message, diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 lib/galaxy/webapps/tool_shed/controllers/upload.py --- a/lib/galaxy/webapps/tool_shed/controllers/upload.py +++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py @@ -241,6 +241,7 @@ selected_categories = [ trans.security.decode_id( id ) for id in category_ids ] return trans.fill_template( '/webapps/tool_shed/repository/upload.mako', repository=repository, + changeset_revision=tip, url=url, commit_message=commit_message, uncompress_file=uncompress_file, diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 templates/webapps/tool_shed/index.mako --- a/templates/webapps/tool_shed/index.mako +++ b/templates/webapps/tool_shed/index.mako @@ -147,6 +147,9 @@ <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='repository', action='create_repository' )}">Create new repository</a></div> + <div class="toolTitle"> + <a target="galaxy_main" href="${h.url_for( controller='repository', action='import_capsule' )}">Import repository capsule</a> + </div> %if can_review_repositories: <div class="toolSectionPad"></div><div class="toolSectionTitle"> diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 templates/webapps/tool_shed/repository/browse_repository.mako --- a/templates/webapps/tool_shed/repository/browse_repository.mako +++ b/templates/webapps/tool_shed/repository/browse_repository.mako @@ -31,7 +31,7 @@ can_browse_contents = not is_new %> -${render_tool_shed_repository_actions( repository )} +${render_tool_shed_repository_actions( repository, changeset_revision=changeset_revision )} %if message: ${render_msg( message, status )} diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 templates/webapps/tool_shed/repository/rate_repository.mako --- a/templates/webapps/tool_shed/repository/rate_repository.mako +++ b/templates/webapps/tool_shed/repository/rate_repository.mako @@ -33,7 +33,7 @@ ${render_msg( message, status )} %endif -${render_tool_shed_repository_actions( repository, repo=None, metadata=None, changeset_revision=None )} +${render_tool_shed_repository_actions( repository, metadata=None, changeset_revision=None )} %if repository.user != trans.user: <div class="toolForm"> 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.
participants (1)
-
commits-noreply@bitbucket.org