D8171: tests: handle In-Reply-To headers for line wrapping

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Fri Feb 28 19:14:17 UTC 2020


Closed by commit rHGa1908951ca42: tests: handle In-Reply-To headers for line wrapping (authored by joerg.sonnenberger).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8171?vs=20349&id=20397

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8171/new/

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

AFFECTED FILES
  tests/unwrap-message-id.py

CHANGE DETAILS

diff --git a/tests/unwrap-message-id.py b/tests/unwrap-message-id.py
--- a/tests/unwrap-message-id.py
+++ b/tests/unwrap-message-id.py
@@ -1,6 +1,8 @@
 from __future__ import absolute_import, print_function
 
-import re
 import sys
 
-print(re.sub(r"(?<=Message-Id:) \n ", " ", sys.stdin.read()), end="")
+for line in sys.stdin:
+    if line.lower() in ("message-id: \n", "in-reply-to: \n"):
+        line = line[:-2]
+    print(line, end="")



To: joerg.sonnenberger, #hg-reviewers, marmoute
Cc: marmoute, mercurial-devel


More information about the Mercurial-devel mailing list