/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/repofmt/pack_repo.py

  • Committer: Aaron Bentley
  • Date: 2008-10-28 09:02:03 UTC
  • mfrom: (3802 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3803.
  • Revision ID: aaron@aaronbentley.com-20081028090203-84flugri50b3daco
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
971
971
        # TODO: combine requests in the same index that are in ascending order.
972
972
        return total, requests
973
973
 
 
974
    def open_pack(self):
 
975
        """Open a pack for the pack we are creating."""
 
976
        new_pack = super(OptimisingPacker, self).open_pack()
 
977
        # Turn on the optimization flags for all the index builders.
 
978
        new_pack.revision_index.set_optimize(for_size=True)
 
979
        new_pack.inventory_index.set_optimize(for_size=True)
 
980
        new_pack.text_index.set_optimize(for_size=True)
 
981
        new_pack.signature_index.set_optimize(for_size=True)
 
982
        return new_pack
 
983
 
974
984
 
975
985
class ReconcilePacker(Packer):
976
986
    """A packer which regenerates indices etc as it copies.
1469
1479
        self._names.pop(pack.name)
1470
1480
        self._packs_by_name.pop(pack.name)
1471
1481
        self._remove_pack_indices(pack)
 
1482
        self.packs.remove(pack)
1472
1483
 
1473
1484
    def _remove_pack_indices(self, pack):
1474
1485
        """Remove the indices for pack from the aggregated indices."""