1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/9c06caa86e2a/ Changeset: 9c06caa86e2a User: greg Date: 2013-05-17 13:30:53 Summary: Fixes for committing to a tool shed repository - bug introduced when the tool shed uplaod controller was refactored. Affected #: 2 files diff -r c499e581b0f603528b66df0efe7e0e656a8e16f9 -r 9c06caa86e2ac73f439e9b148fb200e036a06ea2 lib/galaxy/webapps/tool_shed/controllers/upload.py --- a/lib/galaxy/webapps/tool_shed/controllers/upload.py +++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py @@ -23,10 +23,6 @@ log = logging.getLogger( __name__ ) -undesirable_dirs = [ '.hg', '.svn', '.git', '.cvs' ] -undesirable_files = [ '.hg_archival.txt', 'hgrc', '.DS_Store' ] -CHUNK_SIZE = 2**20 # 1Mb - class UploadController( BaseUIController ): @@ -258,10 +254,10 @@ for root, dirs, files in os.walk( uploaded_directory ): for uploaded_file in files: relative_path = os.path.normpath( os.path.join( os.path.relpath( root, uploaded_directory ), uploaded_file ) ) - ok = os.path.basename( uploaded_file ) not in undesirable_files + ok = os.path.basename( uploaded_file ) not in commit_util.UNDESIRABLE_FILES if ok: for file_path_item in relative_path.split( '/' ): - if file_path_item in undesirable_dirs: + if file_path_item in COMMIT_UTIL.UNDESIRABLE_DIRS: undesirable_dirs_removed += 1 ok = False break @@ -300,10 +296,10 @@ full_path = os.path.abspath( repo_dir ) filenames_in_archive = [] for tarinfo_obj in tar.getmembers(): - ok = os.path.basename( tarinfo_obj.name ) not in undesirable_files + ok = os.path.basename( tarinfo_obj.name ) not in commit_util.UNDESIRABLE_FILES if ok: for file_path_item in tarinfo_obj.name.split( '/' ): - if file_path_item in undesirable_dirs: + if file_path_item in commit_util.UNDESIRABLE_DIRS: undesirable_dirs_removed += 1 ok = False break diff -r c499e581b0f603528b66df0efe7e0e656a8e16f9 -r 9c06caa86e2ac73f439e9b148fb200e036a06ea2 lib/tool_shed/util/commit_util.py --- a/lib/tool_shed/util/commit_util.py +++ b/lib/tool_shed/util/commit_util.py @@ -16,6 +16,10 @@ log = logging.getLogger( __name__ ) +UNDESIRABLE_DIRS = [ '.hg', '.svn', '.git', '.cvs' ] +UNDESIRABLE_FILES = [ '.hg_archival.txt', 'hgrc', '.DS_Store' ] +CHUNK_SIZE = 2**20 # 1Mb + def check_archive( archive ): for member in archive.getmembers(): # Allow regular files and directories only @@ -113,11 +117,11 @@ # We have a repository that is not new (it contains files), so discover those files that are in the repository, but not in the uploaded archive. for root, dirs, files in os.walk( full_path ): if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0: - for undesirable_dir in undesirable_dirs: + for undesirable_dir in UNDESIRABLE_DIRS: if undesirable_dir in dirs: dirs.remove( undesirable_dir ) undesirable_dirs_removed += 1 - for undesirable_file in undesirable_files: + for undesirable_file in UNDESIRABLE_FILES: if undesirable_file in files: files.remove( undesirable_file ) undesirable_files_removed += 1 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.