~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

Partial refactoring of pack_repo to create a Packer object for packing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2331
2331
    @needs_write_lock
2332
2332
    def fetch(self, revision_id=None, pb=None, find_ghosts=False):
2333
2333
        """See InterRepository.fetch()."""
 
2334
        from bzrlib.repofmt.pack_repo import Packer
2334
2335
        mutter("Using fetch logic to copy between %s(%s) and %s(%s)",
2335
2336
               self.source, self.source._format, self.target, self.target._format)
2336
2337
        self.count_copied = 0
2358
2359
            except errors.NoSuchRevision:
2359
2360
                raise errors.InstallFailed([revision_id])
2360
2361
        packs = self.source._pack_collection.all_packs()
2361
 
        pack = self.target._pack_collection.create_pack_from_packs(
2362
 
            packs, '.fetch', revision_ids,
2363
 
            )
 
2362
        pack = Packer(self.target._pack_collection, packs, '.fetch',
 
2363
            revision_ids).pack()
2364
2364
        if pack is not None:
2365
2365
            self.target._pack_collection._save_pack_names()
2366
2366
            # Trigger an autopack. This may duplicate effort as we've just done