commit/galaxy-central: greg: Enable reversing the list of tool version ids for tool included in tool shed repositories installed into a local Galaxy instance.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/be81990d148a/ changeset: be81990d148a user: greg date: 2012-08-13 22:41:47 summary: Enable reversing the list of tool version ids for tool included in tool shed repositories installed into a local Galaxy instance. affected #: 2 files diff -r 0bd2cc07fdd896ca0bdbc6d23f7ac077218f007a -r be81990d148a81bc2896c3c543d2ff70ad9c3c67 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -3050,7 +3050,12 @@ tool_versions.append( self ) __descendants( app, self ) return tool_versions - def get_version_ids( self, app ): + def get_version_ids( self, app, reverse=False ): + if reverse: + version_ids = [] + for tool_version in self.get_versions( app ): + version_ids.insert( 0, tool_version.tool_id ) + return version_ids return [ tool_version.tool_id for tool_version in self.get_versions( app ) ] class ToolVersionAssociation( object ): diff -r 0bd2cc07fdd896ca0bdbc6d23f7ac077218f007a -r be81990d148a81bc2896c3c543d2ff70ad9c3c67 lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -499,7 +499,7 @@ return get_repository_file_contents( file_path ) def get_versions_of_tool( self, app, guid ): tool_version = get_tool_version( app, guid ) - return tool_version.get_version_ids( app ) + return tool_version.get_version_ids( app, reverse=True ) @web.expose @web.require_admin def initiate_repository_installation( self, trans, shed_repository_ids, encoded_kwd, reinstalling=False ): 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