/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@3883

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()
248
251
            child_pb.finished()
249
252
 
250
253
    def _fetch_revision_texts(self, revs, pb):
 
254
        # fetch signatures first and then the revision texts
251
255
        # may need to be a InterRevisionStore call here.
252
256
        to_sf = self.to_repository.signatures
253
257
        from_sf = self.from_repository.signatures
255
259
        to_sf.insert_record_stream(filter_absent(from_sf.get_record_stream(
256
260
            [(rev_id,) for rev_id in revs],
257
261
            self.to_repository._fetch_order,
258
 
            True)))
259
 
        # Bug #261339, some knit repositories accidentally had deltas in their
260
 
        # revision stream, when you weren't ever supposed to have deltas.
261
 
        # So we now *force* fulltext copying for signatures and revisions
 
262
            not self.to_repository._fetch_uses_deltas)))
262
263
        self._fetch_just_revision_texts(revs)
263
264
 
264
265
    def _fetch_just_revision_texts(self, version_ids):
265
266
        to_rf = self.to_repository.revisions
266
267
        from_rf = self.from_repository.revisions
 
268
        # If a revision has a delta, this is actually expanded inside the
 
269
        # insert_record_stream code now, which is an alternate fix for
 
270
        # bug #261339
267
271
        to_rf.insert_record_stream(from_rf.get_record_stream(
268
272
            [(rev_id,) for rev_id in version_ids],
269
273
            self.to_repository._fetch_order,
270
 
            True))
271
 
        # Bug #261339, some knit repositories accidentally had deltas in their
272
 
        # revision stream, when you weren't ever supposed to have deltas.
273
 
        # So we now *force* fulltext copying for signatures and revisions
 
274
            not self.to_repository._fetch_uses_deltas))
274
275
 
275
276
    def _generate_root_texts(self, revs):
276
277
        """This will be called by __fetch between fetching weave texts and