[bug] unlock branch if we fail to lock repo
Robert Collins
robertc at robertcollins.net
Fri Jun 30 19:25:55 BST 2006
On Fri, 2006-06-30 at 13:19 -0500, John Arbash Meinel wrote:
> Okay, I'll go ahead and do a once over to make sure we are doing the
> right thing.
>
> Is there a good way to test two-phase without doing fake objects? Right
> now the easiest way to test it is to create a Branch, but override
> .repository with an instrumented one that forces the lock_write to fail.
yes, lock the repository for write, then lock the branch. *boom*.
i.e.
b = self.make_branch()
b.repository.lock_write()
b.lock_write()
should trigger an exception.
> Also, should we be asserting that this works across all branch formats?
Yes.
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: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060701/f17b1b86/attachment.pgp
More information about the bazaar
mailing list