213
213
# local because needing to know about WeaveFile is a wart we want to hide
214
214
from bzrlib.weave import WeaveFile, Weave
215
215
transaction = self.repo.get_transaction()
216
self.pb.update('Reading inventory data.')
216
self.pb.update('Reading inventory data')
217
217
self.inventory = self.repo.inventories
218
218
self.revisions = self.repo.revisions
219
219
# the total set of revisions to process
235
235
(not self.garbage_inventories or not self.thorough)):
236
236
self.pb.note('Inventory ok.')
238
self.pb.update('Backing up inventory...', 0, 0)
238
self.pb.update('Backing up inventory', 0, 0)
239
239
self.repo._backup_inventory()
240
self.pb.note('Backup Inventory created.')
240
self.pb.note('Backup inventory created.')
241
241
new_inventories = self.repo._temp_inventories()
243
243
# we have topological order of revisions and non ghost parents ready.
351
351
def _load_indexes(self):
352
352
"""Load indexes for the reconciliation."""
353
353
self.transaction = self.repo.get_transaction()
354
self.pb.update('Reading indexes.', 0, 2)
354
self.pb.update('Reading indexes', 0, 2)
355
355
self.inventory = self.repo.inventories
356
self.pb.update('Reading indexes.', 1, 2)
356
self.pb.update('Reading indexes', 1, 2)
357
357
self.repo._check_for_inconsistent_revision_parents()
358
358
self.revisions = self.repo.revisions
359
self.pb.update('Reading indexes.', 2, 2)
359
self.pb.update('Reading indexes', 2, 2)
361
361
def _gc_inventory(self):
362
362
"""Remove inventories that are not referenced from the revision store."""
363
self.pb.update('Checking unused inventories.', 0, 1)
363
self.pb.update('Checking unused inventories', 0, 1)
364
364
self._check_garbage_inventories()
365
self.pb.update('Checking unused inventories.', 1, 3)
365
self.pb.update('Checking unused inventories', 1, 3)
366
366
if not self.garbage_inventories:
367
367
self.pb.note('Inventory ok.')
369
self.pb.update('Backing up inventory...', 0, 0)
369
self.pb.update('Backing up inventory', 0, 0)
370
370
self.repo._backup_inventory()
371
self.pb.note('Backup Inventory created.')
371
self.pb.note('Backup Inventory created')
372
372
# asking for '' should never return a non-empty weave
373
373
new_inventories = self.repo._temp_inventories()
374
374
# we have topological order of revisions and non ghost parents ready.