[MERGE][RFC] Add simple revision serializer based on RIO.
jelmer at samba.org
Wed May 6 22:30:54 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Ian Clatworthy wrote:
> Ian Clatworthy has voted comment. Status is now: Semi-approved
> Comment: A performance improvement would be one of the main reasons
> for including this or otherwise. I'd like to see this patch
> resubmitted so that this serialiser is used in a proposed new
> development format. (At first glance, it looks like your changing
> the behaviour of an existing format?) I can then more easily
> benchmark its impact, report the results and vote accordingly.
The attached patch adds "development7-rich-root" that is basically
"development6-rich-root" that uses the RIO revision serializer. I
don't have any experience adding new repository formats, so I hope
I've updated all the right places. The testsuite passes, and I've at
least been able to manually initialize new repositories of this kind
and verified that they're actually using RIO (using "bzr cat-revision").
As I mentioned in my other mail, the main reason I think this change
is needed is because we currently can't cope with some special
characters in commit messages, revision properties or committer names
as XML doesn't allow us to. Whoever creates a Revision object has to
currently deal with escaping these characters, which is an abstraction
violation IMHO, as users of that API shouldn't have to worry about the
fact that the Revision is going to be serialized using XML.
We currently escape those characters where we create Revision objects
but we don't actually escape the escape character (\) so we can't
unescape them later (bzrlib/commit.py:605, bzr-git, bzr-svn). This
means we lose information when importing from svn or git, and this
breaks roundtripping. It blocks me from using dpush with Samba at the
moment for example, since the sha of a commit with a special character
in the commit message is different when extracting it from bzr.
We could of course fix also this by introducing a new XML
serialization format for revisions, but this is the last place where
we use XML and this seems like a good moment to drop it and use
something simpler instead.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15180 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090506/9bb0cd7b/attachment-0001.bin
More information about the bazaar