Repository.item_keys_introduced_by should not lock Repository

Robert Collins robertc at robertcollins.net
Fri Oct 19 00:53:56 BST 2007


On Thu, 2007-10-18 at 17:56 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I just noticed that inside Repository.item_keys_introduced_by we have a
> 'self.lock_read()' call and a 'self.unlock()' call.
> This really isn't a good thing, and is one of the reasons we see the "Failed to
>  unlock" errors when an operation is canceled by the user.
> 
> The problem is that you can't use a try/finally in a generator (because the
> generator is not guaranteed to finish.)
> 
> So instead, the api should be that it does something like:

Ack. File a bug?

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071019/981492e2/attachment.pgp 


More information about the bazaar mailing list