# HG changeset patch # User Gregory Szorc # Date 1570497676 14400 # Node ID c32531444cdc6fa75dd2aca262ff9e0df038c188 # Parent 5617b748aad8a54d5efe93cf1f003caa489e32db notify: cast hash to bytes This is needed to avoid a str/bytes mismatch when interpolating a line or 2 later. Differential Revision: https://phab.mercurial-scm.org/D7021 diff -r 5617b748aad8 -r c32531444cdc hgext/notify.py --- a/hgext/notify.py Sat Oct 05 13:39:35 2019 -0700 +++ b/hgext/notify.py Mon Oct 07 21:21:16 2019 -0400 @@ -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,