D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-22 Thread yuja (Yuya Nishihara)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-21 Thread dploch (Daniel Ploch)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-21 Thread indygreg (Gregory Szorc)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-21 Thread durin42 (Augie Fackler)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-21 Thread dploch (Daniel Ploch)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-21 Thread dploch (Daniel Ploch)
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=5981 REVISION DETAIL https://phab.mercurial-scm.org/D2090 AFFECTED FILES mercurial/fancyopts.py CHANGE

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-20 Thread indygreg (Gregory Szorc)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-20 Thread dploch (Daniel Ploch)
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,

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-14 Thread durin42 (Augie Fackler)
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,

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-07 Thread dploch (Daniel Ploch)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-07 Thread indygreg (Gregory Szorc)
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

D2090: fancyopts: add support for custom multi-arg opts in fancyopts.py

2018-02-07 Thread dploch (Daniel Ploch)
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