[darcs-users] darcs patch: refactor of SelectChanges (and 1 more)

Florent Becker florent.becker at ens-lyon.org
Mon Oct 6 19:20:09 UTC 2008


"Jason Dagit" <dagit at codersbase.com> writes:

> Florent,I've only glanced over the patches, but I'll try to
> give some good feedback anyway...Would you please be willing to send
> in 2 more patches on top of these to address the following: 1) Please
> haddock more of your newly added functions.2) Could you add some tests
> against your new UI?
Ok, I will do that.

>Is the refactor motivated purely by the --lazy-deps option?  More
>explanation of what you're doing here would be nice.  Sometimes
>it's hard to infer your intentions >from the code.

The refactor is motivated mainly by the possibility of adding
--lazy-deps. It does have other benefits too, though:
 -the code is significantly shorter
 -it makes it possible to add more matching
abilities. For example, we could add matching to record. That way, we
could do darcs record --match 'not contains DRAFT' to only record hunks
without a DRAFT flag. Or even darcs record --match 'is haddock_comment'
once we have haskell code aware hunks.

Note that this refactor can be extended to make more code cleaner: we
could go further and not import Darcs.Arguments into SelectChanges if we
built the match criteria outside of SelectChanges.

Florent



More information about the darcs-users mailing list