darcs

Patch 2146 make hashed pristine use the cache

Title make hashed pristine use the cache
Superseder Nosy List bf
Related Issues
Status needs-review Assigned To
Milestone

Created on 2021-01-10.14:53:11 by bf, last changed 2021-01-10.14:53:27 by bf.

Files
File name Status Uploaded Type Edit Remove
factor-readrecorded-into-darcs_repository_pristine_readpristine.dpatch bf, 2021-01-10.14:53:09 application/x-darcs-patch
patch-preview.txt bf, 2021-01-10.14:53:09 text/x-darcs-patch
unnamed bf, 2021-01-10.14:53:09 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg22618 (view) Author: bf Date: 2021-01-10.14:53:09
The main goal here is the last patch: to make use of the cache when handling
pristine files, bringing them on par with how we handle patches and
inventories. The rest are dependencies.

8 patches for repository http://darcs.net/screened:

patch 8ca83d6865ef69166b77bd87fcb01f95d2c6ef6d
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov  5 16:36:44 CET 2020
  * factor readRecorded into Darcs.Repository.Pristine.readPristine

patch 665fe08d512eb525283e130f51bf3889812c1ed9
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov  5 16:50:02 CET 2020
  * readHashedPristineRoot: fail with oldRepoFailMsg instead of returning Nothing

patch 6ece1acdbc944bd6a3fad7c538ea26c89f203cb7
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Nov  6 10:31:57 CET 2020
  * some cleanup in D.R.Repair
  
  The only non-obvious change here is that we no longer test if we are in a
  hashed repo in cleanupRepositoryReplay. But darcs check and darcs repair
  refuse to work on oldfashioned repos anyway.

patch 4ae470b13facd99e34af8acc775a5750c314bb6c
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Nov  8 08:28:28 CET 2020
  * cleanup: remove createPartialsPristineDirectoryTree
  
  The only remaining call site was in the dist command where we have no need
  to create a partial tree. As a result we can also remove copyPartialHashed
  and copyPartialsHashed from HashedIO.

patch 4e3995fbffa1f9b5eb35124b02e4de595b806e6e
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Nov  5 14:46:15 CET 2020
  * cleanup: inline copyPristineDirectoryTree

patch ba61025d2aa7f3dc0f0cfc9efb8452bead685e04
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Nov  8 14:22:44 CET 2020
  * specialize cleanHashdir to cleanPristineDir
  
  It makes no sense to take the hashed subdirectory as argument and then only
  do semething sensible if the argument is HashedPristineDir. Indeed we always
  passed it a HashedPristineDir.

patch cc6f463b406023a8274bdd7434ddc36379f2af61
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Nov  8 14:33:04 CET 2020
  * move gethashedFiles form Darcs.Repository.HashedIO to Darcs.Util.Tree.Hashed
  
  That it belongs there is seen by noting how many imports we save.

patch b4667cca4d8db5fd4068027f4537c6620a944ed5
Author: Ben Franksen <ben.franksen@online.de>
Date:   Mon Nov  9 15:30:24 CET 2020
  * make hashed pristine use the cache
  
  This changes the interface exposed by Darcs.Util.Tree.Hashed. Instead of
  taking the hashed directory (FilePath) as argument, we now take a Cache
  instead and use fetchFileUsingCache and writeFileUsingCache to perform any
  IO from/to the hashed files. As a by-product, this removes hidden
  dependencies on the current working directory for access to hashed pristine
  files, since Cache locations are absolute paths (or remote URLs).
  
  This requires that we make a case distinction writeFileUsingCache, which
  should use size-prefixes hashes only for patches and inventories.
Attachments
History
Date User Action Args
2021-01-10 14:53:12bfcreate
2021-01-10 14:53:27bfsetstatus: needs-screening -> needs-review