1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/513a95abb738/ changeset: 513a95abb738 user: greg date: 2012-08-01 17:16:23 summary: Fixes for cloning a repository from the command line when the tool shed database is using sqlite. Also, fix for changing the name of a repository in the tool shed when the same repository is simultaneously being cloned for the first time. affected #: 5 files diff -r fd21bfd6d2577090013e005f20e174b2a1d9f128 -r 513a95abb738cf024aedb1d086464ebf2d8962d0 lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -1127,7 +1127,11 @@ # back and forth between Galaxy (with panels ) and the workflow view (without panels ), having # the Galaxy panels displayed whenever in Galaxy. message += "The workflow requires the following tools that are not available in this Galaxy instance." - message += "You can likely install the required tools from one of the Galaxy tool sheds listed below.<br/><br/>" + message += "You can likely install the required tools from one of the Galaxy tool sheds listed below.<br/>" + for missing_tool_tup in missing_tool_tups: + missing_tool_id, missing_tool_name, missing_tool_version = missing_tool_tup + message += "<b>Tool name</b> %s, <b>id</b> %s, <b>version</b> %s<br/>" % ( missing_tool_name, missing_tool_id, missing_tool_version ) + message += "<br/>" for shed_name, shed_url in trans.app.tool_shed_registry.tool_sheds.items(): if shed_url.endswith( '/' ): shed_url = shed_url.rstrip( '/' ) diff -r fd21bfd6d2577090013e005f20e174b2a1d9f128 -r 513a95abb738cf024aedb1d086464ebf2d8962d0 lib/galaxy/webapps/community/config.py --- a/lib/galaxy/webapps/community/config.py +++ b/lib/galaxy/webapps/community/config.py @@ -31,8 +31,8 @@ os.umask( self.umask ) # can't get w/o set, so set it back self.gid = os.getgid() # if running under newgrp(1) we'll need to fix the group of data created on the cluster # Database related configuration - self.database = resolve_path( kwargs.get( "database_file", "database/universe.d" ), self.root ) - self.database_connection = kwargs.get( "database_connection", False ) + self.database = resolve_path( kwargs.get( "database_file", "database/community.sqlite" ), self.root ) + self.database_connection = kwargs.get( "database_connection", False ) self.database_engine_options = get_database_engine_options( kwargs ) self.database_create_tables = string_as_bool( kwargs.get( "database_create_tables", "True" ) ) # Where dataset files are stored diff -r fd21bfd6d2577090013e005f20e174b2a1d9f128 -r 513a95abb738cf024aedb1d086464ebf2d8962d0 lib/galaxy/webapps/community/controllers/repository.py --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -1484,7 +1484,7 @@ if long_description != repository.long_description: repository.long_description = long_description flush_needed = True - if repo_name != repository.name: + if repository.times_downloaded == 0 and repo_name != repository.name: message = self.__validate_repository_name( repo_name, user ) if message: error = True @@ -1492,10 +1492,12 @@ self.__change_hgweb_config_entry( trans, repository, repository.name, repo_name ) repository.name = repo_name flush_needed = True + elif repository.times_downloaded != 0 and repo_name != repository.name: + message = "Repository names cannot be changed if the repository has been cloned. " if flush_needed: trans.sa_session.add( repository ) trans.sa_session.flush() - message = "The repository information has been updated." + message += "The repository information has been updated." elif params.get( 'manage_categories_button', False ): flush_needed = False # Delete all currently existing categories. diff -r fd21bfd6d2577090013e005f20e174b2a1d9f128 -r 513a95abb738cf024aedb1d086464ebf2d8962d0 lib/galaxy/webapps/community/framework/middleware/hg.py --- a/lib/galaxy/webapps/community/framework/middleware/hg.py +++ b/lib/galaxy/webapps/community/framework/middleware/hg.py @@ -21,6 +21,11 @@ self.repository = None self.username = None self.action = None + # Determine the database url + if 'database_connection' in self.config: + self.db_url = self.config[ 'database_connection' ] + else: + self.db_url = "sqlite:///%s?isolation_level=IMMEDIATE" % self.config[ 'database_file' ] def __call__( self, environ, start_response ): cmd = self.__get_hg_command( **environ ) if cmd == 'changegroup': @@ -36,8 +41,7 @@ username = path_info_components[1] name = path_info_components[2] # Instantiate a database connection - db_url = self.config[ 'database_connection' ] - engine = create_engine( db_url ) + engine = create_engine( self.db_url ) connection = engine.connect() result_set = connection.execute( "select id from galaxy_user where username = '%s'" % username.lower() ) for row in result_set: @@ -95,8 +99,7 @@ return self.__authenticate( username, password ) def __authenticate( self, username, password ): # Instantiate a database connection - db_url = self.config[ 'database_connection' ] - engine = create_engine( db_url ) + engine = create_engine( self.db_url ) connection = engine.connect() result_set = connection.execute( "select email, password from galaxy_user where username = '%s'" % username.lower() ) for row in result_set: diff -r fd21bfd6d2577090013e005f20e174b2a1d9f128 -r 513a95abb738cf024aedb1d086464ebf2d8962d0 templates/webapps/community/repository/manage_repository.mako --- a/templates/webapps/community/repository/manage_repository.mako +++ b/templates/webapps/community/repository/manage_repository.mako @@ -140,9 +140,9 @@ <div class="form-row"><label>Name:</label> %if repository.times_downloaded > 0: - ${repo_name} + ${repository.name} %else: - <input name="repo_name" type="textfield" value="${repo_name}" size="40"/> + <input name="repo_name" type="textfield" value="${repository.name}" size="40"/> %endif <div class="toolParamHelp" style="clear: both;"> Repository names cannot be changed if the repository has been cloned. 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.