hgext/patchbomb.py
changeset 39155 1415b78869eb
parent 39154 4899c6d22dff
child 40030 e2697acd9381
--- a/hgext/patchbomb.py	Thu Aug 16 00:39:32 2018 -0400
+++ b/hgext/patchbomb.py	Thu Aug 16 00:40:20 2018 -0400
@@ -470,8 +470,9 @@
     return revs
 
 def _msgid(node, timestamp):
-    return '<%s.%d@%s>' % (node, timestamp,
-                           encoding.strtolocal(socket.getfqdn()))
+    hostname = encoding.strtolocal(socket.getfqdn())
+    hostname = encoding.environ.get('HGHOSTNAME', hostname)
+    return '<%s.%d@%s>' % (node, timestamp, hostname)
 
 emailopts = [
     ('', 'body', None, _('send patches as inline message text (default)')),