[darcs-users] Colin Walters blogs on Arch changesets vs Darcs

David Roundy droundy at abridgegame.org
Mon Nov 22 12:37:08 UTC 2004


On Sun, Nov 21, 2004 at 08:11:14PM +0100, Juliusz Chroboczek wrote:
> > However, the idea has interesting promise for a (perhaps?) nice
> > treatment of creating darcs patches from tarballs.
> 
> Very interesting point.  Basically, you're suggesting the notion of a
> ``proto-repository'', which needs combining with a repository in order
> to be useful.

Yeah, except that for most simple operations (pull, record, send) you
wouldn't need to upgrade to a full repository, since these operations don't
require the full history.

> > tar zxvf darcs-hive-0.5.tar.gz
> > cd darcs-hive-0.5
> > ...hack, hack, hack...
> > # (oops, now I realize I want to contribute back...)
> > darcs optimize --from-hashed-tarball ../darcs-hive-0.5.tar.gz
> 
> Where does this get the full history from?
> 
>   $ cd darcs-hive-0.5
>   $ darcs optimize --current=full

The history would only go back to a tag, and would consist only of that
tag:

Starting with tag:
[TAG 1.0.1pre1
David Roundy <droundy at abridgegame.org>**20041121134516] 

Due to the way darcs breaks up the inventory (which really isn't such a
great name for the history...), you don't need to actually have the
contents of either the tag itself or the older history.

It may be that darcs will fail (even on simple operations--pull, record and
send) if it's missing the older parts of the inventory, but if that is the
case it means that this is an optimization opportunity, because we *know*
that darcs doesn't need to access that older data, so we would have the
opportunity to simultaneously make darcs work better with
proto-repositories, and to make darcs work faster and with less memory on
ordinary repositories.

I see this as a natural extension of the --partial flag of get.  Partial
repositories revealed places where we were reading patches that didn't
really need to be read, which lead to (admittedly minor) improvements in
darcs' efficiency.

One catch is that darcs optimize (with no flags) may need to be run on the
full repositories that are to interact with proto-repositories.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list