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

Ben Franksen bugs at darcs.net
Sun Jan 10 14:53:12 UTC 2021


New submission from Ben Franksen <ben.franksen at online.de>:

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 at 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 at 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 at 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 at 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 at online.de>
Date:   Thu Nov  5 14:46:15 CET 2020
  * cleanup: inline copyPristineDirectoryTree

patch ba61025d2aa7f3dc0f0cfc9efb8452bead685e04
Author: Ben Franksen <ben.franksen at 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 at 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 at 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.

----------
files: factor-readrecorded-into-darcs_repository_pristine_readpristine.dpatch, patch-preview.txt, unnamed
messages: 22618
nosy: bf
status: needs-screening
title: make hashed pristine use the cache

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2146>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 39725 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20210110/51fe7b86/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: factor-readrecorded-into-darcs_repository_pristine_readpristine.dpatch
Type: application/x-darcs-patch
Size: 48920 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20210110/51fe7b86/attachment-0003.bin>
-------------- next part --------------
.






More information about the darcs-devel mailing list