81
81
"""Create a repo fetcher.
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.
85
88
# result variables.
86
89
self.failed_revisions = []
262
265
child_pb.finished()
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,
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)
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
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,
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))
289
290
def _fetch_chk_inventories(self, revs, pb):
290
291
"""Fetch the inventory texts, along with the associated chk maps."""