~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-06 02:57:51 UTC
  • mto: (1946.2.10 reduce-knit-churn)
  • mto: This revision was merged to the branch mainline in revision 1988.
  • Revision ID: john@arbash-meinel.com-20060906025751-686364ac616b8e91
rename non_atomic_put_* to put_*non_atomic, and re-order the functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
425
425
            # raise the original with its traceback if we can.
426
426
            raise
427
427
 
428
 
    def _non_atomic_put_helper(self, relpath, writer, mode=None,
 
428
    def _put_non_atomic_helper(self, relpath, writer, mode=None,
429
429
                               create_parent_dir=False):
430
430
        abspath = self._remote_path(relpath)
431
431
 
471
471
                self._translate_io_exception(e, abspath, ': unable to open')
472
472
            _open_and_write_file()
473
473
 
474
 
    def non_atomic_put_file(self, relpath, f, mode=None,
 
474
    def put_file_non_atomic(self, relpath, f, mode=None,
475
475
                            create_parent_dir=False):
476
476
        """Copy the file-like object into the target location.
477
477
 
490
490
        """
491
491
        def writer(fout):
492
492
            self._pump(f, fout)
493
 
        self._non_atomic_put_helper(relpath, writer, mode=mode,
 
493
        self._put_non_atomic_helper(relpath, writer, mode=mode,
494
494
                                    create_parent_dir=create_parent_dir)
495
495
 
496
 
    def non_atomic_put_bytes(self, relpath, bytes, mode=None,
 
496
    def put_bytes_non_atomic(self, relpath, bytes, mode=None,
497
497
                             create_parent_dir=False):
498
498
        def writer(fout):
499
499
            fout.write(bytes)
500
 
        self._non_atomic_put_helper(relpath, writer, mode=mode,
 
500
        self._put_non_atomic_helper(relpath, writer, mode=mode,
501
501
                                    create_parent_dir=create_parent_dir)
502
502
 
503
503
    def iter_files_recursive(self):