'Return the latest installable changeset revision for the repository associated with the received
name and owner.  This method is called from Galaxy when attempting to install the latest revision
of an installed repository.'

@web.json
def get_latest_downloadable_changeset_revision(self, trans, **kwd):

    repository_name = kwd.get('name', None)
    repository_owner = kwd.get('owner', None)
    if ((repository_name is not None) and (repository_owner is not None)):
        repository = repository_util.get_repository_by_name_and_owner(trans.app, repository_name, repository_owner)
        if repository:
            repo = hg_util.get_repo_for_repository(trans.app, repository=repository, repo_path=None, create=False)
            return metadata_util.get_latest_downloadable_changeset_revision(trans.app, repository, repo)
    return hg_util.INITIAL_CHANGELOG_HASH
