~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Robert Collins
  • Date: 2008-07-28 05:09:54 UTC
  • mto: This revision was merged to the branch mainline in revision 3584.
  • Revision ID: robertc@robertcollins.net-20080728050954-iyok0yyqonml80q7
 * The generic fetch code now uses two attributes on Repository objects
   to control the requested streams: ``_fetch_order`` and
   ``_fetch_uses_deltas``. Setting these appropriately allows different
   repository implementations to recieve data in their optimial form.
   (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
                    to_texts = self.to_repository.texts
180
180
                    from_texts = self.from_repository.texts
181
181
                    to_texts.insert_record_stream(from_texts.get_record_stream(
182
 
                        text_keys, 'topological', False))
 
182
                        text_keys, self.to_repository._fetch_order,
 
183
                        self.to_repository._fetch_uses_deltas))
183
184
                    # Cause an error if a text occurs after we have done the
184
185
                    # copy.
185
186
                    text_keys = None
239
240
            # corrupt.
240
241
            to_weave.insert_record_stream(from_weave.get_record_stream(
241
242
                [(rev_id,) for rev_id in revs],
242
 
                'topological', False))
 
243
                self.to_repository._fetch_order,
 
244
                self.to_repository._fetch_uses_deltas))
243
245
        finally:
244
246
            child_pb.finished()
245
247
 
301
303
        # A missing signature is just skipped.
302
304
        to_sf.insert_record_stream(filter_absent(from_sf.get_record_stream(
303
305
            [(rev_id,) for rev_id in revs],
304
 
            'unordered', False)))
 
306
            self.to_repository._fetch_order,
 
307
            self.to_repository._fetch_uses_deltas)))
305
308
        self._fetch_just_revision_texts(revs)
306
309
 
307
310
    def _fetch_just_revision_texts(self, version_ids):
309
312
        from_rf = self.from_repository.revisions
310
313
        to_rf.insert_record_stream(from_rf.get_record_stream(
311
314
            [(rev_id,) for rev_id in version_ids],
312
 
            'topological', False))
 
315
            self.to_repository._fetch_order,
 
316
            self.to_repository._fetch_uses_deltas))
313
317
 
314
318
 
315
319
class Inter1and2Helper(object):