newformat format change

Aaron Bentley aaron.bentley at utoronto.ca
Fri Sep 30 19:42:00 BST 2005


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

Gustavo Niemeyer wrote:
>>But even without nested inventories, it would get pretty complex to
>>try and write RFC822 inventory information, since you have a lot of
>>files in an inventory, and a lot of information about each file.
> 
> 
> FileID: bzrignore-20050311232317-81f7b71efa2db11a
> Kind: file
> Name: .bzrignore
> 
> FileID: rsyncexclude-20050408053852-27e0a5928b6829f645beb2e6
> Kind: file
> Name: .rsyncexclude

RFC822 formatting doesn't group data that way.  Or rather, the
.rsyncexclude data would be the message body.

That looks more like ini format:
[bzrignore-20050311232317-81f7b71efa2db11a]
Kind="file"
Name=".bzrignore"

[rsyncexclude-20050408053852-27e0a5928b6829f645beb2e6]
Kind="file"
Name=".rsyncexclude"

> Does that look complex?

No, but you've omitted a lot of inventory data.  Most crucially, you
haven't specified how parent directories are indicated, or how to
specify additional metadata.

> In fact, it's not only simple, but also very fast to parse.

I don't think parsing speed is a significant factor for us.  Weave
extraction probably dwarfs it.

> So far I have not seen a case of nesting in bzr's storage that would
> make XML necessary.

Properties look like an obvious example to me.  You might also want to
check out http://bazaar.canonical.com/InventoryFormatV2 for an example
of nested inventories.

Of course, nothing's *necessary*.  We could write an alternative format.
 XML was picked mainly because of the broad tool support, and because it
solved issues like nesting and encoding.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPYb40F+nu1YWqI0RAt3cAKCDVL2jTZzOrAGi5AhZtlSYfiw4CACfZMaD
7l13ggW5/qQGZUwAZq96UJI=
=BUvh
-----END PGP SIGNATURE-----




More information about the bazaar mailing list