commit/galaxy-central: greg: Eliminate resetting all repository metadata on a tool shed repostiory when its not necessary.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/4ff0dd2aa475/ changeset: 4ff0dd2aa475 user: greg date: 2012-04-30 20:42:39 summary: Eliminate resetting all repository metadata on a tool shed repostiory when its not necessary. affected #: 4 files diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/tool_shed/update_manager.py --- a/lib/galaxy/tool_shed/update_manager.py +++ b/lib/galaxy/tool_shed/update_manager.py @@ -34,7 +34,7 @@ log.info( 'Transfer job restarter shutting down...' ) def check_for_update( self, repository ): tool_shed_url = get_url_from_repository_tool_shed( self.app, repository ) - url = '%s/repository/check_for_updates?name=%s&owner=%s&changeset_revision=%s&webapp=update_manager' % \ + url = '%s/repository/check_for_updates?name=%s&owner=%s&changeset_revision=%s&webapp=update_manager&no_reset=true' % \ ( tool_shed_url, repository.name, repository.owner, repository.changeset_revision ) response = urllib2.urlopen( url ) text = response.read() diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -149,7 +149,7 @@ def browse_tool_shed( self, trans, **kwd ): tool_shed_url = kwd[ 'tool_shed_url' ] galaxy_url = url_for( '/', qualified=True ) - url = '%srepository/browse_valid_repositories?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url ) + url = '%srepository/browse_valid_repositories?galaxy_url=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, galaxy_url ) return trans.response.send_redirect( url ) @web.expose @web.require_admin @@ -167,7 +167,7 @@ # Send a request to the relevant tool shed to see if there are any updates. repository = get_repository( trans, kwd[ 'id' ] ) tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository ) - url = '%s/repository/check_for_updates?galaxy_url=%s&name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \ + url = '%s/repository/check_for_updates?galaxy_url=%s&name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \ ( tool_shed_url, url_for( '/', qualified=True ), repository.name, repository.owner, repository.changeset_revision ) return trans.response.send_redirect( url ) @web.expose @@ -218,14 +218,14 @@ def find_tools_in_tool_shed( self, trans, **kwd ): tool_shed_url = kwd[ 'tool_shed_url' ] galaxy_url = url_for( '/', qualified=True ) - url = '%srepository/find_tools?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url ) + url = '%srepository/find_tools?galaxy_url=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, galaxy_url ) return trans.response.send_redirect( url ) @web.expose @web.require_admin def find_workflows_in_tool_shed( self, trans, **kwd ): tool_shed_url = kwd[ 'tool_shed_url' ] galaxy_url = url_for( '/', qualified=True ) - url = '%srepository/find_workflows?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url ) + url = '%srepository/find_workflows?galaxy_url=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, galaxy_url ) return trans.response.send_redirect( url ) @web.expose @web.require_admin @@ -318,7 +318,7 @@ shed_tool_conf=shed_tool_conf ) if 'tools' in metadata_dict: # Get the tool_versions from the tool shed for each tool in the installed change set. - url = '%srepository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \ + url = '%srepository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \ ( tool_shed_url, name, owner, changeset_revision ) response = urllib2.urlopen( url ) text = response.read() @@ -367,7 +367,7 @@ repo_info_tuple = decoded_repo_info_dict[ name ] description, repository_clone_url, changeset_revision, ctx_rev = repo_info_tuple owner = get_repository_owner( clean_repository_clone_url( repository_clone_url ) ) - url = '%srepository/get_readme?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % ( tool_shed_url, name, owner, changeset_revision ) + url = '%srepository/get_readme?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, name, owner, changeset_revision ) response = urllib2.urlopen( url ) raw_text = response.read() response.close() @@ -564,7 +564,7 @@ # Get the tool_versions from the tool shed for each tool in the installed change set. repository = get_repository( trans, kwd[ 'id' ] ) tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository ) - url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \ + url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \ ( tool_shed_url, repository.name, repository.owner, repository.changeset_revision ) response = urllib2.urlopen( url ) text = response.read() diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -1145,7 +1145,7 @@ import_button = True if tool_shed_url and not import_button: # Use urllib (send another request to the tool shed) to retrieve the workflow. - workflow_url = '%s/workflow/import_workflow?repository_metadata_id=%s&workflow_name=%s&webapp=%s&open_for_url=true' % \ + workflow_url = '%s/workflow/import_workflow?repository_metadata_id=%s&workflow_name=%s&webapp=%s&open_for_url=true&no_reset=true' % \ ( tool_shed_url, repository_metadata_id, tool_shed_encode( workflow_name ), webapp ) response = urllib2.urlopen( workflow_url ) workflow_text = response.read() diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/webapps/community/controllers/hg.py --- a/lib/galaxy/webapps/community/controllers/hg.py +++ b/lib/galaxy/webapps/community/controllers/hg.py @@ -16,8 +16,10 @@ # hg clone http://test@127.0.0.1:9009/repos/test/convert_characters1 cmd = kwd.get( 'cmd', None ) wsgi_app = wsgiapplication( make_web_app ) - if cmd == 'listkeys': - # This results from an "hg push" from the command line. When doing this, the following 7 commands, in order, + # Hack: Add a parameter to requests for which we do not want all repository metadata reset. + reset_metadata = not ( kwd.get( 'no_reset', False ) ) + if cmd == 'listkeys' and reset_metadata: + # This possibly results from an "hg push" from the command line. When doing this, the following 7 commands, in order, # will be retrieved from environ: between -> capabilities -> heads -> branchmap -> unbundle -> unbundle -> listkeys path_info = kwd.get( 'path_info', None ) if path_info: 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)
-
Bitbucket