[Updated] D8639: py3: fix broken man page generation, it was generating `(default: NUL*)`
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Thu Jun 18 17:50:30 UTC 2020
spectral updated this revision to Diff 21663.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8639?vs=21661&id=21663
BRANCH
stable
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8639/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8639
AFFECTED FILES
doc/gendoc.py
CHANGE DETAILS
diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -40,6 +40,7 @@
gettext,
_,
)
+from mercurial.utils import stringutil
table = commands.table
globalopts = commands.globalopts
@@ -85,7 +86,9 @@
if b'\n' in desc:
# only remove line breaks and indentation
desc = b' '.join(l.lstrip() for l in desc.split(b'\n'))
- desc += default and _(b" (default: %s)") % bytes(default) or b""
+ if default:
+ default = stringutil.forcebytestr(default)
+ desc += _(b" (default: %s)") % default
yield (b", ".join(allopts), desc)
To: spectral, #hg-reviewers
Cc: mjacob, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200618/ebe96bf2/attachment-0002.html>
More information about the Mercurial-patches
mailing list