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

  • Committer: Andrew Bennetts
  • Date: 2009-03-12 08:50:04 UTC
  • mto: This revision was merged to the branch mainline in revision 4142.
  • Revision ID: andrew.bennetts@canonical.com-20090312085004-tshz11l4qpcmnxjc
Fix performance regression (many small round-trips) when pushing to a remote pack, and tidy the 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