Hi Everyone
Please dis-regard the previous send, I forgot to pass --edit-description...
These patches implement my new options subsystem. Apologies for the huge
integration patch. I am aware that this makes it difficult to review the
changes but I could not figure out how to split it into smaller pieces while
still maintaining a working or even buildable darcs. I rebased my changes
several times: first to keep up with other changes in screened, and second
because the design of the new system went through a number of re-factorings.
I think one large patch is still better than the "real" series of changes I
made over time. If someone has a good idea how to split the patch in a
sensible way, please come forward.
On the good side, all the tests succeed, which means I did not make too many
grave errors ;-) Also, the second patch (which adds the new options
subsystem) does not affect the rest of the darcs, so the integration patch
can be amended w/o touching it. More importantly, there is now the
possibility to get rid of all the low-level scanning and manipulating of the
list of DarcsFlag in a step-by-step fashion: the basic mechanisms are in
place and just have to be used throughout, something I did not complete,
partly because I ran out of steam and partly because I wanted to give you the
opportunity to intervene, before I make even more sweeping changes.
5 patches for repository http://darcs.net/screened:
Fri Jun 13 11:31:30 CEST 2014 Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
* Darcs.Repository.Flags: added Eq instance for UseIndex
Sun Jun 29 13:23:23 CEST 2014 Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
* Darcs.Repository.Flags: added Show instances for all types
Mon Jun 30 01:54:43 CEST 2014 Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
* replaced duplicate DiffAlgorithm in Darcs.Repository.Flags with re-export
Mon Jun 30 01:47:27 CEST 2014 Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
* added the re-designed options system, not yet used anywhere
Mon Jun 30 02:14:09 CEST 2014 Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
* integrate new options subsystem
The conversion is complete in the sense that the old Darcs.UI.Arguments is
now obsolete and can be removed. Command options are specified using the new
"typed" DarcsOption type from Darcs.UI.Options. All available tests succeed.
However, it is incomplete in the sense that there are still many places
where the list of DarcsFlag is scanned or manipulated directly. Removing
these direct accesses will be an on-going effort; when it is complete we can
replace [DarcsFlag] with an abstract data type.
This patch contains an almost complete re-implementation of
Darcs.UI.ArgumentDefaults under the new name Darcs.UI.Defaults. This adds a
new dependency on regex-applicative, see the comments in the code.
I have also made the tentative change of using a command specific
configuration record for two of the commands, namely "record" and "amend".
It remains to be seen whether this is the right approach and the other
commands should follow it.
Attachments
|