mercurial/help.py
changeset 32619 d110fb58424c
parent 32615 c9318beb7c1a
child 33499 0407a51b9d8c
--- a/mercurial/help.py	Thu Jun 01 23:08:23 2017 +0900
+++ b/mercurial/help.py	Sun May 28 15:49:29 2017 -0400
@@ -84,7 +84,11 @@
             so = '-' + shortopt
         lo = '--' + longopt
         if default:
-            desc += _(" (default: %s)") % default
+            # default is of unknown type, and in Python 2 we abused
+            # the %s-shows-repr property to handle integers etc. To
+            # match that behavior on Python 3, we do str(default) and
+            # then convert it to bytes.
+            desc += _(" (default: %s)") % pycompat.bytestr(default)
 
         if isinstance(default, list):
             lo += " %s [+]" % optlabel