[darcs-devel] [patch2038] finally complete transition to option system

Ben Franksen bugs at darcs.net
Tue Jun 23 16:43:58 UTC 2020


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

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 at 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 at 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 at online.de>
Date:   Tue Jun 23 00:21:15 CEST 2020
  * rename option reponame to newRepo

patch 289db1878ecea935bc29c4523a319dbc9a66d21b
Author: Ben Franksen <ben.franksen at 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 at online.de>
Date:   Tue Jun 23 14:29:52 CEST 2020
  * avoid use of matchAny in commands

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

patch 5d69a523b55fb16cbcdb3543e524f3cf7d513af6
Author: Ben Franksen <ben.franksen at 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 at 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 at 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.

----------
files: eliminate-darcsflag-list-hacking-for-newrepo-and-workrepodir.dpatch, patch-preview.txt, unnamed
messages: 22115
nosy: bf
status: needs-screening
title: finally complete transition to option system

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2038>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 45608 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200623/ecf95b22/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eliminate-darcsflag-list-hacking-for-newrepo-and-workrepodir.dpatch
Type: application/x-darcs-patch
Size: 73074 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200623/ecf95b22/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list