[darcs-devel] [patch2146] make hashed pristine use the cache

Ben Franksen bugs at darcs.net
Sun Mar 28 08:26:04 UTC 2021


Ben Franksen <ben.franksen at online.de> added the comment:

>>   * make hashed pristine use the cache
> 
>> fsCreateHashedFile :: Cache -> BL.ByteString -> IO String
> 
> The doc comment for this needs a minor update to refer to 'Cache' rather
> than 'FilePath'.

Will fix that.

> I have a general question about the functionality. Does this actually
> mean that pristine wasn't being cached before and is now, or is it just
> an internal refactor?
> 
> I am a bit confused about what darcs does right now. I have a
> pristine.hashed folder in my global cache that has a lot of content, but
> none of it seems to have been updated for a few months, which might
> coincide with me updating to a recent darcs from a fairly old fork that
> I was previously running.

The pristine.hashed cache was only ever used by D.R.HashedIO. Apart from
things related to garbage collection of pristine, the only exported
function was copyHashed and the only user of that was
D.R.Pristine.createPristineDirectoryTree.

In other words: the cache was used only when creating a fresh working
tree equal to pristine, which happens for instance when cloning a repo
(but, I think, only when the remote repo does not have up-to-date packs).

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2146>
__________________________________


More information about the darcs-devel mailing list