'Return (added, changed, removed) sets.'

def get_outdated_files(self, config_changed):

    removed = (set(self.all_docs) - self.found_docs)
    added = set()
    changed = set()
    if config_changed:
        added = self.found_docs
    else:
        for docname in self.found_docs:
            if (docname not in self.all_docs):
                added.add(docname)
                continue
            if (not path.isfile(self.doc2path(docname, self.doctreedir, '.doctree'))):
                changed.add(docname)
                continue
            mtime = self.all_docs[docname]
            newmtime = path.getmtime(self.doc2path(docname))
            if (newmtime > mtime):
                changed.add(docname)
                continue
            for dep in self.dependencies.get(docname, ()):
                try:
                    deppath = path.join(self.srcdir, dep)
                    if (not path.isfile(deppath)):
                        changed.add(docname)
                        break
                    depmtime = path.getmtime(deppath)
                    if (depmtime > mtime):
                        changed.add(docname)
                        break
                except EnvironmentError:
                    changed.add(docname)
                    break
    return (added, changed, removed)
