# HG changeset patch # User Ludovic Chabant # Date 1438748550 25200 # Node ID 6f216c1ab6b1667b7661fbc007159b8068cb14aa # Parent 7453baeb083972abec57da2487358655ef006027 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". diff -r 7453baeb0839 -r 6f216c1ab6b1 piecrust/processing/records.py --- 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)