/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/fetch.py

Merge bzr.dev into brisbane-core and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        """Create a repo fetcher.
82
82
 
83
83
        :param find_ghosts: If True search the entire history for ghosts.
 
84
        :param _write_group_acquired_callable: Don't use; this parameter only
 
85
            exists to facilitate a hack done in InterPackRepo.fetch.  We would
 
86
            like to remove this parameter.
84
87
        """
85
88
        # result variables.
86
89
        self.failed_revisions = []
109
112
                try:
110
113
                    self.__fetch()
111
114
                except:
112
 
                    self.to_repository.abort_write_group()
 
115
                    self.to_repository.abort_write_group(suppress_errors=True)
113
116
                    raise
114
117
                else:
115
118
                    self.to_repository.commit_write_group()
262
265
            child_pb.finished()
263
266
 
264
267
    def _fetch_revision_texts(self, revs, pb):
 
268
        # fetch signatures first and then the revision texts
265
269
        # may need to be a InterRevisionStore call here.
266
270
        to_sf = self.to_repository.signatures
267
271
        from_sf = self.from_repository.signatures
269
273
        to_sf.insert_record_stream(filter_absent(from_sf.get_record_stream(
270
274
            [(rev_id,) for rev_id in revs],
271
275
            self.to_repository._fetch_order,
272
 
            True)))
273
 
        # Bug #261339, some knit repositories accidentally had deltas in their
274
 
        # revision stream, when you weren't ever supposed to have deltas.
275
 
        # So we now *force* fulltext copying for signatures and revisions
 
276
            not self.to_repository._fetch_uses_deltas)))
276
277
        self._fetch_just_revision_texts(revs)
277
278
 
278
279
    def _fetch_just_revision_texts(self, version_ids):
279
280
        to_rf = self.to_repository.revisions
280
281
        from_rf = self.from_repository.revisions
 
282
        # If a revision has a delta, this is actually expanded inside the
 
283
        # insert_record_stream code now, which is an alternate fix for
 
284
        # bug #261339
281
285
        to_rf.insert_record_stream(from_rf.get_record_stream(
282
286
            [(rev_id,) for rev_id in version_ids],
283
287
            self.to_repository._fetch_order,
284
 
            True))
285
 
        # Bug #261339, some knit repositories accidentally had deltas in their
286
 
        # revision stream, when you weren't ever supposed to have deltas.
287
 
        # So we now *force* fulltext copying for signatures and revisions
 
288
            not self.to_repository._fetch_uses_deltas))
288
289
 
289
290
    def _fetch_chk_inventories(self, revs, pb):
290
291
        """Fetch the inventory texts, along with the associated chk maps."""