[MERGE][RFC] Add simple revision serializer based on RIO.

Jelmer Vernooij jelmer at samba.org
Wed May 6 22:30:54 BST 2009


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

Hi Ian,

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.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iJwEAQECAAYFAkoCAYwACgkQDLQl4QYPZuXazwP8CTyDvb6x3EQCwPQeOi3FckFo
8zikL+qv3IdwWXrfy0gs7/np54+fhTmJohAW+8QHqs1bLQu1+zoWgyuAGRvh1aYF
MIKx/au4PjEP7AQmujwDTGalMeM/YB5uiB01+C8Gmu3I3I3SmzVnnS6R7BBQNrOf
oQZhgrn+t0HlxAPGTxg=
=prnz
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rio-serializer2.diff
Type: text/x-diff
Size: 15180 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090506/9bb0cd7b/attachment-0001.bin 


More information about the bazaar mailing list