[MERGE][RFC] Add simple revision serializer based on RIO.
Jelmer Vernooij
jelmer at vernstok.nl
Mon May 11 13:35:36 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> 2009/4/15 Jelmer Vernooij <jelmer at vernstok.nl>:
>> Attached is an updated version of my RIOSerializer patch. It was
>> originally sent against brisbane-core.
>>
>> It would be nice if it could make it into the stable format for 1.15. If
>> it is accepted it needs to be changed to be included in that rather than
>> in the existing CHK format.
>
> It sounds good to me in principle. Using XML has caused several other
> bugs beside the one you mentioned because it doesn't really guarantee
> to store strings byte-for-byte. It's also a while ago been a slightly
> annoying external dependency.
>
> However, before moving to RIO for future formats (and I say this
> having added the code) I would think hard about whether it should use
> bencode instead, which has the advantage of being able to represent
> somewhat more complex nesting (like dicts inside dicts) without
> needing a separate layer of encoding on top. Revisions are pretty
> simple but even there it may be useful. I'm not sure about the
> relative performance.
The nice thing of RIO is that it is a lot more human-readable (and
writable). This is something that I really would've liked in the
current (bencoded) tags file format, for example.
An alternative would be to not add the properties as a "sub" stanza
but rather as "property-<name>" in the top-level stanza, e.g.:
timestamp: 42424242
committer: Joe Hacker <joe at example.com>
property-nick: trunk
property-fixes: lp:4343
message: Commit message
or alternatively:
property: nick: trunk
property: fixes: lp:4242
Cheers,
Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iJwEAQECAAYFAkoIG5QACgkQDLQl4QYPZuVxtwP/TJ3Ajz/nXafPZJc82RwI1tSA
Wx2qfmjQr+CBPeoMmHujZ/El37g+Gk2L+bZQ6iLtXpVuEJ+f/DAfAvNwLbC/j7zR
Jr0nKzaqI1xP9jIS7kp1IIUAC6FBBz48HOoqKhsCFaBWEkqRCA2hu+brdk+MsZDM
O+jnqoZIpK1ma54Y3Xw=
=UYqc
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list