diff piecrust/serving.py @ 338:938be93215cb

bake: Improve render context and bake record, fix incremental bake bugs. * Used sources and taxonomies are now stored on a per-render-pass basis. This fixes bugs where sources/taxonomies were used for one pass, but that pass is skipped on a later bake because its result is cached. * Bake records are now created for all pages even when they're not baked. Record collapsing is gone except for taxonomy index pages. * Bake records now also have sub-entries in order to store information about each sub-page, since some sub-pages could use sources/taxonomies differently than others, or be missing from the output. This lets PieCrust handle clean/dirty states on a sub-page level.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 06 Apr 2015 19:59:54 -0700
parents b034f6f15e22
children 741e97e63048
line wrap: on
line diff
--- a/piecrust/serving.py	Sat Apr 04 07:55:49 2015 -0700
+++ b/piecrust/serving.py	Mon Apr 06 19:59:54 2015 -0700
@@ -285,7 +285,8 @@
         if entry is None:
             entry = ServeRecordPageEntry(req_path, page_num)
             self._page_record.addEntry(entry)
-        entry.used_source_names = set(render_ctx.used_source_names)
+        rdr_pass = render_ctx.current_pass_info
+        entry.used_source_names = set(rdr_pass.used_source_names)
 
         # Profiling.
         if app.config.get('site/show_debug_info'):