mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with Takayuki's sphinx-fix-testing-fork
This commit is contained in:
commit
00b3433b0d
@ -787,7 +787,11 @@ class BuildEnvironment:
|
|||||||
app.emit('doctree-read', doctree)
|
app.emit('doctree-read', doctree)
|
||||||
|
|
||||||
# store time of build, for outdated files detection
|
# store time of build, for outdated files detection
|
||||||
self.all_docs[docname] = time.time()
|
# (Some filesystems have coarse timestamp resolution;
|
||||||
|
# therefore time.time() can be older than filesystem's timestamp.
|
||||||
|
# For example, FAT32 has 2sec timestamp resolution.)
|
||||||
|
self.all_docs[docname] = max(
|
||||||
|
time.time(), path.getmtime(self.doc2path(docname)))
|
||||||
|
|
||||||
if self.versioning_condition:
|
if self.versioning_condition:
|
||||||
# get old doctree
|
# get old doctree
|
||||||
|
@ -191,6 +191,7 @@ def load_mappings(app):
|
|||||||
for name, _, invdata in cache.itervalues():
|
for name, _, invdata in cache.itervalues():
|
||||||
if name:
|
if name:
|
||||||
env.intersphinx_named_inventory[name] = invdata
|
env.intersphinx_named_inventory[name] = invdata
|
||||||
|
else:
|
||||||
for type, objects in invdata.iteritems():
|
for type, objects in invdata.iteritems():
|
||||||
env.intersphinx_inventory.setdefault(
|
env.intersphinx_inventory.setdefault(
|
||||||
type, {}).update(objects)
|
type, {}).update(objects)
|
||||||
|
@ -16,7 +16,7 @@ from util import *
|
|||||||
def test_html(app):
|
def test_html(app):
|
||||||
app.builder.build_all()
|
app.builder.build_all()
|
||||||
|
|
||||||
fp = open(os.path.join(app.outdir, 'objects.html'), 'rb')
|
fp = open(os.path.join(app.outdir, 'objects.html'), 'r')
|
||||||
try:
|
try:
|
||||||
stuff = fp.read()
|
stuff = fp.read()
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user