Mercurial > hg
changeset 49628:f09bc2ed9100 stable
help: fix a py3 error interpolating Set into b'%s'
I can't reproduce it, but a coworker hit this with `hg help -v` with 6.2.3:
...
File "mercurial\help.pyc", line 865, in helplist
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'set'
I can confirm that the original expression fails in `hg debugshell`, and the new
one works. The second instance was found by searching for "%s", but PyCharm
detects a lot of variables as Any type, so I have no idea if there are other
lurking problems.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 Nov 2022 15:55:27 -0500 |
parents | 3324f39460e5 |
children | c4874ebe8644 |
files | mercurial/help.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/help.py Sat Nov 19 16:14:20 2022 +0100 +++ b/mercurial/help.py Sun Nov 20 15:55:27 2022 -0500 @@ -864,7 +864,7 @@ if missing_order: ui.develwarn( b'help categories missing from CATEGORY_ORDER: %s' - % missing_order + % stringutil.forcebytestr(missing_order) ) # List per category. @@ -897,7 +897,7 @@ if missing_order: ui.develwarn( b'help categories missing from TOPIC_CATEGORY_ORDER: %s' - % missing_order + % stringutil.forcebytestr(missing_order) ) # Output topics per category.