yuja added inline comments.
INLINE COMMENTS
> fancyopts.py:258
> +elif isinstance(default, list):
> +return _listopt(default[:])
> +elif type(default) is type(1):
Perhaps it's safer to make `defaultvalue()` a function returning
a copy of default, instead of passing a copy to `_li
This revision was automatically updated to reflect the committed changes.
dploch marked 2 inline comments as done.
Closed by commit rHG2ed36fec5321: fancyopts: add support for custom multi-arg
opts in fancyopts.py (authored by dploch, committed by ).
CHANGED PRIOR TO COMMIT
https://phab.mercuri
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.
Thanks for following up with the style changes!
INLINE COMMENTS
> dploch wrote in fancyopts.py:258-261
> It's actually wonkier than expected... :)
That's some PHP/JavaScript wonkiness
durin42 added a comment.
In https://phab.mercurial-scm.org/D2090#39120, @dploch wrote:
> In https://phab.mercurial-scm.org/D2090#38775, @indygreg wrote:
>
> > Out of curiosity, do you think it would be possible to implement an
option that behaved like a boolean when given in isolation
dploch added a comment.
In https://phab.mercurial-scm.org/D2090#38775, @indygreg wrote:
> Out of curiosity, do you think it would be possible to implement an option
that behaved like a boolean when given in isolation but also optionally
accepted a value? My use case is I want `hg serve -
dploch updated this revision to Diff 5981.
dploch marked 4 inline comments as done.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2090?vs=5330&id=5981
REVISION DETAIL
https://phab.mercurial-scm.org/D2090
AFFECTED FILES
mercurial/fancyopts.py
CHANGE
indygreg requested changes to this revision.
indygreg added a comment.
This revision now requires changes to proceed.
I like where this is going.
Out of curiosity, do you think it would be possible to implement an option
that behaved like a boolean when given in isolation but also optiona
dploch added a comment.
Friendly ping! This is my first commit so I'm not sure if more information
or changes are expected; please let me know if there's anything I'm missing.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2090
To: dploch, #hg-reviewers, durin
durin42 accepted this revision as: durin42.
durin42 added a comment.
I _really_ like where this is headed, but will refrain from queueing for now
since it's a bit of a conflict of interest.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2090
To: dploch, #hg-rev
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
indygreg added a comment.
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
c
dploch created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This allows for more complex multi-arg opt logic, such as "--sum 1 --sum 2"
-> 3, "--csv alice,bob --csv charlie" -> ["alice","bob","charlie"]. The
current support
12 matches
Mail list logo