diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -161,6 +161,7 @@ logcmdutil, mail, patch, + pycompat, registrar, util, ) @@ -559,7 +560,10 @@ host = encoding.strtolocal(socket.getfqdn()) if messageidseed: messagehash = hashlib.sha512(ctx.hex() + messageidseed) - messageid = b'' % (messagehash.hexdigest()[:64], host) + messageid = b'' % ( + pycompat.sysbytes(messagehash.hexdigest()[:64]), + host, + ) else: messageid = b'' % ( ctx,