~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

  • Committer: Andrew Bennetts
  • Date: 2009-10-08 08:16:35 UTC
  • mfrom: (4732 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4734.
  • Revision ID: andrew.bennetts@canonical.com-20091008081635-hwoh2m0566lkqgqq
MergeĀ lp:bzr

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)