~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-14 04:53:15 UTC
  • mfrom: (1910.7.21 cosmetic)
  • Revision ID: pqm@pqm.ubuntu.com-20060914045315-d646c86b3f4722f2
(Andrew Bennetts, Robert Collins, Martin Pool) Various cosmetic improvements to docstrings and comments throughout bzrlib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Implementation of Transport over SFTP, using paramiko."""
19
19
 
 
20
# TODO: Remove the transport-based lock_read and lock_write methods.  They'll
 
21
# then raise TransportNotPossible, which will break remote access to any
 
22
# formats which rely on OS-level locks.  That should be fine as those formats
 
23
# are pretty old, but these combinations may have to be removed from the test
 
24
# suite.  Those formats all date back to 0.7; so we should be able to remove
 
25
# these methods when we officially drop support for those formats.
 
26
 
20
27
import errno
21
28
import os
22
29
import random
85
92
 
86
93
 
87
94
class SFTPLock(object):
88
 
    """This fakes a lock in a remote location."""
 
95
    """This fakes a lock in a remote location.
 
96
    
 
97
    A present lock is indicated just by the existence of a file.  This
 
98
    doesn't work well on all transports and they are only used in 
 
99
    deprecated storage formats.
 
100
    """
 
101
    
89
102
    __slots__ = ['path', 'lock_path', 'lock_file', 'transport']
 
103
 
90
104
    def __init__(self, path, transport):
91
105
        assert isinstance(transport, SFTPTransport)
92
106