[BUG] cannot bind one branch in a repository to another

John A Meinel john at arbash-meinel.com
Mon May 8 17:25:55 BST 2006


I was trying to play around with changing the binding semantics, so that
we could bind against readonly branches.

In the process I tried to do this:

bzr init-repo foo
cd foo
bzr init a
cd a
echo a > a
bzr commit -m a
cd ..
bzr branch a b
cd b
bzr bind ../a

bzr: ERROR: Could not acquire lock LockDir(/.../.bzr/repository/lock)
/.../bzr.dev/bzrlib/lockable_files.py:107: UserWarning: file group
LockableFiles(<bzrlib.transport.local.LocalTransport
url=/.../b/.bzr/branch/>) was not explicitly unlocked


When I look, there is a pending.... directory left in the lock
directory. As best I can figure it, the above 'bind' is attempting to
lock other's repository, which is already locked, because it is the same
as self's repository.

I think this is an issue because we are issuing 2 lock_write() calls on
both branches. Most of the time we only lock one branch for writing (the
other branch for reading).

I'm not sure what the best solution is. But it brings us back to the
issue of wanting to lock the same location twice, because we arrive at
it from different code paths.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060508/7c3ae2a6/attachment.pgp 


More information about the bazaar mailing list