comparison piecrust/processing/records.py @ 753:9a92e2804562

bake: Add the list of deleted files to the bake/processing records.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 25 Jun 2016 16:58:59 -0700
parents 61d606fbc313
children
comparison
equal deleted inserted replaced
752:7dbddfed8129 753:9a92e2804562
2 import hashlib 2 import hashlib
3 from piecrust.records import Record, TransitionalRecord 3 from piecrust.records import Record, TransitionalRecord
4 4
5 5
6 class ProcessorPipelineRecord(Record): 6 class ProcessorPipelineRecord(Record):
7 RECORD_VERSION = 6 7 RECORD_VERSION = 7
8 8
9 def __init__(self): 9 def __init__(self):
10 super(ProcessorPipelineRecord, self).__init__() 10 super(ProcessorPipelineRecord, self).__init__()
11 self.out_dir = None 11 self.out_dir = None
12 self.process_time = None 12 self.process_time = None
13 self.processed_count = 0 13 self.processed_count = 0
14 self.deleted = []
14 self.success = False 15 self.success = False
15 16
16 17
17 FLAG_NONE = 0 18 FLAG_NONE = 0
18 FLAG_PREPARED = 2**0 19 FLAG_PREPARED = 2**0
77 def collapseRecords(self): 78 def collapseRecords(self):
78 for prev, cur in self.transitions.values(): 79 for prev, cur in self.transitions.values():
79 if prev and cur and not cur.was_processed: 80 if prev and cur and not cur.was_processed:
80 # This asset wasn't processed, so the information from 81 # This asset wasn't processed, so the information from
81 # last time is still valid. 82 # last time is still valid.
82 cur.flags = prev.flags | FLAG_COLLAPSED_FROM_LAST_RUN 83 cur.flags = (prev.flags
84 & ~FLAG_PROCESSED
85 | FLAG_COLLAPSED_FROM_LAST_RUN)
83 cur.rel_outputs = list(prev.rel_outputs) 86 cur.rel_outputs = list(prev.rel_outputs)
84 cur.errors = list(prev.errors) 87 cur.errors = list(prev.errors)
85 88
86 def getDeletions(self): 89 def getDeletions(self):
87 for prev, cur in self.transitions.values(): 90 for prev, cur in self.transitions.values():