~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
        # incorrect.  It's possible some other servers or filesystems will
241
241
        # have a similar bug allowing someone to think they got the lock
242
242
        # when it's already held.
 
243
        #
 
244
        # See <https://bugs.edge.launchpad.net/bzr/+bug/498378> for one case.
 
245
        #
 
246
        # Strictly the check is unnecessary and a waste of time for most
 
247
        # people, but probably worth trapping if something is wrong.
243
248
        info = self.peek()
244
249
        self._trace("after locking, info=%r", info)
 
250
        if info is None:
 
251
            raise LockFailed(self, "lock was renamed into place, but "
 
252
                "now is missing!")
245
253
        if info['nonce'] != self.nonce:
246
254
            self._trace("rename succeeded, "
247
255
                "but lock is still held by someone else")