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

Jan Hudec bulb at ucw.cz
Wed May 24 09:41:17 BST 2006


On Mon, May 22, 2006 at 08:25:47 -0500, John Arbash Meinel wrote:
> 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.
> > 
> 
> +1 after re-reviewing it. Do we need another reviewer?

Sorry, I was busy with anothe things yesterday and did not get to mail.
Thanks for review. Now I need one more reviewer.

I don't think it got too much out of date, but I'll try to regenerate it as
soon as I get some hacking time.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060524/ec41e402/attachment.pgp 


More information about the bazaar mailing list