~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-23 19:35:38 UTC
  • mto: This revision was merged to the branch mainline in revision 4187.
  • Revision ID: john@arbash-meinel.com-20090323193538-3d01aetz07jsyd3w
Add 'combine_backing_indices' as a flag for GraphIndex.set_optimize().

Update the Packer code so that it sets combine_backing_indices=False, as we know that
we won't be making extra queries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
725
725
 
726
726
    def open_pack(self):
727
727
        """Open a pack for the pack we are creating."""
728
 
        return NewPack(self._pack_collection, upload_suffix=self.suffix,
 
728
        new_pack = NewPack(self._pack_collection, upload_suffix=self.suffix,
729
729
                file_mode=self._pack_collection.repo.bzrdir._get_file_mode())
 
730
        # We know that we will process all nodes in order, and don't need to
 
731
        # query, so don't combine any indices spilled to disk until we are done
 
732
        new_pack.revision_index.set_optimize(combine_backing_indices=False)
 
733
        new_pack.inventory_index.set_optimize(combine_backing_indices=False)
 
734
        new_pack.text_index.set_optimize(combine_backing_indices=False)
 
735
        new_pack.signature_index.set_optimize(combine_backing_indices=False)
 
736
        return new_pack
730
737
 
731
738
    def _update_pack_order(self, entries, index_to_pack_map):
732
739
        """Determine how we want our packs to be ordered.