monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] another thought on merkle directories


From: Derek Scherger
Subject: [Monotone-devel] another thought on merkle directories
Date: Thu, 09 Jun 2005 21:05:23 -0600
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050403)

Hi folks, I've had the following idea floating around in my head for a
few days and thought it was time I got it out. This is a seemingly
simpler version of the merkle directory idea njs posted some time ago:

http://lists.gnu.org/archive/html/monotone-devel/2005-02/msg00068.html

If you can't use netsync for one reason or another or don't want to on
principle or something, I'm curious if this might help.

What I'm thinking is something like this:

$ 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.

Similarly:

$ monotone --db foobar.db import $HOME/foobar/repos
monotone: importing $HOME/foobar/repos/files
monotone: importing $HOME/foobar/repos/manifests
monotone: importing $HOME/foobar/repos/revisions
monotone: importing $HOME/foobar/repos/keys
monotone: importing $HOME/foobar/repos/certs

would read the files, manifests, revisions, public keys and certs from
the filesystem and store them in foobar.db. Presumably import would also
be smart enough to only import things from the filesystem that don't
already exist in the database. It would probably have to operate
similarly to netsync and not store revisions until their ancestors are
available and such.

Please note that the "monotone: ..." messages above are just for
illustration. Some other command for verifying the hashes of the
exported files would probably also be a good thing. Plain text export
might make this easy enough to do with a quick script around sha1sum.

Given this you could have rsync (or perhaps ftp or whatever) serving up
the exported database, so that others can get stuff or add to it. I'm
sure that this would be considerably less efficient than netsync, but it
might be useful in firewall constrained environments.

Thoughts? comments? volunteers!

Cheers,
Derek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]