~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-31 10:01:15 UTC
  • mto: (5993.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5994.
  • Revision ID: v.ladeuil+lp@free.fr-20110531100115-bkea029bq5oki70l
Put the '\n' back into the formats and fix tests accordingly (reducing code duplication).

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        except FileExists:
115
115
            raise LockError('File %r already locked' % (self.path,))
116
116
 
 
117
    def __del__(self):
 
118
        """Should this warn, or actually try to cleanup?"""
 
119
        if self.lock_file:
 
120
            warning("SFTPLock %r not explicitly unlocked" % (self.path,))
 
121
            self.unlock()
 
122
 
117
123
    def unlock(self):
118
124
        if not self.lock_file:
119
125
            return
337
343
    # up the request itself, rather than us having to worry about it
338
344
    _max_request_size = 32768
339
345
 
 
346
    def __init__(self, base, _from_transport=None):
 
347
        super(SFTPTransport, self).__init__(base,
 
348
                                            _from_transport=_from_transport)
 
349
 
340
350
    def _remote_path(self, relpath):
341
351
        """Return the path to be passed along the sftp protocol for relpath.
342
352