hgext/notify.py
changeset 43164 c32531444cdc
parent 43117 8ff1ecfadcd1
child 43322 7d912413a3ae
--- 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'<hg.%s@%s>' % (messagehash.hexdigest()[:64], host)
+        messageid = b'<hg.%s@%s>' % (
+            pycompat.sysbytes(messagehash.hexdigest()[:64]),
+            host,
+        )
     else:
         messageid = b'<hg.%s.%d.%d@%s>' % (
             ctx,