'Remove all traces of a source file in the inventory.'

def clear_doc(self, docname):

    if (docname in self.all_docs):
        self.all_docs.pop(docname, None)
        self.reread_always.discard(docname)
        for (version, changes) in self.versionchanges.items():
            new = [change for change in changes if (change[1] != docname)]
            changes[:] = new
    for domain in self.domains.values():
        domain.clear_doc(docname)
