[darcs-devel] [patch1550] remove the match option hack for clone

Guillaume Hoffmann guillaumh at gmail.com
Mon Sep 4 11:47:29 UTC 2017


I agree with everything you said.
Then I am going to open an issue whose proposal is the contents of
your last mail, and rollback the current patch.

Guillaume

2017-08-20 14:26 GMT-03:00 Ben Franksen <bugs at darcs.net>:
>
> Ben Franksen <ben.franksen at online.de> added the comment:
>
> gh: I tested this on an example repo and it appears you are right: even
> though the old version converts --to-patch to --patch, what it actually
> does is more like what we'd expect from --to-patch. I should have
> written (and run) some tests before making this change. I also think
> that --to-xxx is the more useful behavior.
>
> Still, there is one aspect of the patch that speaks for it: it /does/
> make clone consistent with show files/contents, dist, and annotate.
> These 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). But I think now that
> it is better to change the UI of these other commands (from --xxx to
> --to-xxx) rather than clone.
>
> However, the flag list transformation remains a bad hack and I would
> 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.
>
> __________________________________
> Darcs bug tracker <bugs at darcs.net>
> <http://bugs.darcs.net/patch1550>
> __________________________________
> _______________________________________________
> darcs-devel mailing list
> darcs-devel at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/darcs-devel


More information about the darcs-devel mailing list