# HG changeset patch # User Augie Fackler # Date 2018-08-16 04:40:20 # 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 --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -470,8 +470,9 @@ def _getoutgoing(repo, dest, revs): 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)')),