Closes #1283: Fix a bug in the detection of changed files that would try to access doctrees of deleted documents.

This commit is contained in:
Georg Brandl 2014-01-19 17:33:55 +01:00
parent 1653c5d242
commit bc614bcd93
2 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,9 @@ Bugs fixed
* #1300: Fix references not working in translated documents in some instances. * #1300: Fix references not working in translated documents in some instances.
* #1283: Fix a bug in the detection of changed files that would try to access
doctrees of deleted documents.
Documentation Documentation
------------- -------------

View File

@ -265,6 +265,12 @@ class Builder(object):
self.info(bold('no targets are out of date.')) self.info(bold('no targets are out of date.'))
return return
# filter "docnames" (list of outdated files) by the updated
# found_docs of the environment; this will remove docs that
# have since been removed
if docnames != ['__all__']:
docnames = set(docnames) & self.env.found_docs
# another indirection to support builders that don't build # another indirection to support builders that don't build
# files individually # files individually
self.write(docnames, list(updated_docnames), method) self.write(docnames, list(updated_docnames), method)
@ -289,6 +295,7 @@ class Builder(object):
docnames = set(build_docnames) | set(updated_docnames) docnames = set(build_docnames) | set(updated_docnames)
else: else:
docnames = set(build_docnames) docnames = set(build_docnames)
self.app.debug('docnames to write: %s', ', '.join(sorted(docnames)))
# add all toctree-containing files that may have changed # add all toctree-containing files that may have changed
for docname in list(docnames): for docname in list(docnames):