set_stacked_on_location leaves a locked repossitory with an unlocked fallback repository

Bug #283479 reported by Michael Hudson-Doyle
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

This may be related to 283457, or at least easiest to fix at the same time:

mwh@grond:repro$ bzr init --1.6 a
Standalone tree (format: 1.6)
Location:
  branch root: a
mwh@grond:repro$ bzr init --1.6 b
Standalone tree (format: 1.6)
Location:
  branch root: b
mwh@grond:repro$ cd a
mwh@grond:a$ python2.5
Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from bzrlib import branch
>>> b = branch.Branch.open('.')
>>> b.lock_write()
'982x9skvm333rkpyrzku'
>>> b.set_stacked_on_url('../b')
>>> b.unlock()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1519, in unlock
    self.repository.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1876, in unlock
    repo.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1878, in unlock
    self.control_files.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockable_files.py", line 282, in unlock
    raise errors.LockNotHeld(self)
bzrlib.errors.LockNotHeld: Lock not held: LockableFiles(lock, file:///home/mwh/tmp/repro/b/.bzr/repository/)
>>>

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

r4292 of bzr.dev fixes this.

Changed in bzr:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.