1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/bdb3436ff22f/ changeset: bdb3436ff22f user: greg date: 2011-07-21 19:03:04 summary: Remove tool shed repository files from disk that become untracked because they were removed from the repository within an exception block (only occurs in the tool shed test / production environments ). affected #: 2 files (1.6 KB) --- a/lib/galaxy/webapps/community/controllers/repository.py Thu Jul 21 12:46:27 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/repository.py Thu Jul 21 13:03:04 2011 -0400 @@ -459,6 +459,21 @@ relative_selected_file = selected_file.split( 'repo_%d' % repository.id )[1].lstrip( '/' ) repo.dirstate.remove( relative_selected_file ) repo.dirstate.write() + absolute_selected_file = os.path.abspath( selected_file ) + if os.path.isdir( absolute_selected_file ): + try: + os.rmdir( absolute_selected_file ) + except OSError, e: + # The directory is not empty + pass + elif os.path.isfile( absolute_selected_file ): + os.remove( absolute_selected_file ) + dir = os.path.split( absolute_selected_file )[0] + try: + os.rmdir( dir ) + except OSError, e: + # The directory is not empty + pass # Commit the change set. if not commit_message: commit_message = 'Deleted selected files' --- a/lib/galaxy/webapps/community/controllers/upload.py Thu Jul 21 12:46:27 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/upload.py Thu Jul 21 13:03:04 2011 -0400 @@ -191,6 +191,21 @@ relative_selected_file = selected_file.split( 'repo_%d' % repository.id )[1].lstrip( '/' ) repo.dirstate.remove( relative_selected_file ) repo.dirstate.write() + absolute_selected_file = os.path.abspath( selected_file ) + if os.path.isdir( absolute_selected_file ): + try: + os.rmdir( absolute_selected_file ) + except OSError, e: + # The directory is not empty + pass + elif os.path.isfile( absolute_selected_file ): + os.remove( absolute_selected_file ) + dir = os.path.split( absolute_selected_file )[0] + try: + os.rmdir( dir ) + except OSError, e: + # The directory is not empty + pass for filename_in_archive in filenames_in_archive: commands.add( repo.ui, repo, filename_in_archive ) if filename_in_archive.endswith( '.loc.sample' ): 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.