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

login
register
mail settings
Submitter phabricator
Date Feb. 28, 2020, 7:14 p.m.
Message ID <56873d56760c93544c0066fe86f4173f@localhost.localdomain>
Download mbox | patch
Permalink /patch/45403/
State Not Applicable
Headers show

Comments

phabricator - Feb. 28, 2020, 7:14 p.m.
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




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

Patch

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="")