Patch 2038 finally complete transition to option system

Title finally complete transition to option system
Superseder Nosy List bf
Related Issues
Status needs-review Assigned To

Created on 2020-06-23.16:43:58 by bf, last changed 2020-06-30.09:31:57 by bf.

File name Status Uploaded Type Edit Remove
eliminate-darcsflag-list-hacking-for-newrepo-and-workrepodir.dpatch bf, 2020-06-23.16:43:56 application/x-darcs-patch
patch-preview.txt bf, 2020-06-23.16:43:56 text/x-darcs-patch
unnamed bf, 2020-06-23.16:43:56 text/plain
See mailing list archives for discussion on individual patches.
msg22115 (view) Author: bf Date: 2020-06-23.16:43:56
This cleans up the remaining few bits where we still accessed and
manipulated the list of DarcsFlags manually i.e. without going through an
Option. This means we can finally get rid of the commandParsedFlags member
of DarcsFlag and thus the parsedFlags type parameter of DarcsCommand, the
WrappedCommand type, and the associated complications in the code.

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

patch c7c565400f96649bc88838fd3bc5f6b9ead1902b
Author: Ben Franksen <ben.franksen@online.de>
Date:   Mon Jun 22 23:40:47 CEST 2020
  * eliminate DarcsFlag list hacking for NewRepo and WorkRepoDir
  To make this more uniform, the init command now takes the O.reponame option
  instead of O.repoDir, like all other commands that create a new repo (clone,
  convert darcs2, convert import). This is even compatible since we still
  support --repodir as an alias for --repo-name.
  Converting a normal argument to a DarcsFlag now uses the standard option API
  i.e. ounparse, see the new function Darcs.UI.Flags.withNewRepo.

patch e943a574ee71258731c56e459e5861881ce2d086
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 00:10:09 CEST 2020
  * replace combined option workRepo with a plain function
  This option was artificial in that no command actually specified it. I
  always found its presence in Darcs.UI.Options.All confusing.

patch 82764afae894ee45e1901c27206859d02aa63d0b
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 00:21:15 CEST 2020
  * rename option reponame to newRepo

patch 289db1878ecea935bc29c4523a319dbc9a66d21b
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 00:48:58 CEST 2020
  * remove DarcsFlag list hacking for match options
  This was used internally to convert to-xxx flags to plain xxx for the clone
  command. This is now done after converting to MatchFlags. This means
  Darcs.UI.Flags no longer has to export any DarcsFlag data constructors.

patch cdc4f80e519e11912b46f0ba84ae91363d44ce0f
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 14:29:52 CEST 2020
  * avoid use of matchAny in commands

patch 2165988e5457bce25154814f1437f86682760239
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 14:33:47 CEST 2020
  * fix: add missing cases in getMatchPattern

patch 5d69a523b55fb16cbcdb3543e524f3cf7d513af6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 14:39:55 CEST 2020
  * add comments about use of RemoteRepo DarcsFlag constructor

patch 548ab845da24163440e28bc4c34fe5b96830497a
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Jun 23 15:36:45 CEST 2020
  * remove option type parameter from DarcsCommand
  This is basically a complete rollback of
  patch 6ef3e49796ef64ae23bde58bfc4ea6720e8fd14d
  Author: Ganesh Sittampalam <ganesh@earth.li>
  Date:   Fri Nov 14 07:18:20 CET 2014
    * Make the options type used by a command into a type parameter.
  Made possible since we no longer do any low-level DarcsFlag hacking.
Date User Action Args
2020-06-23 16:43:58bfcreate
2020-06-30 09:31:57bfsetstatus: needs-screening -> needs-review