darcs

Patch 1611 refactored convert darcs-2 command

Title refactored convert darcs-2 command
Superseder Nosy List bf
Related Issues
Status needs-review Assigned To
Milestone

Created on 2017-10-04.08:45:16 by bf, last changed 2017-10-04.08:53:09 by bf.

Files
File name Status Uploaded Type Edit Remove
refactored-convert-darcs_2-command.dpatch bf, 2017-10-04.08:53:09 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg19696 (view) Author: bf Date: 2017-10-04.08:45:15
Author: Ben Franksen <ben.franksen@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).
Attachments
msg19697 (view) Author: bf Date: 2017-10-04.08:53:09
Screening a slightly amended version that makes W2 and W3 more symmetric.
Attachments
History
Date User Action Args
2017-10-04 08:45:16bfcreate
2017-10-04 08:50:52bfsetfiles: - refactored-convert-darcs_2-command.dpatch
2017-10-04 08:53:09bfsetstatus: needs-screening -> needs-review
files: + refactored-convert-darcs_2-command.dpatch
messages: + msg19697