~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.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:
33
33
)
34
34
from bzrlib.branch import BranchReferenceFormat
35
35
from bzrlib.bzrdir import BzrDir, RemoteBzrDirFormat
36
 
from bzrlib.decorators import needs_read_lock, needs_write_lock
 
36
from bzrlib.decorators import needs_read_lock, needs_write_lock, only_raises
37
37
from bzrlib.errors import (
38
38
    NoSuchRevision,
39
39
    SmartProtocolError,
1084
1084
        else:
1085
1085
            raise errors.UnexpectedSmartServerResponse(response)
1086
1086
 
 
1087
    @only_raises(errors.LockNotHeld, errors.LockBroken)
1087
1088
    def unlock(self):
1088
1089
        if not self._lock_count:
1089
1090
            return lock.cant_unlock_not_held(self)
2387
2388
            return
2388
2389
        raise errors.UnexpectedSmartServerResponse(response)
2389
2390
 
 
2391
    @only_raises(errors.LockNotHeld, errors.LockBroken)
2390
2392
    def unlock(self):
2391
2393
        try:
2392
2394
            self._lock_count -= 1