'Check if current revision is in loaded revisions.'

def load_prereqs(self, requester, storage):

    doc = storage.get_document(self.locale, self.slug)
    if (doc and doc.current_revision):
        return (True, [])
    data = storage.get_document_history(self.locale, self.slug)
    if (not data):
        return (False, {u'needs': [(u'document_history', self.path, {u'revisions': self.revisions})]})
    needed = []
    for (src_type, href, params) in data[u'revisions'][:self.revisions]:
        (locale, slug, rev_id) = RevisionSource.split_path(href)
        rev = storage.get_revision(rev_id)
        if (rev is None):
            needed.append((src_type, href, params))
    if needed:
        return (False, {u'needs': needed})
    if data[u'is_all']:
        raise self.SourceError(u'No    current_revision    found    for    document.')
    next_srcs = [(u'document', self.path, {u'revisions': (self.revisions + 1)})]
    if (len(data[u'revisions']) > self.revisions):
        next_srcs.append(data[u'revisions'][self.revisions])
    else:
        next_srcs.append((u'document_history', self.path, {u'revisions': (len(data[u'revisions']) * 2)}))
    return (False, {u'needs': next_srcs})
