~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-04 02:25:11 UTC
  • mfrom: (4634.108.8 2.0)
  • mto: This revision was merged to the branch mainline in revision 4928.
  • Revision ID: andrew.bennetts@canonical.com-20100104022511-2tq2r9w2te84wzgs
Merge lp:bzr/2.0 into lp:bzr, including fixes for #343218, #495000, #495023, #494406 and #498378.

Show diffs side-by-side

added added

removed removed

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