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

Aaron Bentley aaron.bentley at utoronto.ca
Wed May 31 15:18:55 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

> The
> bzrlib.properties.register_property function can ensure that -- core
> properties will be defined in the bzrlib.properties module itself, so
> they can be inserted in the registry directly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEfaXO0F+nu1YWqI0RAj7xAJ9JZEMYf/jj620aw6ONp221gyphxgCeO8hW
qLQJJ2lYOXWXRUhuHN7YZ3U=
=WHeV
-----END PGP SIGNATURE-----




More information about the bazaar mailing list