~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: Martin Pool
  • Date: 2008-10-27 08:02:47 UTC
  • mfrom: (3795 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3798.
  • Revision ID: mbp@sourcefrog.net-20081027080247-0al6nrx2v8u1dcci
merge trunk

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.