##// END OF EJS Templates
py3: fix broken man page generation, it was generating `(default: NUL*)`...
Kyle Lippincott -
r45509:1a4b9b60 stable
parent child Browse files
Show More
@@ -40,6 +40,7 b' from mercurial.i18n import ('
40 gettext,
40 gettext,
41 _,
41 _,
42 )
42 )
43 from mercurial.utils import stringutil
43
44
44 table = commands.table
45 table = commands.table
45 globalopts = commands.globalopts
46 globalopts = commands.globalopts
@@ -85,7 +86,9 b' def get_opts(opts):'
85 if b'\n' in desc:
86 if b'\n' in desc:
86 # only remove line breaks and indentation
87 # only remove line breaks and indentation
87 desc = b' '.join(l.lstrip() for l in desc.split(b'\n'))
88 desc = b' '.join(l.lstrip() for l in desc.split(b'\n'))
88 desc += default and _(b" (default: %s)") % bytes(default) or b""
89 if default:
90 default = stringutil.forcebytestr(default)
91 desc += _(b" (default: %s)") % default
89 yield (b", ".join(allopts), desc)
92 yield (b", ".join(allopts), desc)
90
93
91
94
General Comments 0
You need to be logged in to leave comments. Login now