~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: 2010-01-04 03:10:00 UTC
  • mfrom: (4927.1.1 merge-2.0-into-devel)
  • Revision ID: pqm@pqm.ubuntu.com-20100104031000-z5cdnjpq7phqxwf2
(andrew) 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")