~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp.py

  • Committer: Robert Collins
  • Date: 2007-08-05 01:47:30 UTC
  • mto: (2592.3.77 repository)
  • mto: This revision was merged to the branch mainline in revision 2741.
  • Revision ID: robertc@robertcollins.net-20070805014730-qjx8zkquv3pagglo
* New method ``bzrlib.transport.Transport.get_recommended_page_size``.
  This provides a hint to users of transports as to the reasonable
  minimum data to read. In principle this can take latency and
  bandwidth into account on a per-connection basis, but for now it
  just has hard coded values based on the url. (e.g. http:// has a large
  page size, file:// has a small one.) (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
            self._translate_perm_error(e, abspath,
324
324
                unknown_exc=errors.FileExists)
325
325
 
 
326
    def recommended_page_size(self):
 
327
        """See Transport.recommended_page_size().
 
328
 
 
329
        For FTP we suggest a large page size to reduce the overhead
 
330
        introduced by latency.
 
331
        """
 
332
        return 64 * 1024
 
333
 
326
334
    def rmdir(self, rel_path):
327
335
        """Delete the directory at rel_path"""
328
336
        abspath = self._remote_path(rel_path)