/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/reconcile.py

Peer review feedback with Ian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
484
484
                    collection, packs, ".reconcile", all_revisions)
485
485
                new_pack = self._packer.pack(pb=self.pb)
486
486
                if new_pack is not None:
487
 
                    self._discard_packs(packs)
 
487
                    self._discard_and_save(packs)
488
488
            else:
489
489
                # only make a new pack when there is data to copy.
490
 
                self._discard_packs(packs)
 
490
                self._discard_and_save(packs)
491
491
            self.garbage_inventories = total_inventories - len(list(
492
492
                collection.inventory_index.combined_index.iter_all_entries()))
493
493
        finally:
494
494
            collection._unlock_names()
495
495
 
496
 
    def _discard_packs(self, packs):
 
496
    def _discard_and_save(self, packs):
497
497
        """Discard some packs from the repository.
498
498
 
499
 
        This removes them from the memory index and renames them into the
 
499
        This removes them from the memory index, saves the in-memory index
 
500
        which makes the newly reconciled pack visible and hides the packs to be
 
501
        discarded, and finally renames the packs being discarded into the
500
502
        obsolete packs directory.
 
503
 
501
504
        :param packs: The packs to discard.
502
505
        """
503
506
        for pack in packs: