# HG changeset patch # User Matt Harbison # Date 2022-11-20 20:55:27 # Node ID f09bc2ed9100e1e24a52feaec3f5dbf5179cd11e # Parent 3324f39460e5a21539a0009b947ef694277ebc9d 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. diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -864,7 +864,7 @@ def help_( 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 @@ def help_( if missing_order: ui.develwarn( b'help categories missing from TOPIC_CATEGORY_ORDER: %s' - % missing_order + % stringutil.forcebytestr(missing_order) ) # Output topics per category.