[darcs-devel] [patch1611] refactored convert darcs-2 command
Ben Franksen
bugs at darcs.net
Wed Oct 4 08:45:16 UTC 2017
New submission from Ben Franksen <ben.franksen at online.de>:
Author: Ben Franksen <ben.franksen at online.de>
Date: Fri Sep 29 22:09:08 CEST 2017
* refactored convert darcs-2 command
There is no need to merge anything when converting, we can just add the
patches to the new repo, committing our changes every 100 patches like we
did before.
To get the types right was a challenge. I added checkRepoIsNoRebase to
Darcs.Repository.Job so as not to pollute the command implementation
with a
host of obscure singleton types. Using foldFL_M requires two separate
newtype wrappers (W2 and W3) because the procedures we want to fold
simultaneously change two and three witnesses, respectively, and not just
the last one. It may be possible to encapsulate this somehow, but I leave
that to future refactorings. In spite of all that effort, we still need to
coerce the repo parameter in two places, which I extensively
documented: one
to work around the types of finalizeRepositoryChanges and
revertRepositoryChanges (which are not precise enough) and another one to
work around the type of withRepoLock (which is too restrictive).
----------
files: refactored-convert-darcs_2-command.dpatch
messages: 19696
nosy: bf
status: needs-screening
title: refactored convert darcs-2 command
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1611>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactored-convert-darcs_2-command.dpatch
Type: application/x-darcs-patch
Size: 31610 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20171004/4ac6bda4/attachment-0001.bin>
More information about the darcs-devel
mailing list