Mercurial > piecrust2
changeset 550:6f216c1ab6b1
bake: Add a flag to know which record entries got collapsed from last run.
This makes it possible to find entries for things that were actually baked
during the current run, as opposed to skipped because they were "clean".
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 04 Aug 2015 21:22:30 -0700 |
parents | 7453baeb0839 |
children | f2b875ecc940 |
files | piecrust/processing/records.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/processing/records.py Tue Aug 04 21:21:08 2015 -0700 +++ b/piecrust/processing/records.py Tue Aug 04 21:22:30 2015 -0700 @@ -19,6 +19,7 @@ FLAG_PREPARED = 2**0 FLAG_PROCESSED = 2**1 FLAG_BYPASSED_STRUCTURED_PROCESSING = 2**3 +FLAG_COLLAPSED_FROM_LAST_RUN = 2**4 def _get_transition_key(path): @@ -47,6 +48,10 @@ def was_processed_successfully(self): return self.was_processed and not self.errors + @property + def was_collapsed_from_last_run(self): + return self.flags & FLAG_COLLAPSED_FROM_LAST_RUN + class TransitionalProcessorPipelineRecord(TransitionalRecord): def __init__(self, previous_path=None): @@ -75,7 +80,7 @@ if prev and cur and not cur.was_processed: # This asset wasn't processed, so the information from # last time is still valid. - cur.flags = prev.flags + cur.flags = prev.flags | FLAG_COLLAPSED_FROM_LAST_RUN cur.rel_outputs = list(prev.rel_outputs) cur.errors = list(prev.errors)