~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

Ensure that lockable files calls finish() on transactions.:

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
        # TODO: Upgrade locking to support using a Transport,
197
197
        # and potentially a remote locking protocol
198
198
        if self._lock_mode:
199
 
            if self._lock_mode != 'w':
 
199
            if self._lock_mode != 'w' or not self.get_transaction().writeable():
200
200
                raise ReadOnlyError(self)
201
201
            self._lock_count += 1
202
202
        else: