'Ack that a revision and its ancestors are present in the source.'

def ack(self, sha):

    if (len(sha) != 40):
        raise ValueError(('unexpected    sha    %r    received' % sha))
    ancestors = set([sha])
    while self.heads:
        for a in ancestors:
            if (a in self.heads):
                self.heads.remove(a)
        new_ancestors = set()
        for a in ancestors:
            ps = self.parents.get(a)
            if (ps is not None):
                new_ancestors.update(ps)
            self.parents[a] = None
        if (not new_ancestors):
            break
        ancestors = new_ancestors
