[MERGE] Use slots consistently in InventoryEntry hierarchy (2)

John Arbash Meinel john at arbash-meinel.com
Mon May 22 14:22:54 BST 2006


Jan Hudec wrote:
> Hello,
> 
> Here is an updated version of the patch. It is again pullable from
> http://drak.ucw.cz/~bulb/bzr/bzr/inventory-slots
> 
> This patch updates InventoryEntry and all descendants to consistenly use
> __slots__.
> 
>  * Only attributes that are applicable for each kind are defined for it.
>  * Attempt to set invalid attribute. eg. symlink_target for a file, raises
>    AttributeError.
>  * Tests now actually test those errors.
>  * RootEntry.__eq__ was updated to make a super(...).__eq__ call. The old
>    version /did/ work correctly, since no attributes except children may ever
>    differ, but this is more future-proof---proplist will need to be compared
>    when properties go in.
>  * Removed the useless assert from xml5. However I left the reading of
>    attributes in _pack_entry check ie.kind rather than doing try/except or
>    getattr, since it's more explicit at what attributes should be present
>    where.
>  * Converted the kind attribute to constant readonly property() so it can't
>    be changed by mistake.
>  * I have kept the text_id property, which is only used when converting
>    version 4 branches. Maybe that code can be removed, but I'd prefer doing
>    that as a separate merge.
> 
> Attaching the patch for review.
> 

What ever happened with this. Are you still waiting for a review? Is it
up-to-date with the latest bzr.dev?

John
=:->


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


More information about the bazaar mailing list