[darcs-users] breaking hashed files into multiple directories

Nicolas Pouillard nicolas.pouillard at gmail.com
Tue Sep 2 07:59:06 UTC 2008


Excerpts from Petr Rockai's message of Tue Sep 02 02:30:42 +0200 2008:
> Hi,
Hello,

> "Jason Dagit" <dagit at codersbase.com> writes:
> > Darcs tags might correspond rather well to packs.

I was cooking this idea and planned to expose it for the darcs-sprint.

> now, this is an interesting idea: it might be very well possible to (possibly
> even as a pure http optimisation, although direct access to such "packs" might
> be possible and desirable, so we don't need to keep the broken-out patch files
> around...) associate such a pack to each of the "archived" inventories. Again,
> this would lead to some complications for lazy repos, since now we would need
> to check that the file we are looking for has not been archived yet, and if so,
> fetch the pack instead of the single file.
> 
> I'd consider this to be a better alternative to checkpoints, as far as
> robustness goes -- however, checkpoints might give benefits when replaying
> patch applications is needed, although I'd argue that such operations shouldn't
> use the checkpoint anyway.
> 
> Some corner cases might arise, when a single missing patch might trigger a
> biggish download, although I suspect these would be rare enough to be ignored.
> 
> Moreover, there's some motivation to also pack hashed pristine somehow: here,
> there's no equivalent of tags and there's a definite need to keep around
> "partially useful" packs, where some files have gone out of date. This sounds
> like a much more laborious job, involving some heuristics, hand-waving and
> guesswork. I'm not sure how one'd best tackle it (might be the answer is "not
> at all").

You seem to view packs as a replacement for a part of patch files. I would
like to see it as just an optimization (e.g. darcs optimize --packs), that
don't affect the current repository representation but provides alternatives
faster to download (packed and compressed).

So the optimize command would be able make to an archive of all previous
patches at each tag, this file would have the same hashed name than the
inventory of the tag, suffixed by ".pck" for instance. When darcs get is
arrived to a tag, it first try to download the ".pck" file, it doesn't
exist continue as usual. When you get a pack you just unpack it, instead of
downloading more patches.

Whether the pack should contains all patches from the beginning or just the
patches until the previous tag is a good question. Perhaps the good answer is
to allow both ".full-packs" and ".tag-packs".

Best regards,

-- 
Nicolas Pouillard aka ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080902/b9707e92/attachment.pgp 


More information about the darcs-users mailing list