1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/33db1925e701/
changeset: 33db1925e701
user: greg
date: 2012-10-23 22:52:25
summary: Handle weak Python 2.5 unicode string handling in the tool shed.
affected #: 2 files
diff -r 70ae646e6892e7bb5a05500c99b4cfcc22495a37 -r 33db1925e701664785735160f3738dfde97fc2e6 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -50,7 +50,7 @@
break
if found:
break
- full_path = os.path.abspath( os.path.join( root, name ) )
+ full_path = str( os.path.abspath( os.path.join( root, name ) ) )
tool = self.toolbox.load_tool( full_path )
return generate_tool_guid( repository_clone_url, tool )
def get_proprietary_tool_panel_elems( self, latest_tool_migration_script_number ):
diff -r 70ae646e6892e7bb5a05500c99b4cfcc22495a37 -r 33db1925e701664785735160f3738dfde97fc2e6 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -685,7 +685,7 @@
metadata_dict[ 'readme' ] = relative_path_to_readme
# See if we have a tool config.
elif name not in NOT_TOOL_CONFIGS and name.endswith( '.xml' ):
- full_path = os.path.abspath( os.path.join( root, name ) )
+ full_path = str( os.path.abspath( os.path.join( root, name ) ) )
if os.path.getsize( full_path ) > 0:
if not ( check_binary( full_path ) or check_image( full_path ) or check_gzip( full_path )[ 0 ]
or check_bz2( full_path )[ 0 ] or check_zip( full_path ) ):
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/70ae646e6892/
changeset: 70ae646e6892
user: greg
date: 2012-10-23 22:20:05
summary: Eliminate the problematic Repository.ReviewedRevisions mapper from the tool shed model.
affected #: 3 files
diff -r d6ce5e2a1cdb8645f3490043b151f2b271f4b2b4 -r 70ae646e6892e7bb5a05500c99b4cfcc22495a37 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -156,11 +156,9 @@
def changeset_revision_reviewed_by_user( trans, user, repository, changeset_revision ):
"""Determine if the current changeset revision has been reviewed by the current user."""
changeset_revision_reviewed_by_user = False
- for reviewed_revision in repository.reviewed_revisions:
- if reviewed_revision.changeset_revision == changeset_revision:
- for review in repository.reviews:
- if review.changeset_revision == changeset_revision and review.user == user:
- return True
+ for review in repository.reviews:
+ if review.changeset_revision == changeset_revision and review.user == user:
+ return True
return False
def check_file_contents( trans ):
# See if any admin users have chosen to receive email alerts when a repository is updated.
@@ -505,13 +503,15 @@
def get_previous_repository_reviews( trans, repository, changeset_revision ):
"""Return an ordered dictionary of repository reviews up to and including the received changeset revision."""
repo = hg.repository( get_configured_ui(), repository.repo_path )
- reviewed_revision_hashes = [ reviewed_revisions.changeset_revision for reviewed_revisions in repository.reviewed_revisions ]
+ reviewed_revision_hashes = [ review.changeset_revision for review in repository.reviews ]
previous_reviews_dict = odict()
for changeset in reversed_upper_bounded_changelog( repo, changeset_revision ):
previous_changeset_revision = str( repo.changectx( changeset ) )
if previous_changeset_revision in reviewed_revision_hashes:
previous_rev, previous_changeset_revision_label = get_rev_label_from_changeset_revision( repo, previous_changeset_revision )
- revision_reviews = get_reviews_by_repository_id_changeset_revision( trans, trans.security.encode_id( repository.id ), previous_changeset_revision )
+ revision_reviews = get_reviews_by_repository_id_changeset_revision( trans,
+ trans.security.encode_id( repository.id ),
+ previous_changeset_revision )
previous_reviews_dict[ previous_changeset_revision ] = dict( changeset_revision_label=previous_changeset_revision_label,
reviews=revision_reviews )
return previous_reviews_dict
@@ -701,7 +701,7 @@
def has_previous_repository_reviews( trans, repository, changeset_revision ):
"""Determine if a repository has a changeset revision review prior to the received changeset revision."""
repo = hg.repository( get_configured_ui(), repository.repo_path )
- reviewed_revision_hashes = [ reviewed_revisions.changeset_revision for reviewed_revisions in repository.reviewed_revisions ]
+ reviewed_revision_hashes = [ review.changeset_revision for review in repository.reviews ]
for changeset in reversed_upper_bounded_changelog( repo, changeset_revision ):
previous_changeset_revision = str( repo.changectx( changeset ) )
if previous_changeset_revision in reviewed_revision_hashes:
diff -r d6ce5e2a1cdb8645f3490043b151f2b271f4b2b4 -r 70ae646e6892e7bb5a05500c99b4cfcc22495a37 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -1530,7 +1530,7 @@
if current_user:
# See if the current user owns any repositories that have been reviewed.
for repository in current_user.active_repositories:
- if repository.reviewed_revisions:
+ if repository.reviews:
has_reviewed_repositories = True
break
# See if the current user has any repositories that have been marked as deprecated.
diff -r d6ce5e2a1cdb8645f3490043b151f2b271f4b2b4 -r 70ae646e6892e7bb5a05500c99b4cfcc22495a37 lib/galaxy/webapps/community/model/mapping.py
--- a/lib/galaxy/webapps/community/model/mapping.py
+++ b/lib/galaxy/webapps/community/model/mapping.py
@@ -239,12 +239,7 @@
reviewers=relation( User,
secondary=RepositoryReview.table,
primaryjoin=( Repository.table.c.id == RepositoryReview.table.c.repository_id ),
- secondaryjoin=( RepositoryReview.table.c.user_id == User.table.c.id ) ),
- reviewed_revisions=relation( RepositoryMetadata,
- secondary=RepositoryReview.table,
- foreign_keys=[ RepositoryMetadata.table.c.repository_id, RepositoryMetadata.table.c.changeset_revision ],
- primaryjoin=( Repository.table.c.id == RepositoryMetadata.table.c.repository_id ),
- secondaryjoin=( ( RepositoryMetadata.table.c.repository_id == RepositoryReview.table.c.repository_id ) & ( RepositoryMetadata.table.c.changeset_revision == RepositoryReview.table.c.changeset_revision ) ) ) ) )
+ secondaryjoin=( RepositoryReview.table.c.user_id == User.table.c.id ) ) ) )
assign_mapper( context, RepositoryMetadata, RepositoryMetadata.table,
properties=dict( repository=relation( Repository ),
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/f23c2b0ef005/
changeset: f23c2b0ef005
user: greg
date: 2012-10-23 21:23:51
summary: Clarify the various url protocols that are supported by the tool shed repository upload component.
affected #: 1 file
diff -r bad5602cdf998dff9c2aecf478dc4ed1a797a023 -r f23c2b0ef005f1e44299d11fd8fbe5077fe850f0 templates/webapps/community/repository/upload.mako
--- a/templates/webapps/community/repository/upload.mako
+++ b/templates/webapps/community/repository/upload.mako
@@ -85,10 +85,10 @@
<input name="url" type="textfield" value="${url | h}" size="40"/></div><div class="toolParamHelp" style="clear: both;">
- Enter a URL to upload your files via http. URLs that point to mercurial repositories (URLs that start with hg:// or hgs://)
- are allowed. This mechanism results in the tip revision of an external mercurial repository being added to the tool shed
- repository as a single new changeset. The revision history of the originating external mercurial repository is not uploaded
- to the tool shed repository.
+ Enter a url to upload your files. In addition to http and ftp urls, urls that point to mercurial repositories (urls that start
+ with hg:// or hgs://) are allowed. This mechanism results in the tip revision of an external mercurial repository being added
+ to the tool shed repository as a single new changeset. The revision history of the originating external mercurial repository is
+ not uploaded to the tool shed repository.
</div><div style="clear: both"></div></div>
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/bad5602cdf99/
changeset: bad5602cdf99
user: greg
date: 2012-10-23 20:59:31
summary: Add help text to the tool shed repository upload form to advertise John Chilton's recent enhancement allowing for mercurial repository urls staring with hg:// or hgs://.
affected #: 2 files
diff -r 5ae989999225b9edf884de6dfe23a2e82f9de403 -r bad5602cdf998dff9c2aecf478dc4ed1a797a023 lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -48,13 +48,12 @@
message = 'No files were entered on the upload form.'
status = 'error'
uploaded_file = None
- elif url and url.startswith("hg"):
- # Use mercurial clone to fetch repository, contents will then
- # be copied over.
+ elif url and url.startswith( 'hg' ):
+ # Use mercurial clone to fetch repository, contents will then be copied over.
uploaded_directory = tempfile.mkdtemp()
- repo_url = "http%s" % url[len("hg"):]
- repo_url = repo_url.encode('ascii', 'replace')
- commands.clone(get_configured_ui(), repo_url, uploaded_directory)
+ repo_url = 'http%s' % url[ len( 'hg' ): ]
+ repo_url = repo_url.encode( 'ascii', 'replace' )
+ commands.clone( get_configured_ui(), repo_url, uploaded_directory )
elif url:
valid_url = True
try:
diff -r 5ae989999225b9edf884de6dfe23a2e82f9de403 -r bad5602cdf998dff9c2aecf478dc4ed1a797a023 templates/webapps/community/repository/upload.mako
--- a/templates/webapps/community/repository/upload.mako
+++ b/templates/webapps/community/repository/upload.mako
@@ -85,7 +85,10 @@
<input name="url" type="textfield" value="${url | h}" size="40"/></div><div class="toolParamHelp" style="clear: both;">
- Enter a URL to upload your files via http.
+ Enter a URL to upload your files via http. URLs that point to mercurial repositories (URLs that start with hg:// or hgs://)
+ are allowed. This mechanism results in the tip revision of an external mercurial repository being added to the tool shed
+ repository as a single new changeset. The revision history of the originating external mercurial repository is not uploaded
+ to the tool shed repository.
</div><div style="clear: both"></div></div>
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5ae989999225/
changeset: 5ae989999225
user: greg
date: 2012-10-23 20:38:38
summary: Fix for managing tool shed repository reviews.
affected #: 1 file
diff -r 1d8578333bd37d7fd84f276d115f414bbde0b607 -r 5ae989999225b9edf884de6dfe23a2e82f9de403 lib/galaxy/webapps/community/controllers/repository_review.py
--- a/lib/galaxy/webapps/community/controllers/repository_review.py
+++ b/lib/galaxy/webapps/community/controllers/repository_review.py
@@ -654,7 +654,7 @@
repo_dir = repository.repo_path
repo = hg.repository( get_configured_ui(), repo_dir )
metadata_revision_hashes = [ metadata_revision.changeset_revision for metadata_revision in repository.metadata_revisions ]
- reviewed_revision_hashes = [ reviewed_revisions.changeset_revision for reviewed_revisions in repository.reviewed_revisions ]
+ reviewed_revision_hashes = [ review.changeset_revision for review in repository.reviews ]
reviews_dict = odict()
for changeset in get_reversed_changelog_changesets( repo ):
ctx = repo.changectx( changeset )
@@ -667,7 +667,10 @@
# Determine if the current user can add a review to this revision.
can_add_review = trans.user not in [ repository_review.user for repository_review in repository_reviews ]
repository_metadata = get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision )
- repository_metadata_reviews = util.listify( repository_metadata.reviews )
+ if repository_metadata:
+ repository_metadata_reviews = util.listify( repository_metadata.reviews )
+ else:
+ repository_metadata_reviews = []
else:
repository_reviews = []
repository_metadata_reviews = []
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/7a0c93ca036b/
changeset: 7a0c93ca036b
user: greg
date: 2012-10-23 19:38:34
summary: Alllow non-admin users to see metadata revisions when viewing a repository changelog in the tool shed.
affected #: 1 file
diff -r 26017976e4e9d5de317e0b1ef29423effdbe5e24 -r 7a0c93ca036bcd7a8ed33ed15dec95205974f46e templates/webapps/community/repository/view_changelog.mako
--- a/templates/webapps/community/repository/view_changelog.mako
+++ b/templates/webapps/community/repository/view_changelog.mako
@@ -114,14 +114,14 @@
has_metadata_str = '<table border="0"><tr><td bgcolor="#D8D8D8">Repository metadata is associated with this change set.</td></tr></table>'
else:
has_metadata_str = ''
+ display_date = changeset[ 'display_date' ]
%>
- <% display_date = changeset[ 'display_date' ] %>
%if test_date != display_date:
<tr colspan="2"><td bgcolor="#D8D8D8">${display_date}</td></tr>
%endif
<tr><td>
- %if is_admin and has_metadata_str:
+ %if has_metadata_str:
<div class="form-row">
${has_metadata_str}
</div>
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.