'Initialize from a historical revision.
Keyword Parameters:
revision - the historical Revision
request - an optional request object'

def __init__(self, revision, request=None):

    assert revision.id, 'Must    be    a    saved    Revision.'
    assert revision.document_id, 'Must    be    a    Revision    with    a    Document.'
    super(AkismetHistoricalData, self).__init__()
    revision_ip = revision.revisionip_set.first()
    if revision_ip:
        if revision_ip.data:
            self.parameters = json.loads(revision_ip.data)
            return
        else:
            self.parameters.update({'user_ip': revision_ip.ip, 'user_agent': revision_ip.user_agent, 'referrer': revision_ip.referrer})
    else:
        self.parameters.update({'user_ip': '0.0.0.0', 'user_agent': '', 'referrer': ''})
    document = revision.document
    self.set_blog_lang(document.locale)
    if request:
        self.set_blog(request)
        self.set_permalink(document, request)
    self.set_comment_author(revision.creator)
    new_content = self.content_from_revision(revision)
    old_revision = revision.get_previous()
    if old_revision:
        old_content = self.content_from_revision(old_revision)
    else:
        old_content = None
    self.set_content(new_content, old_content)
