~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

Merge bzr.dev 4734 in preparation for NEWS updates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
""")
33
33
 
34
34
from bzrlib.decorators import (
35
 
    needs_read_lock,
36
 
    needs_write_lock,
 
35
    only_raises,
37
36
    )
38
37
from bzrlib.symbol_versioning import (
39
38
    deprecated_in,
221
220
        """Setup a write transaction."""
222
221
        self._set_transaction(transactions.WriteTransaction())
223
222
 
 
223
    @only_raises(errors.LockNotHeld, errors.LockBroken)
224
224
    def unlock(self):
225
225
        if not self._lock_mode:
226
226
            return lock.cant_unlock_not_held(self)