265
265
def _store_files(self):
266
266
"""Store new texts of modified/added files."""
267
for path, id, kind in self.delta.modified:
270
self._store_file_text(id)
272
for path, id, kind in self.delta.added:
275
self._store_file_text(id)
277
for old_path, new_path, id, kind, text_modified in self.delta.renamed:
267
# We must make sure that directories are added before anything
268
# inside them is added. the files within the delta report are
269
# sorted by path so we know the directory will come before its
271
for path, file_id, kind in self.delta.added:
273
ie = self.work_inv[file_id].copy()
276
self._store_file_text(file_id)
278
for path, file_id, kind in self.delta.modified:
281
self._store_file_text(file_id)
283
for old_path, new_path, file_id, kind, text_modified in self.delta.renamed:
278
284
if kind != 'file':
280
286
if not text_modified:
282
self._store_file_text(id)
288
self._store_file_text(file_id)
285
291
def _store_file_text(self, file_id):