# HG changeset patch # User Augie Fackler # Date 1534394420 14400 # Node ID 1415b78869ebcd0d69b2cf451f346b92e86fae7a # Parent 4899c6d22dff806e8bdb5c19cf4998d42ccfeb95 patchbomb: allow using HGHOSTNAME to force a hostname I'll update run-tests.py to set this globally to stabilize some tests. The variable name is intentionally generic because I suspect we should generalize this to other tests. Differential Revision: https://phab.mercurial-scm.org/D4294 diff -r 4899c6d22dff -r 1415b78869eb hgext/patchbomb.py --- 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)')),