def close_svn_review_request(payload, server_url):
    """Closes the review request for an SVN repository.

    The SVN payload may contains one commit. If a commit's commit
    message does not contain a review request ID, it does not close
    any review request.
    """
    review_id_to_commits_map = defaultdict(list)
    commit_message = payload.get('message')
    branch_name = payload.get('changeset_url', 'SVN Repository')
    revision = '%s %d' % ('Revision: ', payload.get('revision'))
    review_request_id = get_review_request_id(commit_message, server_url,
                                              None)
    commit_entry = '%s (%s)' % (branch_name, revision)
    review_id_to_commits_map[review_request_id].append(commit_entry)
    close_all_review_requests(review_id_to_commits_map)
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/hostingsvcs/beanstalk.py/close_svn_review_request/original