~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-14 04:15:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1885.
  • Revision ID: john@arbash-meinel.com-20060714041526-20e6663951eba451
Enable caching for the from inventory while fetching.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
    def _fetch_weave_texts(self, revs):
161
161
        texts_pb = bzrlib.ui.ui_factory.nested_progress_bar()
162
162
        try:
 
163
            # fileids_altered_by_revision_ids requires reading the inventory
 
164
            # weave, we will need to read the inventory weave again when
 
165
            # all this is done, so enable caching for that specific weave
 
166
            inv_w = self.from_repository.get_inventory_weave()
 
167
            inv_w.enable_cache()
163
168
            file_ids = self.from_repository.fileids_altered_by_revision_ids(revs)
164
169
            count = 0
165
170
            num_file_ids = len(file_ids)
172
177
                    self.from_repository.get_transaction())
173
178
                # we fetch all the texts, because texts do
174
179
                # not reference anything, and its cheap enough
175
 
                to_weave.join(from_weave, version_ids=required_versions) 
 
180
                to_weave.join(from_weave, version_ids=required_versions)
176
181
                # we don't need *all* of this data anymore, but we dont know
177
182
                # what we do. This cache clearing will result in a new read 
178
183
                # of the knit data when we do the checkout, but probably we
205
210
                # corrupt.
206
211
                to_weave.join(from_weave, pb=child_pb, msg='merge inventory',
207
212
                              version_ids=revs)
 
213
                from_weave.clear_cache()
208
214
            finally:
209
215
                child_pb.finished()
210
216
        finally: