Related: http://bugs.darcs.net/patch1550 (remove the match option hack
for clone)
(The current text is mostly adapted from Ben's mail:)
* the clone command uses --to-XXX flags (albeit internally in converts
them to --XXX flags only because some function expects --XXX flags but
actually meaning --to-XXX :-) )
* show files/contents, dist, and annotate all take --patch/--match but
what they actually do is --to-patch, since they use the same function
(annotate: getOnePatchset) as clone does, or a similar one
(others: getNonrangeMatch). It should be better to change the UI of
these other commands (from --xxx to --to-xxx).
The flag list transformation of the clone command remains a bad hack
andwe should rather not duplicate it for the other commands. Instead,
the matching code, especially have/getNonrangeMatch should be fixed
to accept the --to-xxx flags. Note that for none of these commands
selecting a single patch makes much sense. They all refer to some
state of the repository, so they really should use --to-xxx.
Furthermore, I think that (for reasons of consistency and orthogonality)
all of annotate, show files/contents, and dist should accept --context,
too, and clone should support --index (in the sense of --to-index,
perhaps renaming the option) i.e. all should accept the same set of
matching options. We could then re-factor the implementation as well as
the documentation for the match options for these commands.
Note that none of the mentioned commands use patch selection so there is
no worry about selecting one or multiple patches.
Addendum by Guillaume: we should try to document (graphically, on the
wiki) the effects of matchers on every command. If possible, before
attempting at fixing this issue.
|