diff -r 5f006f789373 -r 5392bf258049 hgext/hooklib/changeset_obsoleted.py --- a/hgext/hooklib/changeset_obsoleted.py Fri Jan 06 00:04:46 2023 -0500 +++ b/hgext/hooklib/changeset_obsoleted.py Fri Jan 06 00:05:14 2023 -0500 @@ -32,7 +32,10 @@ pycompat, registrar, ) -from mercurial.utils import dateutil +from mercurial.utils import ( + dateutil, + stringutil, +) from .. import notify configtable = {} @@ -98,7 +101,7 @@ try: msg = mail.parsebytes(data) except emailerrors.MessageParseError as inst: - raise error.Abort(inst) + raise error.Abort(stringutil.forcebytestr(inst)) msg['In-reply-to'] = notify.messageid(ctx, domain, messageidseed) msg['Message-Id'] = notify.messageid(