~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

[merge] John, sftp and others

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
 
241
241
def pumpfile(fromfile, tofile):
242
242
    """Copy contents of one file to another."""
243
 
    tofile.write(fromfile.read())
 
243
    BUFSIZE = 32768
 
244
    while True:
 
245
        b = fromfile.read(BUFSIZE)
 
246
        if not b:
 
247
            break
 
248
        tofile.write(b)
244
249
 
245
250
 
246
251
def sha_file(f):