D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py
dploch (Daniel Ploch)
phabricator at mercurial-scm.org
Wed Feb 7 21:53:25 EST 2018
dploch added a comment.
In https://phab.mercurial-scm.org/D2090#34906, @indygreg wrote:
> The fancyopts code is some of the oldest in Mercurial. We've been wanting to rewrite it for a while. This patch seems like an interesting and more powerful direction to take the parser.
>
> Out of curiosity, do you have an intended use case in mind? Will that use case be in Mercurial itself or is this for an extension?
I didn't have a use case for Mercurial itself in mind, but I wouldn't be surprised if there was one. My intended use case is the 'csv' flag example in the commit description: We have a lot of flags in our internal extensions that require the ["alice,bob", "charlie"] -> ["alice", "bob", "charlie"] behavior, so it would be really nice to be able to declare a shareable customopt for these instead of needing to individually wrap every applicable `opts['flag']` lookup.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2090
To: dploch, #hg-reviewers
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list