[PATCH 03 of 10 STABLE] py3: account for extra line break in email headers in test-notify.t

Denis Laxalde denis at laxalde.org
Thu Oct 24 11:30:34 EDT 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1571928996 -7200
#      Thu Oct 24 16:56:36 2019 +0200
# Branch stable
# Node ID 3b9e9dfaf1e032307fa725c69b4c1dee4d92f53e
# Parent  07e05c72d451036707ac8c7f9a283617ac9534f8
py3: account for extra line break in email headers in test-notify.t

Long headers appears to be wrapped with new lines. In test-notify.t, we
have a "filter.py" that replaces "\n" by " ", so we get an extra space
in a Message-Id with a long value.

---
Alternatively, the regex in filter.py could be updated, but I did not
find how.

diff --git a/tests/test-notify.t b/tests/test-notify.t
--- a/tests/test-notify.t
+++ b/tests/test-notify.t
@@ -211,7 +211,8 @@ pull (minimal config)
   Subject: changeset in $TESTTMP/b: b
   From: test at example.com
   X-Hg-Notification: changeset 00a13f371396
-  Message-Id: <hg.ba3098a36bd4c297288d16788623a841f81f618ea961a0f0fd65de7eb1191b66 at example.com>
+  Message-Id: <hg.ba3098a36bd4c297288d16788623a841f81f618ea961a0f0fd65de7eb1191b66 at example.com> (no-py3 !)
+  Message-Id:  <hg.ba3098a36bd4c297288d16788623a841f81f618ea961a0f0fd65de7eb1191b66 at example.com> (py3 !)
   To: baz at example.com, foo at bar
   
   changeset 00a13f371396 in $TESTTMP/b


More information about the Mercurial-devel mailing list