commit/galaxy-central: greg: Eliminate the use of trans in functions within the hg_util.py module.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/49e900b2a871/ Changeset: 49e900b2a871 User: greg Date: 2014-07-17 21:22:51 Summary: Eliminate the use of trans in functions within the hg_util.py module. Affected #: 6 files diff -r 23f0c41b1cd7d7ef2087e1eec387cd3b116923fc -r 49e900b2a87108eb1e8b2bbea8a1bf6daedd6328 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -1273,7 +1273,7 @@ else: containers_dict = None export_repository_dependencies_check_box = None - revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=True ) + revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=True ) return trans.fill_template( "/webapps/tool_shed/repository/export_repository.mako", changeset_revision=changeset_revision, containers_dict=containers_dict, @@ -2374,7 +2374,7 @@ selected_value=changeset_revision, add_id_to_name=False, downloadable=False ) - revision_label = hg_util.get_revision_label( trans, repository, repository.tip( trans.app ), include_date=False ) + revision_label = hg_util.get_revision_label( trans.app, repository, repository.tip( trans.app ), include_date=False ) repository_metadata = None metadata = None is_malicious = False @@ -2383,7 +2383,7 @@ if changeset_revision != hg_util.INITIAL_CHANGELOG_HASH: repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans.app, id, changeset_revision ) if repository_metadata: - revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=False ) + revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=False ) metadata = repository_metadata.metadata is_malicious = repository_metadata.malicious else: @@ -2394,7 +2394,7 @@ if previous_changeset_revision != hg_util.INITIAL_CHANGELOG_HASH: repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans.app, id, previous_changeset_revision ) if repository_metadata: - revision_label = hg_util.get_revision_label( trans, repository, previous_changeset_revision, include_date=False ) + revision_label = hg_util.get_revision_label( trans.app, repository, previous_changeset_revision, include_date=False ) metadata = repository_metadata.metadata is_malicious = repository_metadata.malicious changeset_revision = previous_changeset_revision @@ -2630,7 +2630,7 @@ repository_metadata_id = None metadata = None repository_dependencies = None - revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=True ) + revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=True ) changeset_revision_select_field = grids_util.build_changeset_revision_select_field( trans, repository, selected_value=changeset_revision, @@ -2725,7 +2725,7 @@ changeset_revision, metadata_only=True ) repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) - revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=True ) + revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=True ) return trans.fill_template( '/webapps/tool_shed/repository/rate_repository.mako', repository=repository, metadata=metadata, @@ -3317,7 +3317,7 @@ selected_value=changeset_revision, add_id_to_name=False, downloadable=False ) - revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=False ) + revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=False ) repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans.app, id, changeset_revision ) if repository_metadata: metadata = repository_metadata.metadata @@ -3379,7 +3379,7 @@ tool = None guid = None original_tool_data_path = trans.app.config.tool_data_path - revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=False ) + revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=False ) repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans.app, repository_id, changeset_revision ) if repository_metadata: repository_metadata_id = trans.security.encode_id( repository_metadata.id ) diff -r 23f0c41b1cd7d7ef2087e1eec387cd3b116923fc -r 49e900b2a87108eb1e8b2bbea8a1bf6daedd6328 lib/tool_shed/grids/admin_grids.py --- a/lib/tool_shed/grids/admin_grids.py +++ b/lib/tool_shed/grids/admin_grids.py @@ -426,7 +426,7 @@ def get_value( self, trans, grid, repository_metadata ): repository = repository_metadata.repository - return hg_util.get_revision_label( trans, + return hg_util.get_revision_label( trans.app, repository, repository_metadata.changeset_revision, include_date=True, diff -r 23f0c41b1cd7d7ef2087e1eec387cd3b116923fc -r 49e900b2a87108eb1e8b2bbea8a1bf6daedd6328 lib/tool_shed/grids/repository_grids.py --- a/lib/tool_shed/grids/repository_grids.py +++ b/lib/tool_shed/grids/repository_grids.py @@ -1346,7 +1346,7 @@ def get_value( self, trans, grid, repository_metadata ): repository = repository_metadata.repository changeset_revision = repository_metadata.changeset_revision - changeset_revision_label = hg_util.get_revision_label( trans, repository, changeset_revision, include_date=True ) + changeset_revision_label = hg_util.get_revision_label( trans.app, repository, changeset_revision, include_date=True ) return changeset_revision_label diff -r 23f0c41b1cd7d7ef2087e1eec387cd3b116923fc -r 49e900b2a87108eb1e8b2bbea8a1bf6daedd6328 lib/tool_shed/grids/repository_review_grids.py --- a/lib/tool_shed/grids/repository_review_grids.py +++ b/lib/tool_shed/grids/repository_review_grids.py @@ -79,7 +79,7 @@ rval = '' for repository_metadata in repository_metadata_revisions: rev, label, changeset_revision = \ - hg_util.get_rev_label_changeset_revision_from_repository_metadata( trans, + hg_util.get_rev_label_changeset_revision_from_repository_metadata( trans.app, repository_metadata, repository=repository, include_date=True, @@ -304,7 +304,7 @@ rval += 'edit_review' else: rval +='browse_review' - revision_label = hg_util.get_revision_label( trans, + revision_label = hg_util.get_revision_label( trans.app, review.repository, review.changeset_revision, include_date=True, diff -r 23f0c41b1cd7d7ef2087e1eec387cd3b116923fc -r 49e900b2a87108eb1e8b2bbea8a1bf6daedd6328 lib/tool_shed/grids/util.py --- a/lib/tool_shed/grids/util.py +++ b/lib/tool_shed/grids/util.py @@ -58,7 +58,7 @@ repository_metadata_revisions = repository.metadata_revisions for repository_metadata in repository_metadata_revisions: rev, label, changeset_revision = \ - hg_util.get_rev_label_changeset_revision_from_repository_metadata( trans, + hg_util.get_rev_label_changeset_revision_from_repository_metadata( trans.app, repository_metadata, repository=repository, include_date=True, diff -r 23f0c41b1cd7d7ef2087e1eec387cd3b116923fc -r 49e900b2a87108eb1e8b2bbea8a1bf6daedd6328 lib/tool_shed/util/hg_util.py --- a/lib/tool_shed/util/hg_util.py +++ b/lib/tool_shed/util/hg_util.py @@ -249,12 +249,12 @@ reversed_changelog.insert( 0, changeset ) return reversed_changelog -def get_revision_label( trans, repository, changeset_revision, include_date=True, include_hash=True ): +def get_revision_label( app, repository, changeset_revision, include_date=True, include_hash=True ): """ Return a string consisting of the human read-able changeset rev and the changeset revision string which includes the revision date if the receive include_date is True. """ - repo = get_repo_for_repository( trans.app, repository=repository, repo_path=None ) + repo = get_repo_for_repository( app, repository=repository, repo_path=None ) ctx = get_changectx_for_changeset( repo, changeset_revision ) if ctx: return get_revision_label_from_ctx( ctx, include_date=include_date, include_hash=include_hash ) @@ -264,11 +264,11 @@ else: return "-1" -def get_rev_label_changeset_revision_from_repository_metadata( trans, repository_metadata, repository=None, +def get_rev_label_changeset_revision_from_repository_metadata( app, repository_metadata, repository=None, include_date=True, include_hash=True ): if repository is None: repository = repository_metadata.repository - repo = hg.repository( get_configured_ui(), repository.repo_path( trans.app ) ) + repo = hg.repository( get_configured_ui(), repository.repo_path( app ) ) changeset_revision = repository_metadata.changeset_revision ctx = get_changectx_for_changeset( repo, changeset_revision ) if ctx: 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)
-
commits-noreply@bitbucket.org