Storage internals: UUID

Max Bowsher _ at maxb.eu
Mon Jun 4 20:01:23 UTC 2012


On 04/06/12 20:15, Daniel Carrera wrote:
> Hello,
> 
> I'm interested in getting to know how Bazaar stores data internally
> (links would be welcome, the "developer" pages seem to cover more of the
> API rather than how things work). I have read in some forum somewhere
> that bzr uses UUIDs instead of SHA1 hashes like Mercurial and Git. If
> this is correct,

Sorry, but it is incorrect. Bazaar uses IDs, and those IDs are
constructed such that there there's good justification to believe them
to be universally unique, but they're not UUIDs in the sense of the
Internet Draft.

> I'd like to ask a few questions:
> 
> 1. Why was the decision made for UUIDs instead of SHA1? What were
> the pros and cons discussed?

I can't speak to the initial design decision, which was many years
before my time, but a couple of advantages that come to mind:

 * the ID is not inextricably tied to the binary format of the revision

 * and plugins which integrate with foreign VCSes have used this to map
   foreign revisions into Bazaar in various interesting ways

 * the IDs are more recognizable as such, and in the common case of
   non-foreign revisions, provide some minimal information (author,
   date) about the commit by mere inspection

> 2. Which version of UUID does bzr use?

As above, none.

> 3. Is anyone watching the evolution of the SHA3 specification?

There's no hashing in Bazaar's IDs, so this isn't particularly relevant.

Max.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20120604/179439b4/attachment.pgp>


More information about the bazaar mailing list