/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

  • Committer: Robert Collins
  • Date: 2009-03-27 04:10:25 UTC
  • mfrom: (4208 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4216.
  • Revision ID: robertc@robertcollins.net-20090327041025-rgutx4q03xo4pq6l
Resolve NEWS conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
from cStringIO import StringIO
18
18
 
22
22
import warnings
23
23
 
24
24
from bzrlib import (
 
25
    counted_lock,
25
26
    errors,
26
27
    osutils,
27
28
    transactions,
85
86
    This class is now deprecated; code should move to using the Transport
86
87
    directly for file operations and using the lock or CountedLock for
87
88
    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.
88
93
    """
89
94
 
90
95
    # _lock_mode: None, or 'r' or 'w'
111
116
        self._lock = lock_class(transport, esc_name,
112
117
                                file_modebits=self._file_mode,
113
118
                                dir_modebits=self._dir_mode)
 
119
        self._counted_lock = counted_lock.CountedLock(self._lock)
114
120
 
115
121
    def create_lock(self):
116
122
        """Create the lock.
146
152
 
147
153
        :deprecated: Replaced by BzrDir._find_modes.
148
154
        """
 
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
149
158
        try:
150
159
            st = self._transport.stat('.')
151
160
        except errors.TransportNotPossible: