[darcs-users] Usage styles: how do you go about recording changes?

David Roundy droundy at abridgegame.org
Thu Oct 7 11:23:02 UTC 2004


On Tue, Oct 05, 2004 at 06:14:28PM +0200, Juliusz Chroboczek wrote:
> > > David, what exactly is it that --partial does?  Or more precisely,
> > > which patches does --partial omit?
> 
> > IIRC, it only gets patches since the last tag.
> 
> Since the last checkpoint.  (darcs optimize --checkpoint)
> 
> Unfortunately, partial repositories are not as useful as they could
> be, as darcs will not automagically fetch remote patches missing from
> a partial repository when needed (e.g. when doing |darcs annotate| or
> |darcs diff|).

True, adding support for fetching remote patches would be nice, and not too
intrusive, if one were willing to be a bit wasteful.  One could just store
in each patch file a special "redirect" value, and then modify
read_patches_remote and read_patches_local to fetch this "redirect" patch
if desired.  Actually, this would be quite easy.  The catch would be that
then you'd still have to store one file per patch, so your space and
efficiency benefits would be reduced.  Another problem is that this would
be messed up if the patch order ever gets shuffled around on the repository
to which one is redirected.  Since a long-standing TODO item has been an
optimize option which reshuffles a repository order to improve efficiency,
this isn't a trivial problem.

A more efficient scheme would be to have a per-repository redirect URL, so
you wouldn't need to store each patch separately.  Indeed, if one were to
redirect the "inventory" rather than the patches, things look much better.
In that case, as long as the checkpoint patch to which you're redirecting
isn't changed in some way (e.g. unrecorded), you should be fine.  Only with
this method, a simple darcs changes would require network access, since
it'd need to look up the inventory on the remote machine.  :( Since there's
nothing to keep the remote inventory in the same order as the local one,
you'd almost certainly better off exclusively using one or the other.
Users also might prefer to not allow even the possibility that a command
like darcs changes --summary causing you to unexpectedly download the
entire repository....

> Ceterum censeo Aggelum non errare, darcs branches are not cheap
> enough.  There's some initial work on making them cheaper in the
> unstable branch (CurrentNone), and I intend to do some more of that
> when next confronted with a rainy Sunday.

In that case, I'll pray for rain... :)
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list