diff mercurial/help.py @ 40966:05abb5fb146a

help: use "default: on" instead of "default: True" "True" feels like a Python thing and not something that users should see. Differential Revision: https://phab.mercurial-scm.org/D5430
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 14 Dec 2018 13:20:00 -0800
parents 419d703115b0
children 8604f130eb43
line wrap: on
line diff
--- a/mercurial/help.py	Fri Dec 14 13:32:34 2018 -0800
+++ b/mercurial/help.py	Fri Dec 14 13:20:00 2018 -0800
@@ -168,7 +168,10 @@
             # 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)
+            defaultstr = pycompat.bytestr(default)
+            if default is True:
+                defaultstr = _("on")
+            desc += _(" (default: %s)") % defaultstr
 
         if isinstance(default, list):
             lo += " %s [+]" % optlabel