On Thu, Jun 09, 2005 at 09:05:23PM -0600, Derek Scherger wrote:
> $ monotone --db foobar.db export $HOME/foobar/repos
> monotone: exporting $HOME/foobar/repos/files
> monotone: exporting $HOME/foobar/repos/manifests
> monotone: exporting $HOME/foobar/repos/revisions
> monotone: exporting $HOME/foobar/repos/keys
> monotone: exporting $HOME/foobar/repos/certs
>
> which would write all of the files, manifests, revisions, public keys
> and certs from foobar.db to the filesystem, using sha1 hashes as
> filenames. The contents plain text, or base64, gzipped blobs as
> required. Presumably export would be smart enough to only export things
> that don't already exist on the filesystem.
Full-blown "merkle directories" is just this, plus:
-- we split each directory into subdirectories; so we have
files/00/
files/01/
...
files/ff/
instead of just a flat files/. This is generally considered a
good idea anyway.
-- we write out an advisory file to each directory, giving some
hashes of the contents of each subdirectory. This file allows
dramatically more efficient push/pull operations, while it can be
ignored by clients that would rather just scan everything by
hand.
It's actually really not that complicated, I'm sort of surprised that
no-one has done it yet :-) Especially I'm surprised the git people
haven't picked it up, though I guess their need to use this
representation as their repo as well might cause locking issues on
updating the merkle files.
-- Nathaniel
--
In mathematics, it's not enough to read the words
you have to hear the music
_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel