[PATCH] Singleton Branches

John Arbash Meinel john at arbash-meinel.com
Thu May 26 17:59:16 BST 2005


Aaron Bentley wrote:

> John Arbash Meinel wrote:
> | It is very easy in code to have multiple requests for the same branch
> | object without realizing it. Because the filesystem is sometimes the
> | point of coordination, not the python code. Two portions of code saying
> | give me information about this file will probably have to allocate a
> | branch object to get it.
> |
> | I only really need a singleton Lock object, though it seemed reasonable
> | to put that in the Branch object.
>
> If you put it in the Branch object, then when the lock is write-locked,
> attempts to acquire the Branch must raise an exception.  And when it's
> read-locked, attempts to unlock the branch must raise an exception if
> the Branch is referenced in more than one place.
>
> Is that really the kind of thing you want?
>
> Aaron

I think it was necessary when branches automatically locked themselves.
However, with explicit locking of branches, no, I don't think it is the
right thing anymore.

John
=:->

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


More information about the bazaar mailing list