~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-13 03:56:23 UTC
  • mfrom: (4118.1.5 fix-stackable-remote-repo)
  • Revision ID: pqm@pqm.ubuntu.com-20090313035623-vn0615cs6bd6590e
(andrew) Fix performance regression (many small round-trips) when
        pushing to a remote pack, and improve some tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3401
3401
    def fetch(self, revision_id=None, pb=None, find_ghosts=False,
3402
3402
            fetch_spec=None):
3403
3403
        """See InterRepository.fetch()."""
 
3404
        if self.target._client._medium._is_remote_before((1, 13)):
 
3405
            # The server won't support the insert_stream RPC, so just use
 
3406
            # regular InterPackRepo logic.  This avoids a bug that causes many
 
3407
            # round-trips for small append calls.
 
3408
            return InterPackRepo.fetch(self, revision_id=revision_id, pb=pb,
 
3409
                find_ghosts=find_ghosts, fetch_spec=fetch_spec)
3404
3410
        # Always fetch using the generic streaming fetch code, to allow
3405
3411
        # streaming fetching into remote servers.
3406
3412
        from bzrlib.fetch import RepoFetcher