~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-20 02:51:29 UTC
  • mfrom: (1662.1.16 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060420025129-8e219a634d2d4dbc
(mbp) #36963, #3619, #39657, other cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
        LockError,
110
110
        LockNotHeld,
111
111
        NoSuchFile,
 
112
        PathError,
112
113
        ResourceBusy,
113
114
        UnlockableTransport,
114
115
        )
 
116
from bzrlib.trace import mutter
115
117
from bzrlib.transport import Transport
116
118
from bzrlib.osutils import rand_chars
117
119
from bzrlib.rio import RioWriter, read_stanza, Stanza
201
203
            self.transport.rename(tmpname, self._held_dir)
202
204
            self._lock_held = True
203
205
            self.confirm()
204
 
            return
205
 
        except (DirectoryNotEmpty, FileExists, ResourceBusy), e:
206
 
            pass
207
 
        # fall through to here on contention
208
 
        raise LockContention(self)
 
206
        except (PathError, DirectoryNotEmpty, FileExists, ResourceBusy), e:
 
207
            mutter("contention on %r: %s", self, e)
 
208
            raise LockContention(self)
209
209
 
210
210
    def unlock(self):
211
211
        """Release a held lock