[darcs-users] DRAFT Proposal: Navigating the space of versions using Tree hashes
zooko at zooko.com
Tue Sep 7 12:22:08 UTC 2010
On Mon, Sep 6, 2010 at 8:08 AM, Eric Kow <kowey at darcs.net> wrote:
> Perhaps adding a bit more motivation to point #1, if I'm reading Zooko
> on the ticket correctly, a typical use case for a short secure (fast)
> version identifier is where
> 1. Alice gets an identifier from her repository
> alice $ darcs show state --repo alice-repo
> 2. Alice tells Bob to get the version from the Central repo
> (centralness not essential here, just to help imagine).
> Email to Bob: Hey Bob, why don't you grab coffee0123456789abcdef
> from the central repository
> 3. Bob gets the repo as identified:
> bob $ darcs get http://example.com/central --state coffee0123456789abcdef
> 4. Now Bob and Alice know they have the same repo even though
> they didn't directly exchange any patches.
Follow-on use case: Alice writes some code to automatically finds out
your --state hash and bake that hash into your version number.
(Currently something like this is done for mercurial by hgdistver 
and for git by Brian's Warner's Python setup script .) So Alice
writes a tool (or contributes a patch to darcsver ) which does so.
Charlie uses Alice's tool for his application. Doug downloads and uses
Doug says "Hey Charlie, here is a bug report for your application."
Charlie says "Thanks. Please tell me the version number."
Doug says "It is version 2.0.2-coffee0123456789abcdef."
Charlie now knows exactly which version, from his centralized
repository, was used to build the application in which Doug found the
bug. Also note that Charlie now knows whether the application that
Doug is using *was* built from Charlie's centralized repository or
not. If the code that went into that application is not present in
Charlie's repository at all then Charlie will know that Doug is using
an application built from a different repository.
This last feature is something that a simple version number such as
"2.0.2" can't do.
More information about the darcs-users