def get_latest_repository_metadata(app, decoded_repository_id, downloadable=False):
 sa_session = app.model.context.current
 repository = sa_session.query(app.model.Repository).get(decoded_repository_id)
 repo = hg_util.get_repo_for_repository(app, repository=repository, repo_path=None, create=False)
 if downloadable:
  changeset_revision = get_latest_downloadable_changeset_revision(app, repository, repo)
 else:
  changeset_revision = get_latest_changeset_revision(app, repository, repo)
 return get_repository_metadata_by_changeset_revision(app, app.security.encode_id(repository.id), changeset_revision)

def get_latest_repository_metadata ( app , decoded_repository_id , downloadable = False ) : sa_session = app . model . context . current repository = sa_session . query ( app . model . Repository ) . get ( decoded_repository_id ) repo = hg_util . get_repo_for_repository ( app , repository = repository , repo_path = None , create = False ) if downloadable : changeset_revision = get_latest_downloadable_changeset_revision ( app , repository , repo ) else : changeset_revision = get_latest_changeset_revision ( app , repository , repo ) return get_repository_metadata_by_changeset_revision ( app , app . security . encode_id ( repository . id ) , changeset_revision )
get last metadata defined for a specified repository from the database .