/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: Martin Pool
  • Date: 2007-10-25 01:24:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2946.
  • Revision ID: mbp@sourcefrog.net-20071025012451-pvqf4umf0efueoqr
unlock while in a write group now aborts the write group, unlocks, and errors.

Also, RemoteRepository.unlock() sends the unlock rpc even if there was an error
unlocking the vfs-based repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1534
1534
 
1535
1535
    def unlock(self):
1536
1536
        if self._write_lock_count == 1 and self._write_group is not None:
 
1537
            self.abort_write_group()
 
1538
            self._transaction = None
 
1539
            self._write_lock_count = 0
1537
1540
            raise errors.BzrError(
1538
 
                'Must end write groups before releasing write locks.')
 
1541
                'Must end write group before releasing write lock on %s'
 
1542
                % self)
1539
1543
        if self._write_lock_count:
1540
1544
            self._write_lock_count -= 1
1541
1545
            if not self._write_lock_count: