D4294: patchbomb: allow using HGHOSTNAME to force a hostname

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Aug 16 04:59:06 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4294

AFFECTED FILES
  hgext/patchbomb.py

CHANGE DETAILS

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -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)')),



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list