~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-24 13:40:38 UTC
  • mfrom: (3193.8.32 guess-renames)
  • Revision ID: pqm@pqm.ubuntu.com-20090324134038-bfrsas8eleeoiv0a
(abentley) Add guess-renames command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import warnings
23
23
 
24
24
from bzrlib import (
25
 
    counted_lock,
26
25
    errors,
27
26
    osutils,
28
27
    transactions,
86
85
    This class is now deprecated; code should move to using the Transport
87
86
    directly for file operations and using the lock or CountedLock for
88
87
    locking.
89
 
    
90
 
    :ivar _lock: The real underlying lock (e.g. a LockDir)
91
 
    :ivar _counted_lock: A lock decorated with a semaphore, so that it 
92
 
        can be re-entered.
93
88
    """
94
89
 
95
90
    # _lock_mode: None, or 'r' or 'w'
116
111
        self._lock = lock_class(transport, esc_name,
117
112
                                file_modebits=self._file_mode,
118
113
                                dir_modebits=self._dir_mode)
119
 
        self._counted_lock = counted_lock.CountedLock(self._lock)
120
114
 
121
115
    def create_lock(self):
122
116
        """Create the lock.
152
146
 
153
147
        :deprecated: Replaced by BzrDir._find_modes.
154
148
        """
155
 
        # XXX: The properties created by this can be removed or deprecated
156
 
        # once all the _get_text_store methods etc no longer use them.
157
 
        # -- mbp 20080512
158
149
        try:
159
150
            st = self._transport.stat('.')
160
151
        except errors.TransportNotPossible: