~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Robert Collins
  • Date: 2006-05-04 06:11:06 UTC
  • mto: (1697.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1701.
  • Revision ID: robertc@robertcollins.net-20060504061106-dea34f7ad6b4855a
Make LockDir.unlock check the lock is still intact.

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
        # rename before deleting, because we can't atomically remove the whole
219
219
        # tree
220
220
        tmpname = '%s/releasing.%s.tmp' % (self.path, rand_chars(20))
 
221
        # gotta own it to unlock
 
222
        self.confirm()
221
223
        self.transport.rename(self._held_dir, tmpname)
222
224
        self._lock_held = False
223
225
        self.transport.delete(tmpname + self.__INFO_NAME)