~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

Merge in bzr.dev 3801, resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
977
977
        # TODO: combine requests in the same index that are in ascending order.
978
978
        return total, requests
979
979
 
 
980
    def open_pack(self):
 
981
        """Open a pack for the pack we are creating."""
 
982
        new_pack = super(OptimisingPacker, self).open_pack()
 
983
        # Turn on the optimization flags for all the index builders.
 
984
        new_pack.revision_index.set_optimize(for_size=True)
 
985
        new_pack.inventory_index.set_optimize(for_size=True)
 
986
        new_pack.text_index.set_optimize(for_size=True)
 
987
        new_pack.signature_index.set_optimize(for_size=True)
 
988
        return new_pack
 
989
 
980
990
 
981
991
class ReconcilePacker(Packer):
982
992
    """A packer which regenerates indices etc as it copies.
1475
1485
        self._names.pop(pack.name)
1476
1486
        self._packs_by_name.pop(pack.name)
1477
1487
        self._remove_pack_indices(pack)
 
1488
        self.packs.remove(pack)
1478
1489
 
1479
1490
    def _remove_pack_indices(self, pack):
1480
1491
        """Remove the indices for pack from the aggregated indices."""