Why is None an illegal revision property value?
John Arbash Meinel
john at arbash-meinel.com
Fri Aug 28 20:14:29 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Ian Clatworthy wrote:
> I'm in the process of trying to make fast-export/import round-trip
> bzr.dev and I'm running into some issues around properties. In
> particular, there are 67 cases where the 'bugs' property is empty and/or
> None which is currently being treated as None by the exporter. I'm
> fixing that so that an empty string stays an empty string but it raises
> a question in my mind ...
> The import is falling over because None is an illegal property value.
> Why do we have that rule, i.e. why don't we allow None as a legal
> property value? Why is an empty string legal but None not?
> If there's no good reason, any objections to a small patch to change it?
> If nothing else, it will help roundtripping from/to other systems that
> may allow that value.
> Ian C.
Properties are key:value pairs, where the key is a subset of ASCII and
the value is a Unicode string.
My best guess is that we just cannot represent None in most of our
serialization formats. The best you get is the empty string.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the bazaar