~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
                self._FTP_instance = None
295
295
                return self.get(relpath, decode, retries+1)
296
296
 
297
 
    def put(self, relpath, fp, mode=None, retries=0):
 
297
    def put_file(self, relpath, fp, mode=None, retries=0):
298
298
        """Copy the file-like or string object into the location.
299
299
 
300
300
        :param relpath: Location to put the contents, relative to base.
333
333
            else:
334
334
                warning("FTP temporary error: %s. Retrying.", str(e))
335
335
                self._FTP_instance = None
336
 
                self.put(relpath, fp, mode, retries+1)
 
336
                self.put_file(relpath, fp, mode, retries+1)
337
337
        except EOFError:
338
338
            if retries > _number_of_retries:
339
339
                raise errors.TransportError("FTP control connection closed during PUT %s."
342
342
                warning("FTP control connection closed. Trying to reopen.")
343
343
                time.sleep(_sleep_between_retries)
344
344
                self._FTP_instance = None
345
 
                self.put(relpath, fp, mode, retries+1)
 
345
                self.put_file(relpath, fp, mode, retries+1)
346
346
 
347
347
    def mkdir(self, relpath, mode=None):
348
348
        """Create a directory at the given path."""
365
365
        except ftplib.error_perm, e:
366
366
            self._translate_perm_error(e, abspath, unknown_exc=errors.PathError)
367
367
 
368
 
    def append(self, relpath, f, mode=None):
 
368
    def append_file(self, relpath, f, mode=None):
369
369
        """Append the text in the file-like object into the final
370
370
        location.
371
371
        """