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

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Thu Feb 22 08:22:24 EST 2018


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 `_listopt()`.

If we make `_listopt` public and start putting it into the static command
table, things will go wrong.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2090

To: dploch, #hg-reviewers, durin42, indygreg
Cc: yuja, durin42, indygreg, mercurial-devel


More information about the Mercurial-devel mailing list