darcs

Patch 2200 rename withRepoLocation -> withRepoDir (and 6 more)

Title rename withRepoLocation -> withRepoDir (and 6 more)
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2021-06-08.13:41:38 by bfrk, last changed 2021-12-05.14:17:47 by bfrk.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bfrk, 2021-06-08.13:41:37 text/x-darcs-patch
rename-withrepolocation-__-withrepodir.dpatch bfrk, 2021-06-08.13:41:37 application/x-darcs-patch
unnamed bfrk, 2021-06-08.13:41:37 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg22878 (view) Author: bfrk Date: 2021-06-08.13:41:37
Yet another small batch of random minor changes.

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

patch 5426a4db382ba479b9fc7266a3eecada814daa8c
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Feb 28 13:26:04 CET 2021
  * rename withRepoLocation -> withRepoDir

Belated/missing long comment: The function is effectively partial. I
experimented with using more precise typing to capture the difference
between a repo on the same machine (for which withRepoDir makes sense) and a
remote repo (for which it doesn't) but this didn't work out well.

patch 34bb677972c04cd7a08b290d81af9f6c21994c03
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Mar  3 15:06:03 CET 2021
  * D.R.Traverse: cut down the list of exported symbols

patch 65d4e6e15c2a7c7fa9510955de3ac306cde636fd
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Mar 14 23:19:02 CET 2021
  * add debug message in applyToWorking

patch a26f2863c0af17afb4ce5dd8ebc289a63b574488
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Apr  6 14:18:45 CEST 2021
  * factor out delaySealed

patch 79ea83f8198533e8a63644f84393999ef26b6cf4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Apr 18 17:59:17 CEST 2021
  * remove an obsolete FIXME comment

patch 41522f243acb0c02092e98b4772025352c62ed2b
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Apr 21 13:46:28 CEST 2021
  * add comment to updateHashes in convert import command

patch e2f414f5593af0deab55561660b17bd2208a0ac6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Apr 29 10:34:48 CEST 2021
  * cleanup code layout of Darcs.Util.Tree.expandUpdate
Attachments
msg22938 (view) Author: ganesh Date: 2021-11-27.16:33:40
> rename withRepoLocation -> withRepoDir

OK

> D.R.Traverse: cut down the list of exported symbols

OK

> add debug message in applyToWorking

OK

> factor out delaySealed

OK - do we have any tests that fail if we screw this up? I worry about
any refactorings with code like this :-/

>  * remove an obsolete FIXME comment
>  * add comment to updateHashes in convert import command
>  * cleanup code layout of Darcs.Util.Tree.expandUpdate

All fine.
msg22943 (view) Author: bfrk Date: 2021-12-03.07:09:10
>> factor out delaySealed
> 
> OK - do we have any tests that fail if we screw this up? I worry about
> any refactorings with code like this :-/

Yes, there is one regression test that fails if I replace delaySealed 
with plain unsaveInterleaveIO, namely tests/issue2293-laziness.sh . This 
test is pretty strong in that the repo we unpack has all inventories 
except the top-level one deleted (so even a plain `darcs log` fails) but 
we can still operate on the latest patch. It was indeed the failure of 
this test that convinced me that the extra unseal-then-seal step was 
necessary.

We may want to add a unit test, but this is not trivial.
msg22944 (view) Author: bfrk Date: 2021-12-05.14:17:46
> Yes, there is one regression test that fails if I replace delaySealed
> with plain unsaveInterleaveIO

I should add that it also fails if one tries to use pattern matching on 
the Sealed (which, as we know, is necessarily always strict) instead of 
the `unseal seal`.

Seeing the long comment you added in Darcs.Patch.Witnesses.Sealed 
regarding laziness of `unseal`, I made a further experiment and moved 
the unsafeUnseal directly into delaySealed and then made unseal strict. 
This fails the test network/lazy-clone; so at least we do know that 
there are some more places where we rely on the laziness of unseal 
(apart from uses of delaySealed, that is). I will investigate this further.
History
Date User Action Args
2021-06-08 13:41:38bfrkcreate
2021-06-08 13:42:35bfrksetstatus: needs-screening -> needs-review
2021-11-27 16:33:41ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg22938
2021-11-27 17:04:38ganeshsetstatus: accepted-pending-tests -> accepted
2021-12-03 07:09:11bfrksetmessages: + msg22943
2021-12-05 14:17:47bfrksetmessages: + msg22944