Mercurial > piecrust2
comparison piecrust/records.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 | c132a2cba521 |
children | 61d606fbc313 |
comparison
equal
deleted
inserted
replaced
337:49408002798e | 338:938be93215cb |
---|---|
116 key = self.getTransitionKey(entry) | 116 key = self.getTransitionKey(entry) |
117 te = self.transitions.get(key) | 117 te = self.transitions.get(key) |
118 if te is None: | 118 if te is None: |
119 logger.debug("Adding new record entry: %s" % key) | 119 logger.debug("Adding new record entry: %s" % key) |
120 self.transitions[key] = (None, entry) | 120 self.transitions[key] = (None, entry) |
121 self._onNewEntryAdded(entry) | |
121 return | 122 return |
122 | 123 |
123 if te[1] is not None: | 124 if te[1] is not None: |
124 raise Exception("A current entry already exists for: %s" % | 125 raise Exception("A current entry already exists for: %s" % |
125 key) | 126 key) |
126 logger.debug("Setting current record entry: %s" % key) | 127 logger.debug("Setting current record entry: %s" % key) |
127 self.transitions[key] = (te[0], entry) | 128 self.transitions[key] = (te[0], entry) |
128 | 129 |
130 def _onNewEntryAdded(self, entry): | |
131 pass | |
132 |