[MERGE] Use slots consistently in InventoryEntry hierarchy -- regenerated against new head. Seeking another reviewer.

John Arbash Meinel john at arbash-meinel.com
Wed May 31 15:26:52 BST 2006


Aaron Bentley wrote:
> Jan Hudec wrote:
>>> On Wed, May 31, 2006 at 09:15:28 -0400, Aaron Bentley wrote:
>>>> Also, it sounds like there should be namespaces for properties, so we
>>>> don't get people accidentally overriding core bzr attributes.
>>>
>>> You are right. Well if I use __dict__ for them (and it should make them
>>> slightly faster), they could conflict even with methods of
>>> InventoryEntry and I don't like renaming those. 
> 
> How important do you think it is to provide extended properties as
> InventoryEntry attributes?
> 
> I think I would be quite happy with ie.get_value('svn',
> 'svn:mime-type'), or ie[('svn', 'svn:mime-type')].
> 
>>> So I'd say perhaps core
>>> properties would use simple names and plugin ones would be required to
>>> take form of <pluginname>__<propertname> (double underscore, since plain
>>> name can contain underscore as well (eg. text_sha1)). 
> 
> My preference would be to use ':' as a namespace separator, or possibly
> '.'  I think requiring *a* namespace is good, but requiring it to be the
> plugin name would be too inflexible.
> 

I would tend to agree that extended properties should be handled
separately from core properties. The last plan was to handle them
differently in the xml (just like revision properties). Obviously Jan
may change that if he implements it.

I think a namespace is a good idea. I think Aaron's example has some
redundancy that could be eliminated. If we semi-require a namespace, we
could make it like:

ie.get_value('svn', 'mime-type')
or
ie.get_value('svn:mime-type')
I prefer the former, because then ie can handle namespaces however it
wants to.

I also agree that using a namespace of the plugin name is a little too
inflexible. You might have multiple plugins that all operate under the
same umbrella.

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/20060531/8cc8be5e/attachment.pgp 


More information about the bazaar mailing list