[darcs-devel] [issue2626] treat applyToWorking more uniformly

Ben Franksen bugs at darcs.net
Sun Jun 16 12:07:10 UTC 2019


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

We sould factor catching of IO exceptions into applyToWorking to 
reduce duplication, now that we do it uniformly whenever we call it.

We also sometimes call applyToWorking inside withSignalsBlocked but 
not uniformly. We do it for clone (when conflicts are marked), 
unrevert, mark-conflicts, and for pull and apply via 
standardApplyPatches. But not for rollback, revert, unrecord, 
replace, rebase suspend/unsuspend.

I fail to see the pattern here.

The apparent rationale for withSignalsBlocked is that an interrupt 
(user hitting Ctrl-C) would mean that changes may be applied 
partially, leaving the working tree in an inconsistent state. Makes 
sense but again I can't see a reason not to do this uniformly, which 
means we can also factor it into applyToWorking.

----------
messages: 20844
nosy: bf
status: unknown
title: treat applyToWorking more uniformly

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


More information about the darcs-devel mailing list