[darcs-devel] [issue2677] pull --reorder fails to copy patches

Ganesh Sittampalam bugs at darcs.net
Wed May 26 11:15:13 UTC 2021


Ganesh Sittampalam <ganesh at earth.li> added the comment:

> That's exactly the point. When I started hacking on things related to
> the cache I experienced the same sort of confusion. The Cache type
> exported by Darcs.Util.Cache is really the set of all relevant (source
> and target) locations of patches, inventories, and pristine files that
> are considered when executing the current command. The actual global
> per-user cache is just one of those locations and the code in
> Darcs.Util.Cache is responsible for handling all the low-level details
> such as the order in which we search these locations when reading and
> where and how to store data when writing. It is also responsible for
> making sure that we *never* depend on the global cache for correct
> operation. Outside of that module, we simply call fetchFileUsingCache
> (to read a hashed file) and writeFileUsingCache (to write them to disk).

It might help if we rename the actual concept to "store" or something
like that. Then a cache is one kind of store and "this repo" is another
kind of store where we have to guarantee the presence of the patch. I
also wonder if our code is robust in cases where cross-filesystem
restrictions prevent hard linking.

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


More information about the darcs-devel mailing list