Prefixed stores

John A Meinel john at arbash-meinel.com
Wed Oct 5 19:28:35 BST 2005


Gustavo Niemeyer wrote:
> Greetings!
>
> The attached patch will add support for prefixed stores. This
> means that instead of using something like
>
>   .bzr/store/fileid1
>   .bzr/store/fileid2
>
> it will use something like
>
>   .bzr/store/ab/fileid1
>   .bzr/store/fe/fileid2
>
> and so on. The prefixes are created using the 8 lower bits of
> an adler32 checksum on the fileid (not the filename, meaning that
> "foobar.gz" and "foobar" go on the same slot).
>
> The patch will introduce branch format v6, but it will not
> force upgrade. Users will continue using v5 until they "bzr upgrade"
> the branch. Upgrading an older format (v0.0.4) will turn the
> branch into a v6 as well.

With the new weave format, the only thing that is stored this way is the
revision-store. I think what you have done is very nice since it helps
keep things in their place without having a directory fill up with 10k
revisions. And adler is faster to compute than sha.

I would like to see this make it into the bzr weave v5 format (I would
also like to see my reformatted inventory and revision texts make it in).

I don't know how settled the v5 format is. But I think both of these are
significant improvements. My reformatting changes the sha1 sum, but the
older reader can read it just fine (I didn't change the read code much,
mostly just write). If Robert was able to squeeze in text_version =>
revision before the major switch, would it be possible to bring these in
as well?

I realize eventually we have to actually switch, but dropping the
inventory by 1/2 the size seems worth it, and for windows to not have
10k files in the same directory also seems worth it.

John
=:->

>
> Have fun!
>
-------------- 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/20051005/557ee09a/attachment.pgp 


More information about the bazaar mailing list