commit/galaxy-central: greg: Bug fix for setting tool shed repository metadata on repositories containing more than 1 tool.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/6e9fca39e3f4/ changeset: 6e9fca39e3f4 user: greg date: 2011-07-11 20:10:56 summary: Bug fix for setting tool shed repository metadata on repositories containing more than 1 tool. affected #: 1 file (106 bytes) --- a/lib/galaxy/webapps/community/controllers/common.py Mon Jul 11 13:45:57 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/common.py Mon Jul 11 14:10:56 2011 -0400 @@ -86,6 +86,7 @@ invalid_tool_configs = [] flush_needed = False if change_set is not None: + metadata_dict = {} for root, dirs, files in os.walk( repo_dir ): if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0: if '.hg' in dirs: @@ -139,13 +140,16 @@ if not flush_needed: flush_needed = True else: - metadata_dict = dict( tools = [ tool_dict ] ) - repository_metadata = trans.model.RepositoryMetadata( repository.id, repository.tip, metadata_dict ) - trans.sa_session.add( repository_metadata ) - if not flush_needed: - flush_needed = True + if 'tools' in metadata_dict: + metadata_dict[ 'tools' ].append( tool_dict ) + else: + metadata_dict[ 'tools' ] = [ tool_dict ] except Exception, e: invalid_tool_configs.append( ( name, str( e ) ) ) + repository_metadata = trans.model.RepositoryMetadata( repository.id, repository.tip, metadata_dict ) + trans.sa_session.add( repository_metadata ) + if not flush_needed: + flush_needed = True else: message = "Repository does not include changeset revision '%s'." % str( ctx_str ) status = 'error' 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