# HG changeset patch # User Ludovic Chabant # Date 1466899139 25200 # Node ID 9a92e2804562e7315a91935319f93a1985b0e69c # Parent 7dbddfed8129b194e4c103afcb764c58dc316bea bake: Add the list of deleted files to the bake/processing records. diff -r 7dbddfed8129 -r 9a92e2804562 piecrust/baking/baker.py --- a/piecrust/baking/baker.py Thu Jun 09 23:32:15 2016 -0700 +++ b/piecrust/baking/baker.py Sat Jun 25 16:58:59 2016 -0700 @@ -379,6 +379,7 @@ logger.debug("Handling deletions...") for path, reason in record.getDeletions(): logger.debug("Removing '%s': %s" % (path, reason)) + record.current.deleted.append(path) try: os.remove(path) logger.info('[delete] %s' % path) diff -r 7dbddfed8129 -r 9a92e2804562 piecrust/baking/records.py --- a/piecrust/baking/records.py Thu Jun 09 23:32:15 2016 -0700 +++ b/piecrust/baking/records.py Sat Jun 25 16:58:59 2016 -0700 @@ -16,7 +16,7 @@ class BakeRecord(Record): - RECORD_VERSION = 19 + RECORD_VERSION = 20 def __init__(self): super(BakeRecord, self).__init__() @@ -24,6 +24,7 @@ self.bake_time = None self.baked_count = {} self.total_baked_count = {} + self.deleted = [] self.success = True @@ -107,6 +108,11 @@ yield from sub.assets @property + def all_out_paths(self): + for sub in self.subs: + yield sub.out_path + + @property def has_any_error(self): if len(self.errors) > 0: return True diff -r 7dbddfed8129 -r 9a92e2804562 piecrust/processing/pipeline.py --- a/piecrust/processing/pipeline.py Thu Jun 09 23:32:15 2016 -0700 +++ b/piecrust/processing/pipeline.py Sat Jun 25 16:58:59 2016 -0700 @@ -166,6 +166,7 @@ if delete: for path, reason in record.getDeletions(): logger.debug("Removing '%s': %s" % (path, reason)) + record.current.deleted.append(path) try: os.remove(path) except FileNotFoundError: diff -r 7dbddfed8129 -r 9a92e2804562 piecrust/processing/records.py --- a/piecrust/processing/records.py Thu Jun 09 23:32:15 2016 -0700 +++ b/piecrust/processing/records.py Sat Jun 25 16:58:59 2016 -0700 @@ -4,13 +4,14 @@ class ProcessorPipelineRecord(Record): - RECORD_VERSION = 6 + RECORD_VERSION = 7 def __init__(self): super(ProcessorPipelineRecord, self).__init__() self.out_dir = None self.process_time = None self.processed_count = 0 + self.deleted = [] self.success = False @@ -79,7 +80,9 @@ 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 | FLAG_COLLAPSED_FROM_LAST_RUN + cur.flags = (prev.flags + & ~FLAG_PROCESSED + | FLAG_COLLAPSED_FROM_LAST_RUN) cur.rel_outputs = list(prev.rel_outputs) cur.errors = list(prev.errors)