mercurial/help.py
changeset 37092 ef6215df2402
parent 37091 979c8ce9022d
child 37134 6890b7e991a4
equal deleted inserted replaced
37091:979c8ce9022d 37092:ef6215df2402
    85         if shortopt:
    85         if shortopt:
    86             so = '-' + shortopt
    86             so = '-' + shortopt
    87         lo = '--' + longopt
    87         lo = '--' + longopt
    88 
    88 
    89         if isinstance(default, fancyopts.customopt):
    89         if isinstance(default, fancyopts.customopt):
    90             default = default.defaultvalue
    90             default = default.getdefaultvalue()
    91         if default and not callable(default):
    91         if default and not callable(default):
    92             # default is of unknown type, and in Python 2 we abused
    92             # default is of unknown type, and in Python 2 we abused
    93             # the %s-shows-repr property to handle integers etc. To
    93             # the %s-shows-repr property to handle integers etc. To
    94             # match that behavior on Python 3, we do str(default) and
    94             # match that behavior on Python 3, we do str(default) and
    95             # then convert it to bytes.
    95             # then convert it to bytes.