mercurial/help.py
changeset 32619 d110fb58424c
parent 32615 c9318beb7c1a
child 33499 0407a51b9d8c
equal deleted inserted replaced
32618:d3e1c5b4986c 32619:d110fb58424c
    82         so = ''
    82         so = ''
    83         if shortopt:
    83         if shortopt:
    84             so = '-' + shortopt
    84             so = '-' + shortopt
    85         lo = '--' + longopt
    85         lo = '--' + longopt
    86         if default:
    86         if default:
    87             desc += _(" (default: %s)") % default
    87             # default is of unknown type, and in Python 2 we abused
       
    88             # the %s-shows-repr property to handle integers etc. To
       
    89             # match that behavior on Python 3, we do str(default) and
       
    90             # then convert it to bytes.
       
    91             desc += _(" (default: %s)") % pycompat.bytestr(default)
    88 
    92 
    89         if isinstance(default, list):
    93         if isinstance(default, list):
    90             lo += " %s [+]" % optlabel
    94             lo += " %s [+]" % optlabel
    91             multioccur = True
    95             multioccur = True
    92         elif (default is not None) and not isinstance(default, bool):
    96         elif (default is not None) and not isinstance(default, bool):