def get_commit_message(local, master, revid):
    """Returns the commit message of a branch revision."""
    branch = local or master
    revision = branch.repository.get_revision(revid)
    return revision.message