newformat format change

John A Meinel john at arbash-meinel.com
Fri Sep 30 17:11:15 BST 2005


Gustavo Niemeyer wrote:
>><revision version="0.5">
>>	<rev_info id="blahblah" put_stuff="here" />
>>	<parents>
>>	</parents>
>>	<meta-info>
>>	</meta-info>
>></revision>
> 
> 
> Given that this information is repeated on all revisions, and that
> those files will travel back and forth, perhaps another change that
> could be made is "compressing" those strings:

Well, back in the beginning of the project, it was determined to use XML 
for data storage. It was a really big benefit for the inventory, perhaps 
not quite as much for the Revision information.
But since we are using XML, we should try and use it as much as possible 
in the files, to be consistent. I think XML is very decent for long-term 
storage, it's a little extra verbose, but in something that may sit on 
disk a long time, being able to figure it out after some time is pretty 
nice.


> 
>   <rev committer="..." inv_id="..." ...>
>   <msg>...</msg>
>   <parents>
>     <rev_ref id="..." />
>     <rev_ref id="..." />
>   </parents>
>   </rev>

Honestly, a revision is pretty small, and I don't think you would save 
that many bits by compressing the names. Most of the bits are in the 
revision_id="" tag anyway. And one of the biggest savings is that we 
unified inventory_id and revision_id.

There is also a nice symmetry in that the XML object name mimics the 
variable in memory.

> 
> or even
> 
>   Committer: ...
>   Inventory: ...
>   Message:
>     ...
>   Parents:
>     ...
>     ...
> 
> in rfc822 style, which is weave-friendly.
> 

rfc822 style was a possibility. I believe it was discussed a long time 
ago. And I think XML was genuinely chosen (not just happened).
But you would have to grep the archives for the real discussions.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050930/ee8c5349/attachment.pgp 


More information about the bazaar mailing list