Skip to content

Commit

Permalink
Merge pull request #5525 from eqvinox/revert-pickle-write-1.8
Browse files Browse the repository at this point in the history
[1.8] Revert "Builder.build: save env also with only new documents"
  • Loading branch information
tk0miya committed Nov 6, 2018
2 parents 6686711 + d15d11d commit 63daf8c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sphinx/builders/__init__.py
Expand Up @@ -369,14 +369,14 @@ def build(self, docnames, summary=None, method='update'):
else:
logger.info(__('none found'))

# save the environment
from sphinx.application import ENV_PICKLE_FILENAME
logger.info(bold(__('pickling environment... ')), nonl=True)
with open(path.join(self.doctreedir, ENV_PICKLE_FILENAME), 'wb') as f:
pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)
logger.info(__('done'))

if updated_docnames:
# save the environment
from sphinx.application import ENV_PICKLE_FILENAME
logger.info(bold(__('pickling environment... ')), nonl=True)
with open(path.join(self.doctreedir, ENV_PICKLE_FILENAME), 'wb') as f:
pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)
logger.info(__('done'))

# global actions
self.app.phase = BuildPhase.CONSISTENCY_CHECK
logger.info(bold(__('checking consistency... ')), nonl=True)
Expand Down

0 comments on commit 63daf8c

Please sign in to comment.